From 0822b88738e00625efd27ccca9119885272924d2 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Mon, 26 Sep 2011 02:36:09 +0200 Subject: fixing bugs found during use ;) --- libsowatch/watchpaintengine.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'libsowatch/watchpaintengine.h') 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; -- cgit v1.2.3