1 #ifndef __DRAWINGVIEW_H__
2 #define __DRAWINGVIEW_H__
7 //#include "container.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);
24 void AddNewObjectToDocument(Object *);
25 void HandleActionUpdate(void);
26 void SetCurrentLayer(int);
29 void paintEvent(QPaintEvent * event);
30 void resizeEvent(QResizeEvent * event);
31 void mousePressEvent(QMouseEvent * event);
32 void mouseMoveEvent(QMouseEvent * event);
33 void mouseReleaseEvent(QMouseEvent * event);
34 void wheelEvent(QWheelEvent * event);
35 void keyPressEvent(QKeyEvent * event);
36 void keyReleaseEvent(QKeyEvent * event);
39 QPoint GetAdjustedMousePosition(QMouseEvent * event);
40 QPoint GetAdjustedClientPosition(int x, int y);
46 QPixmap gridBackground;
47 double scale; // Window scaling factor
48 int32_t offsetX, offsetY; // Window offsets
51 uint32_t gridPixels; // Grid size in pixels
58 // Action * toolAction;
61 // static Container document;
64 #endif // __DRAWINGVIEW_H__