+ QImage *image;
+ QPainter *painter;
+
+ QPoint mousePos;
+ Qt::MouseButton mouseButton;
+
+ bool dirtyFlag;
+ QRect dirtyRect;
+
+ DrawingThread *thread;
+
+ void initialize(ThreadFunction fun);
+
+ void setColor(const QColor& color);
+ void setBgColor(const QColor& color);
+ QColor getColor();
+ QColor getBgColor();
+
+ void safeLock(QMutex &mutex);
+ void safeUnlock(QMutex &mutex);
+
+ void dirty();
+ void dirty(int x, int y);
+ void dirty(int x1, int y1, int x2, int y2);
+ void dirty(const QRect &rect);
+
+ void mayUpdate();
+ void realSync();
+ void realDrawText(int x, int y, const char *text, int flags);