diff options
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; }; |