]> Shamusworld >> Repos - ttedit/blobdiff - src/charwindow.h
Added preview window to file loading dialog. :-)
[ttedit] / src / charwindow.h
old mode 100755 (executable)
new mode 100644 (file)
index 19fefb2..410475f
@@ -1,33 +1,34 @@
-//\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 <QtWidgets>
+#include "glyphpoints.h"
+
+class CharWindow: public QWidget
+{
+       Q_OBJECT
+
+       public:
+               CharWindow(QWidget * parent = NULL);
+               QPainterPath * MakePathFromPoints(GlyphPoints * gp);
+               void RenderPathInImage(QPainterPath *, QImage *);
+
+       protected:
+               QSize minimumSizeHint() const;
+               QSize sizeHint() const;
+               void paintEvent(QPaintEvent * event);
+
+       public:
+               QImage img;
+               QPainterPath * path;
+};
+
+#endif // __CHARWINDOW_H__
+