summaryrefslogtreecommitdiff
path: root/liveview/liveviewpaintengine.h
diff options
context:
space:
mode:
Diffstat (limited to 'liveview/liveviewpaintengine.h')
-rw-r--r--liveview/liveviewpaintengine.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/liveview/liveviewpaintengine.h b/liveview/liveviewpaintengine.h
new file mode 100644
index 0000000..f94c133
--- /dev/null
+++ b/liveview/liveviewpaintengine.h
@@ -0,0 +1,32 @@
+#ifndef LIVEVIEWPAINTENGINE_H
+#define LIVEVIEWPAINTENGINE_H
+
+#include <sowatch.h>
+#include "liveview.h"
+
+namespace sowatch
+{
+
+class LiveViewPaintEngine : public WatchPaintEngine
+{
+public:
+ LiveViewPaintEngine();
+
+ bool begin(QPaintDevice *pdev);
+ bool end();
+
+ void drawRects(const QRectF *rects, int rectCount);
+ void drawRects(const QRect *rects, int rectCount);
+
+ void updateState(const QPaintEngineState &state);
+
+protected:
+ bool fillsEntireImage(const QRect& rect);
+
+ LiveView* _watch;
+ bool _isBrushBlack;
+};
+
+}
+
+#endif // LIVEVIEWPAINTENGINE_H