diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2013-05-11 16:10:50 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2013-05-11 16:10:50 +0200 |
commit | bc899047089079dde323e84a57efe46ce6af653d (patch) | |
tree | c88ef2bc6d1876518b285db15e5a400c6c4795a4 /liveview/liveviewpaintengine.h | |
parent | 4b5bbdea7bdb6defc88023ba65f7aec1a7439977 (diff) | |
download | sowatch-bc899047089079dde323e84a57efe46ce6af653d.tar.gz sowatch-bc899047089079dde323e84a57efe46ce6af653d.zip |
add the liveview paint engine
Diffstat (limited to 'liveview/liveviewpaintengine.h')
-rw-r--r-- | liveview/liveviewpaintengine.h | 32 |
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 |