summaryrefslogtreecommitdiff
path: root/libsowatch/watchpaintengine.h
diff options
context:
space:
mode:
Diffstat (limited to 'libsowatch/watchpaintengine.h')
-rw-r--r--libsowatch/watchpaintengine.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/libsowatch/watchpaintengine.h b/libsowatch/watchpaintengine.h
index 74d4e09..7a97ad7 100644
--- a/libsowatch/watchpaintengine.h
+++ b/libsowatch/watchpaintengine.h
@@ -6,12 +6,14 @@
namespace sowatch
{
-class Watch;
-
class WatchPaintEngine : public QPaintEngine
{
public:
- WatchPaintEngine(Watch* watch);
+ ~WatchPaintEngine();
+
+ /* You are supposed to override these two functions. */
+ bool begin(QPaintDevice *pdev);
+ bool end();
void drawEllipse(const QRectF &r);
void drawEllipse(const QRect &r);
@@ -33,15 +35,17 @@ public:
void updateState(const QPaintEngineState &state);
protected:
+ WatchPaintEngine();
+
void damageMappedRect(const QRect& r);
void damageRect(const QRect& r);
void damageRect(const QRectF& r);
void damagePenStroke(const QLineF& line);
void updateClipRegion(const QRegion& region, Qt::ClipOperation op);
- Watch* _watch;
QPainter _painter;
QRegion _damaged;
+ QRect _area;
bool _hasPen;
qreal _penWidth;