// 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__
+