1 #ifndef __DRAWINGVIEW_H__
2 #define __DRAWINGVIEW_H__
9 class DrawingView: public QWidget
14 DrawingView(QWidget * parent = NULL);
17 // void SetRotateToolActive(bool state = true);
18 void SetToolActive(Action * action);
19 void SetGridSize(uint32_t);
20 void UpdateGridBackground(void);
23 void AddNewObjectToDocument(Object *);
24 void SetCurrentLayer(int);
27 void paintEvent(QPaintEvent * event);
28 void resizeEvent(QResizeEvent * event);
29 void mousePressEvent(QMouseEvent * event);
30 void mouseMoveEvent(QMouseEvent * event);
31 void mouseReleaseEvent(QMouseEvent * event);
32 void keyPressEvent(QKeyEvent * event);
33 void keyReleaseEvent(QKeyEvent * event);
36 QPoint GetAdjustedMousePosition(QMouseEvent * event);
37 QPoint GetAdjustedClientPosition(int x, int y);
43 QPixmap gridBackground;
44 double scale; // Window scaling factor
45 int32_t offsetX, offsetY; // Window offsets
48 uint32_t gridPixels; // Grid size in pixels
51 //Should this go into Object's class variables???
52 //maybe, maybe not... :-P
58 // bool addCircleTool;
59 // bool addDimensionTool;
65 #endif // __DRAWINGVIEW_H__