1 #ifndef __DRAWINGVIEW_H__
2 #define __DRAWINGVIEW_H__
10 class DrawingView: public QWidget
15 DrawingView(QWidget * parent = NULL);
18 // void SetToolActive(Action * action);
19 void SetGridSize(uint32_t);
20 void UpdateGridBackground(void);
21 Point SnapPointToGrid(Point);
22 void RenderObjects(Painter *, Container *);
23 void DeleteSelectedItems(void);
26 void AddNewObjectToDocument(Object *);
27 void HandleActionUpdate(void);
28 void SetCurrentLayer(int);
31 void paintEvent(QPaintEvent * event);
32 void resizeEvent(QResizeEvent * event);
33 void mousePressEvent(QMouseEvent * event);
34 void mouseMoveEvent(QMouseEvent * event);
35 void mouseReleaseEvent(QMouseEvent * event);
36 void wheelEvent(QWheelEvent * event);
37 void keyPressEvent(QKeyEvent * event);
38 void keyReleaseEvent(QKeyEvent * event);
41 QPoint GetAdjustedMousePosition(QMouseEvent * event);
42 QPoint GetAdjustedClientPosition(int x, int y);
49 QPixmap gridBackground;
50 double scale; // Window scaling factor
51 int32_t offsetX, offsetY; // Window offsets
54 uint32_t gridPixels; // Grid size in pixels
61 // Action * toolAction;
64 // static Container document;
67 #endif // __DRAWINGVIEW_H__