#ifndef GRAPHICS_H
#define GRAPHICS_H
#include "toolkit.h"
#include "../ui/graphics.h"
#include <QWidget>
#include <QPainter>
#include <QColor>
#include <QStaticText>
typedef struct UiQtGraphics {
UiGraphics g;
QPainter *painter;
QColor color;
} UiXlibGraphics;
struct UiTextLayout {
QStaticText text;
QFont font;
};
class DrawingArea : public QWidget {
Q_OBJECT
UiObject *object;
ui_drawfunc drawCallback;
void *userdata;
public:
DrawingArea(UiObject *obj, ui_drawfunc cb,
void *data);
~DrawingArea();
virtual
void paintEvent(QPaintEvent * event);
};
#endif