summaryrefslogtreecommitdiff
path: root/libsowatch/watchserver.h
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2011-09-27 04:51:30 +0200
committerJavier S. Pedro <maemo@javispedro.com>2011-09-27 04:51:30 +0200
commita644a7cc6749f8dd5ca20589ee6e59acc2892b3e (patch)
treeb995528dc14d1f58d9d7c958d1eaad855b2a2412 /libsowatch/watchserver.h
parent0822b88738e00625efd27ccca9119885272924d2 (diff)
downloadsowatch-a644a7cc6749f8dd5ca20589ee6e59acc2892b3e.tar.gz
sowatch-a644a7cc6749f8dd5ca20589ee6e59acc2892b3e.zip
new qmafw watchlet
Diffstat (limited to 'libsowatch/watchserver.h')
-rw-r--r--libsowatch/watchserver.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/libsowatch/watchserver.h b/libsowatch/watchserver.h
index a3e0593..66c941a 100644
--- a/libsowatch/watchserver.h
+++ b/libsowatch/watchserver.h
@@ -2,6 +2,7 @@
#define SOWATCH_WATCHSERVER_H
#include <QtCore/QList>
+#include <QtCore/QStringList>
#include <QtCore/QMap>
#include <QtCore/QQueue>
@@ -31,39 +32,49 @@ public:
void addProvider(NotificationProvider* provider);
+public slots:
+ void postNotification(Notification *notification);
void runWatchlet(const QString& id);
void closeWatchlet();
+ void nextWatchlet();
-protected:
+private:
Watch* _watch;
+ /** The watch button that causes next watchlet to be run. */
int _nextWatchletButton;
+ /** The amount of seconds that have to pass for a notification to be considered "outdated" and not shown. */
int _oldNotificationThreshold;
+ /** A list of watchlets in order, for use by nextWatchlet() */
+ QStringList _watchletIds;
+ /** Actual Watchlet child objects by id. */
QMap<QString, Watchlet*> _watchlets;
- /** Stores current notifications, classified by type. */
+ /** Stores current live notifications, classified by type. */
QList<Notification*> _notifications[Notification::TypeCount];
+ /** A list of notifications that are yet to be shown to the user. */
QQueue<Notification*> _pendingNotifications;
+ /** Current watchlet. */
Watchlet* _currentWatchlet;
- unsigned char _currentWatchletIndex;
+ /** The current watchlet index if any, for use by nextWatchlet() */
+ int _currentWatchletIndex;
void registerWatchlet(Watchlet *watchlet);
void reactivateCurrentWatchlet();
- void nextWatchlet();
void nextNotification();
uint getNotificationCount(Notification::Type type);
void goToIdle();
-protected slots:
+private slots:
void watchConnected();
void watchDisconnected();
void watchIdling();
void watchButtonPress(int button);
- void notificationReceived(Notification* notification);
+
void notificationChanged();
void notificationCleared();