]> 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 0f6add1..410475f
@@ -2,32 +2,33 @@
 // CHARWINDOW.H: Header file
 //
 // by James L. Hammons
-// (C) 2008 Underground Software
+// (C) 2009 Underground Software
 //
 
 #ifndef __CHARWINDOW_H__
 #define __CHARWINDOW_H__
 
-#include <wx/wx.h>                                                             // So that whoever uses this can without having
-                                                                                               // to pull in a bunch of references manually
-#include <wx/minifram.h>
+#include <QtWidgets>
+#include "glyphpoints.h"
 
-class CharWindow: public wxMiniFrame
+class CharWindow: public QWidget
 {
-       private:
-       protected:
-       public:
-               wxBitmap * bmp;
+       Q_OBJECT
 
-               // 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);
+       public:
+               CharWindow(QWidget * parent = NULL);
+               QPainterPath * MakePathFromPoints(GlyphPoints * gp);
+               void RenderPathInImage(QPainterPath *, QImage *);
 
-               void OnPaint(wxPaintEvent &e);
-//             void OnMouseEvent(wxMouseEvent &e);
+       protected:
+               QSize minimumSizeHint() const;
+               QSize sizeHint() const;
+               void paintEvent(QPaintEvent * event);
 
-       DECLARE_EVENT_TABLE()
+       public:
+               QImage img;
+               QPainterPath * path;
 };
 
 #endif // __CHARWINDOW_H__
+