1 #ifndef __DRAWINGVIEW_H__
2 #define __DRAWINGVIEW_H__
9 class DrawingView: public QWidget
14 DrawingView(QWidget * parent = NULL);
17 void SetRotateToolActive(bool state = true);
19 void SetAddLineToolActive(bool state = true);
20 void SetAddCircleToolActive(bool state = true);
21 void SetAddArcToolActive(bool state = true);
22 void SetAddDimensionToolActive(bool state = true);
24 // void SetToolActive(Action * action, bool state = true);
25 void SetToolActive(Action * action);//, bool state = true);
26 void SetGridSize(uint32_t);
27 void UpdateGridBackground(void);
30 void AddNewObjectToDocument(Object *);
33 void paintEvent(QPaintEvent * event);
34 void resizeEvent(QResizeEvent * event);
35 void mousePressEvent(QMouseEvent * event);
36 void mouseMoveEvent(QMouseEvent * event);
37 void mouseReleaseEvent(QMouseEvent * event);
40 QPoint GetAdjustedMousePosition(QMouseEvent * event);
41 QPoint GetAdjustedClientPosition(int x, int y);
42 Vector SnapPointToGrid(Vector);
48 // QBrush * backgroundBrush;
49 QPixmap gridBackground;
50 double scale; // Window scaling factor
51 int32_t offsetX, offsetY; // Window offsets
54 double gridSpacing; // Grid spacing in base units
55 uint32_t gridPixels; // Grid size in pixels
56 // double gridBaseUnits; // Grid size in base units
59 //Should this go into Object's class variables???
66 bool addDimensionTool;
67 // bool selectionInProgress;
74 #endif // __DRAWINGVIEW_H__