1 #ifndef __DRAWINGVIEW_H__
2 #define __DRAWINGVIEW_H__
7 //#include "container.h"
12 class DrawingView: public QWidget
17 DrawingView(QWidget * parent = NULL);
20 // void SetToolActive(Action * action);
21 void SetGridSize(uint32_t);
22 void UpdateGridBackground(void);
23 Point SnapPointToGrid(Point);
24 void RenderObjects(Painter *, Container *);
27 void AddNewObjectToDocument(Object *);
28 void HandleActionUpdate(void);
29 void SetCurrentLayer(int);
32 void paintEvent(QPaintEvent * event);
33 void resizeEvent(QResizeEvent * event);
34 void mousePressEvent(QMouseEvent * event);
35 void mouseMoveEvent(QMouseEvent * event);
36 void mouseReleaseEvent(QMouseEvent * event);
37 void wheelEvent(QWheelEvent * event);
38 void keyPressEvent(QKeyEvent * event);
39 void keyReleaseEvent(QKeyEvent * event);
42 QPoint GetAdjustedMousePosition(QMouseEvent * event);
43 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__