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);
24 void ClearSelection(void);
25 void AddHoveredToSelection(void);
26 void GetSelection(std::vector<void *> &);
27 void GetHovered(std::vector<void *> &);
30 void AddNewObjectToDocument(Object *);
31 void HandleActionUpdate(void);
32 void SetCurrentLayer(int);
35 void paintEvent(QPaintEvent * event);
36 void resizeEvent(QResizeEvent * event);
37 void mousePressEvent(QMouseEvent * event);
38 void mouseMoveEvent(QMouseEvent * event);
39 void mouseReleaseEvent(QMouseEvent * event);
40 void wheelEvent(QWheelEvent * event);
41 void keyPressEvent(QKeyEvent * event);
42 void keyReleaseEvent(QKeyEvent * event);
45 QPoint GetAdjustedMousePosition(QMouseEvent * event);
46 QPoint GetAdjustedClientPosition(int x, int y);
56 QPixmap gridBackground;
57 double scale; // Window scaling factor
58 int32_t offsetX, offsetY; // Window offsets
61 uint32_t gridPixels; // Grid size in pixels
68 std::vector<void *> select;
69 std::vector<void *> hover;
70 // Action * toolAction;
73 // static Container document;
76 #endif // __DRAWINGVIEW_H__