52 bool selectRegionStart;
53 QVector2D selectRegionC1;
54 QVector2D selectRegionC2;
55 bool mouseLeftWasPressed;
57 static QBrush gridMajor;
58 static QBrush gridMinor;
59 static QBrush gridScissor;
61 static QPen colorPrincipal;
62 static QPen colorSelected;
63 static QPen colorGreyed;
65 static QPen colorNodeBase;
66 static QPen colorWallBase;
67 static QPen colorWallNormals;
68 static QPen colorSubmapBase;
69 static QPen colorDoorBase;
70 static QPen colorLiftBase;
71 static QPen colorStaircaseBase;
72 static QPen colorLightBase;
73 static QPen colorSpriteBase;
74 static QPen colorSpeakerBase;
76 static QPen colorGlowMap;
78 static QBrush brushWallAnchor;
80 static QImage pictoSubmap;
81 static QImage pictoDoor;
82 static QImage pictoLift;
83 static QImage pictoStaircase;
84 static QImage pictoLight;
85 static QImage pictoSprite;
86 static QImage pictoSpeaker;
98 void drawViewLabel(QPainter & painter);
99 void drawGrid(QPainter & painter, QVector2D & org);
100 void drawGlowMap(QPainter & painter, QVector2D & org);
102 void drawArrow(QPainter & painter, QVector2D & org, QVector2D &pos,
float pan,
float length);
103 void drawMap(QPainter & painter,
Map & map);
104 void drawNodes(QPainter & painter,
Map & map, QVector2D & org);
105 void drawWallsTop(QPainter & painter,
Map & map, QVector2D & org);
106 void drawWallsSide(QPainter & painter,
Map & map, QVector2D & org);
108 void drawSubmaps(QPainter & painter,
Map & map, QVector2D & org);
109 void drawDoors(QPainter & painter,
Map & map, QVector2D & org);
110 void drawLifts(QPainter & painter,
Map & map, QVector2D & org);
111 void drawStaircases(QPainter & painter,
Map & map, QVector2D & org);
112 void drawLights(QPainter & painter,
Map & map, QVector2D & org);
113 void drawSprites(QPainter & painter,
Map & map, QVector2D & org);
114 void drawSpeakers(QPainter & painter,
Map & map, QVector2D & org);
116 QVector2D getWorldCoordinates(
const QVector2D & pos);
117 void mousePressScroll(QMouseEvent *event);
118 void mousePressSelect(QMouseEvent *event);
119 void mouseReleaseCreate(QMouseEvent *event);
120 void mouseReleaseSelect(QMouseEvent *event);
122 void mouseMoveScroll(QMouseEvent *event);
123 void mouseMoveDrag(QMouseEvent *event);
125 template <
typename T,
typename Container>
126 void drawItems(QPainter& painter,
129 const Container& items,
133 std::function<
int(
const T&)> getNodeId);
136 template <
typename T,
typename Container>
137 bool dragNodeItems(Container & items,
139 std::function<
int(
const T&)> getNodeId);