]> Shamusworld >> Repos - ttedit/blobdiff - src/charwindow.h
Separated out app object, added character window.
[ttedit] / src / charwindow.h
index 19fefb2e31ff4e448e9644284d701b717e4e63e9..cabd343bd9ed8f6589713f7e0bdc6150ed9022f8 100755 (executable)
@@ -1,33 +1,56 @@
-//\r
-// CHARWINDOW.H: Header file\r
-//\r
-// by James L. Hammons\r
-// (C) 2008 Underground Software\r
-//\r
-\r
-#ifndef __CHARWINDOW_H__\r
-#define __CHARWINDOW_H__\r
-\r
-#include <wx/wx.h>                                                             // So that whoever uses this can without having\r
-                                                                                               // to pull in a bunch of references manually\r
-#include <wx/minifram.h>\r
-\r
-class CharWindow: public wxMiniFrame\r
-{\r
-       private:\r
-       protected:\r
-       public:\r
-               wxBitmap * bmp;\r
-\r
-               // Constructor and destructor\r
-//             CharWindow(wxFrame * parent, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0);\r
-               CharWindow(wxFrame * parent, const wxString &title, const wxPoint &pos, const wxSize &size, long style);\r
-               ~CharWindow(void);\r
-\r
-               void OnPaint(wxPaintEvent &e);\r
-//             void OnMouseEvent(wxMouseEvent &e);\r
-\r
-       DECLARE_EVENT_TABLE()\r
-};\r
-\r
-#endif // __CHARWINDOW_H__\r
+//
+// CHARWINDOW.H: Header file
+//
+// by James L. Hammons
+// (C) 2009 Underground Software
+//
+
+#ifndef __CHARWINDOW_H__
+#define __CHARWINDOW_H__
+
+#include <QtGui>
+#include "glyphpoints.h"
+
+class CharWindow: public QWidget
+{
+       Q_OBJECT
+
+       public:
+               CharWindow(QWidget * parent = NULL);
+               void MakePathFromPoints(GlyphPoints * gp);
+
+       protected:
+               QSize minimumSizeHint() const;
+               QSize sizeHint() const;
+               void paintEvent(QPaintEvent * event);
+
+       private:
+               QImage img;
+               QPainterPath * path;
+};
+
+#if 0
+#include <wx/wx.h>                                                             // So that whoever uses this can without having
+                                                                                               // to pull in a bunch of references manually
+#include <wx/minifram.h>
+
+class CharWindow: public wxMiniFrame
+{
+       private:
+       protected:
+       public:
+               wxBitmap * bmp;
+
+               // Constructor and destructor
+//             CharWindow(wxFrame * parent, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0);
+               CharWindow(wxFrame * parent, const wxString &title, const wxPoint &pos, const wxSize &size, long style);
+               ~CharWindow(void);
+
+               void OnPaint(wxPaintEvent &e);
+//             void OnMouseEvent(wxMouseEvent &e);
+
+       DECLARE_EVENT_TABLE()
+};
+#endif
+
+#endif // __CHARWINDOW_H__