]> Shamusworld >> Repos - ttedit/blob - src/toolwindow.h
27a0cb35d96b8309e375f72095064d5b26527067
[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 <QtGui>
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         TOOLRotate,                                                             // Rotate tool
22         TOOLAddPt,                                                              // Add point tool
23         TOOLAddPoly,                                                    // Polygon creation tool
24         TOOLDelPt,                                                              // Delete point tool
25         TOOLDelPoly                                                             // Delete polygon tool
26 };
27
28 class ToolWindow: public QWidget
29 {
30         Q_OBJECT
31
32         public:
33                 ToolWindow(void);
34                 ToolType FindSelectedTool(void);
35
36         protected:
37                 QSize sizeHint() const;
38                 void paintEvent(QPaintEvent * event);
39
40         public:
41                 ToolType prevTool;
42
43         private:
44                 QImage img;
45                 QPoint sizeStamp, sizeTPBM;
46 };
47
48 #endif  // __TOOLWINDOW_H__