ui/qt/graphics.h

changeset 516
4b31c74666d7
parent 103
6a6718269c22
equal deleted inserted replaced
515:9e18cb8c4412 516:4b31c74666d7
35 #include <QWidget> 35 #include <QWidget>
36 #include <QPainter> 36 #include <QPainter>
37 #include <QColor> 37 #include <QColor>
38 #include <QStaticText> 38 #include <QStaticText>
39 39
40 typedef struct UiQtGraphics {
41 UiGraphics g;
42 QPainter *painter;
43 QColor color;
44 } UiXlibGraphics;
45
46 struct UiTextLayout {
47 QStaticText text;
48 QFont font;
49 };
50
51
52 class DrawingArea : public QWidget {
53 Q_OBJECT
54
55 UiObject *object;
56 ui_drawfunc drawCallback;
57 void *userdata;
58
59 public:
60 DrawingArea(UiObject *obj, ui_drawfunc cb, void *data);
61 ~DrawingArea();
62
63 virtual void paintEvent(QPaintEvent * event);
64 };
65 40
66 #endif /* GRAPHICS_H */ 41 #endif /* GRAPHICS_H */
67 42

mercurial