X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ftoolwindow.h;h=2864970fbb46c0bc4fc0768361ef6b4676008401;hb=7fde5a077bc9bbce28662fa2e5aa5043f3b4747f;hp=d4eab9f0371fd400ef9a40e91b3d50663348057b;hpb=c84263bb8b0d16e4c6da49aa0b7d0bc904ae02b1;p=ttedit diff --git a/src/toolwindow.h b/src/toolwindow.h index d4eab9f..2864970 100755 --- a/src/toolwindow.h +++ b/src/toolwindow.h @@ -2,46 +2,51 @@ // TOOLWINDOW.H: Header file // // by James L. Hammons -// (C) 2008 Underground Software +// (C) 2009 Underground Software // #ifndef __TOOLWINDOW_H__ #define __TOOLWINDOW_H__ -#include // So that whoever uses this can without having - // to pull in a bunch of references manually +#include -// Enumerations (prolly go into ToolWindow class--?) +// Enumerations enum ToolType { TOOLNone = -1, // No tool TOOLSelect = 0, // The "selection" tool TOOLPolySelect, // Polygon selection tool - TOOLScroll, // Scroll window tool + TOOLMultiSelect, // Rectangle selection tool TOOLZoom, // Zoom window tool 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 + TOOLFlipWinding, // Change polygon's winding direction tool + TOOLScroll // Scroll window 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__ +