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