- friend class DrawingWindowPrivate;
-};
-
-class DrawingWindowPrivate {
-public:
- static const int paintInterval = 33;
-
- DrawingWindow * const q;
-
- QBasicTimer timer;
- QMutex imageMutex;
- QMutex syncMutex;
- QWaitCondition syncCondition;
- bool terminateThread;
- int lockCount;
-
- QImage *image;
- QPainter *painter;
-
- QColor fgColor;
- QColor bgColor;
-
- bool dirtyFlag;
- QRect dirtyRect;
-
- DrawingThread *thread;
-
- DrawingWindowPrivate(DrawingWindow *w,
- DrawingWindow::ThreadFunction f);
- ~DrawingWindowPrivate();
-
- void initialize();
-
- void applyColor();
-
- 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 update();