]> Shamusworld >> Repos - ttedit/blobdiff - src/editwindow.h
Added rotation tool, save/load capability.
[ttedit] / src / editwindow.h
index f31298cc1305d5d041d200d6a1806194e11ec4a9..9ca997be19e2d8acf2396373d10df340fce24c9c 100755 (executable)
@@ -10,7 +10,6 @@
 
 #include <QtGui>
 #include "types.h"
-//#include "ttedit.h"                                                          // For TTEditApp
 #include "toolwindow.h"                                                        // For ToolType enum
 #include "glyphpoints.h"
 
@@ -33,58 +32,23 @@ class EditWindow: public QWidget
                void CreateCursors(void);
                QPoint GetAdjustedMousePosition(QMouseEvent * event);
                QPoint GetAdjustedClientPosition(int x, int y);
+               void DrawGlyph(QPainter & p, GlyphPoints & glyph);
 
+       public:
                QImage image;
                QPoint pt, ptOffset, ptPrevious;
-//             TTEditApp & app;                                                // Reference to the application object
                double scale;                                                   // Window scaling factor
                int32 offsetX, offsetY;                                 // Window offsets
                ToolType tool;                                                  // Current tool
                GlyphPoints pts;                                                // Glyph point structure
                int32 ptHighlight, oldPtHighlight, ptNextHighlight, oldPtNextHighlight;
                bool polyFirstPoint;
+               bool showRotationCenter, haveZeroPoint;
+               QPoint rotationCenter, rotationZeroPoint, rotationCurrentPoint;
+               double rotationAngle;
 
                ToolWindow * toolPalette;
-               QCursor cur[8];
-};
-
-#if 0
-#include <wx/wx.h>                                                             // So that whoever uses this can without having
-                                                                                               // to pull in a bunch of references manually
-#include "types.h"
-#include "ttedit.h"                                                            // For TTEditApp
-#include "toolwindow.h"                                                        // For ToolType enum
-#include "glyphpoints.h"
-
-class TTEditWindow: public wxWindow
-{
-       private:
-               TTEditApp & app;                                                // Reference to the application object
-               double scale;                                                   // Window scaling factor
-               int32 offsetX, offsetY;                                 // Window offsets
-               ToolType tool;                                                  // Current tool
-               GlyphPoints pts;                                                // Glyph point structure
-               int32 ptHighlight, oldPtHighlight, ptNextHighlight, oldPtNextHighlight;
-               bool polyFirstPoint;
-
-       protected:
-       public:
-               wxBitmap * bmp;
-               wxPoint pt, ptOffset, ptPrevious;
-
-               // Constructor and destructor
-               TTEditWindow(wxFrame * parent, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0);
-               ~TTEditWindow(void);
-
-               void OnPaint(wxPaintEvent &e);
-               void OnMouseEvent(wxMouseEvent &e);
-
-       protected:
-               wxPoint GetAdjustedMousePosition(wxMouseEvent &e);
-               wxPoint GetAdjustedClientPosition(wxCoord x, wxCoord y);
-
-       DECLARE_EVENT_TABLE()
+               QCursor cur[9];
 };
-#endif
 
 #endif // __EDITWINDOW_H__