From a644a7cc6749f8dd5ca20589ee6e59acc2892b3e Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Tue, 27 Sep 2011 04:51:30 +0200 Subject: new qmafw watchlet --- libsowatch/graphicswatchlet.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'libsowatch/graphicswatchlet.h') 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 #include #include #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& 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& region); + void frameTimeout(); + +private: + QRegion _damaged; }; -- cgit v1.2.3