]> Shamusworld >> Repos - ttedit/blob - src/toolwindow.h
Converted from Qt4 to Qt5.
[ttedit] / src / toolwindow.h
1 //
2 // TOOLWINDOW.H: Header file
3 //
4 // by James L. Hammons
5 // (C) 2009 Underground Software
6 //
7
8 #ifndef __TOOLWINDOW_H__
9 #define __TOOLWINDOW_H__
10
11 #include <QtWidgets>
12
13 // Enumerations
14
15 enum ToolType {
16         TOOLNone = -1,                                                  // No tool
17         TOOLSelect = 0,                                                 // The "selection" tool
18         TOOLPolySelect,                                                 // Polygon selection tool
19         TOOLScroll,                                                             // Scroll window tool
20         TOOLZoom,                                                               // Zoom window tool
21         TOOLAddPt,                                                              // Add point tool
22         TOOLAddPoly,                                                    // Polygon creation tool
23         TOOLDelPt,                                                              // Delete point tool
24         TOOLDelPoly,                                                    // Delete polygon tool
25         TOOLRotate,                                                             // Rotate tool
26         TOOLRotatePoly,                                                 // Rotate polygon around centroid tool
27         TOOLFlipWinding                                                 // Change polygon's winding direction tool
28 };
29
30 class ToolWindow: public QWidget
31 {
32         Q_OBJECT
33
34         public:
35                 ToolWindow(void);
36                 ToolType FindSelectedTool(void);
37
38         protected:
39                 QSize sizeHint() const;
40                 void paintEvent(QPaintEvent * event);
41
42         public:
43                 ToolType prevTool;
44
45         private:
46                 QImage img;
47                 QPoint sizeStamp, sizeTPBM;
48 };
49
50 #endif  // __TOOLWINDOW_H__