diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2011-09-27 04:51:30 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2011-09-27 04:51:30 +0200 |
commit | a644a7cc6749f8dd5ca20589ee6e59acc2892b3e (patch) | |
tree | b995528dc14d1f58d9d7c958d1eaad855b2a2412 /libsowatch/graphicswatchlet.h | |
parent | 0822b88738e00625efd27ccca9119885272924d2 (diff) | |
download | sowatch-a644a7cc6749f8dd5ca20589ee6e59acc2892b3e.tar.gz sowatch-a644a7cc6749f8dd5ca20589ee6e59acc2892b3e.zip |
new qmafw watchlet
Diffstat (limited to 'libsowatch/graphicswatchlet.h')
-rw-r--r-- | libsowatch/graphicswatchlet.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/libsowatch/graphicswatchlet.h b/libsowatch/graphicswatchlet.h index 3202631..61b68bf 100644 --- a/libsowatch/graphicswatchlet.h +++ b/libsowatch/graphicswatchlet.h @@ -1,6 +1,7 @@ #ifndef SOWATCH_GRAPHICSWATCHLET_H #define SOWATCH_GRAPHICSWATCHLET_H +#include <QtCore/QTimer> #include <QtGui/QGraphicsScene> #include <QtGui/QRegion> #include "watchlet.h" @@ -14,17 +15,27 @@ class SOWATCH_EXPORT GraphicsWatchlet : public Watchlet Q_OBJECT public: explicit GraphicsWatchlet(WatchServer* server, const QString& id); + ~GraphicsWatchlet(); QGraphicsScene* scene(); void setScene(QGraphicsScene* scene); -protected slots: - void sceneChanged(const QList<QRectF>& region); + static const int frameDelay = 20; + static const int busyFrameDelay = 40; protected: void activate(); + void deactivate(); QGraphicsScene* _scene; + QTimer _frameTimer; + +private slots: + void sceneChanged(const QList<QRectF>& region); + void frameTimeout(); + +private: + QRegion _damaged; }; |