]> Shamusworld >> Repos - ttedit/blobdiff - src/editwindow.h
Converted project from wxWidgets to Qt. This will be the LAST time this
[ttedit] / src / editwindow.h
index 846e891608342f6084855e7b8d5c83bb9f94dd60..f31298cc1305d5d041d200d6a1806194e11ec4a9 100755 (executable)
@@ -8,6 +8,47 @@
 #ifndef __EDITWINDOW_H__
 #define __EDITWINDOW_H__
 
+#include <QtGui>
+#include "types.h"
+//#include "ttedit.h"                                                          // For TTEditApp
+#include "toolwindow.h"                                                        // For ToolType enum
+#include "glyphpoints.h"
+
+class EditWindow: public QWidget
+{
+       Q_OBJECT
+
+       public:
+               EditWindow(QWidget * parent = NULL);
+               QSize minimumSizeHint() const;
+               QSize sizeHint() const;
+
+       protected:
+               void paintEvent(QPaintEvent * event);
+               void mousePressEvent(QMouseEvent * event);
+               void mouseMoveEvent(QMouseEvent * event);
+               void mouseReleaseEvent(QMouseEvent * event);
+
+       private:
+               void CreateCursors(void);
+               QPoint GetAdjustedMousePosition(QMouseEvent * event);
+               QPoint GetAdjustedClientPosition(int x, int y);
+
+               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;
+
+               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"
@@ -44,5 +85,6 @@ class TTEditWindow: public wxWindow
 
        DECLARE_EVENT_TABLE()
 };
+#endif
 
 #endif // __EDITWINDOW_H__