]> Shamusworld >> Repos - ttedit/blobdiff - src/toolwindow.h
Removed unnecessary graphic files, updated tool palette.
[ttedit] / src / toolwindow.h
index d4eab9f0371fd400ef9a40e91b3d50663348057b..323b563c5a1ccbe2d993785eb24562d033b0d17f 100755 (executable)
@@ -2,16 +2,15 @@
 // TOOLWINDOW.H: Header file
 //
 // by James L. Hammons
-// (C) 2008 Underground Software
+// (C) 2009 Underground Software
 //
 
 #ifndef __TOOLWINDOW_H__
 #define __TOOLWINDOW_H__
 
-#include <wx/wx.h>                                                             // So that whoever uses this can without having
-                                                                                               // to pull in a bunch of references manually
+#include <QtGui>
 
-// Enumerations (prolly go into ToolWindow class--?)
+// Enumerations
 
 enum ToolType {
        TOOLNone = -1,                                                  // No tool
@@ -22,26 +21,29 @@ enum ToolType {
        TOOLAddPt,                                                              // Add point tool
        TOOLAddPoly,                                                    // Polygon creation tool
        TOOLDelPt,                                                              // Delete point tool
-       TOOLDelPoly                                                             // Delete polygon tool
+       TOOLDelPoly,                                                    // Delete polygon tool
+       TOOLRotate,                                                             // Rotate tool
+       TOOLRotatePoly                                                  // ROtate polygon around centroid tool
 };
 
-class ToolWindow: public wxFrame
+class ToolWindow: public QWidget
 {
-       private:
-       protected:
+       Q_OBJECT
+
        public:
-               wxBitmap * bmp;
-               wxPoint sizeStamp, sizeTPBM;
-               ToolType prevTool;
+               ToolWindow(void);
+               ToolType FindSelectedTool(void);
 
-               // Constructor and destructor
-               ToolWindow(wxFrame * parent, const wxString &title, const wxPoint &pos, const wxSize &size, long style);
-               ~ToolWindow(void);
+       protected:
+               QSize sizeHint() const;
+               void paintEvent(QPaintEvent * event);
 
-               void OnPaint(wxPaintEvent &e);
-               ToolType FindSelectedTool(void);
+       public:
+               ToolType prevTool;
 
-       DECLARE_EVENT_TABLE()
+       private:
+               QImage img;
+               QPoint sizeStamp, sizeTPBM;
 };
 
 #endif // __TOOLWINDOW_H__