summaryrefslogtreecommitdiff
path: root/libsowatch/watchpaintengine.h
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2011-09-26 02:36:09 +0200
committerJavier S. Pedro <maemo@javispedro.com>2011-09-26 02:36:09 +0200
commit0822b88738e00625efd27ccca9119885272924d2 (patch)
treef379817602cc23dd829c0aa4751b6b5edc348923 /libsowatch/watchpaintengine.h
parentcf5d24b94d96b722c6d76c2225293a56a50d3c2b (diff)
downloadsowatch-0822b88738e00625efd27ccca9119885272924d2.tar.gz
sowatch-0822b88738e00625efd27ccca9119885272924d2.zip
fixing bugs found during use ;)
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;