diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2012-08-14 00:11:51 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2012-08-14 00:11:51 +0200 |
commit | 758cec1a767c056aaf9da36fd411cdf4a8fba32e (patch) | |
tree | 341cb8705e2e6c02d713860c8403ac8a3630a78a /libsowatch/watchserver.h | |
parent | 542d3489f45111aaca5514495af3847cf39e335b (diff) | |
download | sowatch-758cec1a767c056aaf9da36fd411cdf4a8fba32e.tar.gz sowatch-758cec1a767c056aaf9da36fd411cdf4a8fba32e.zip |
rewrite live notifications handling using models
Diffstat (limited to 'libsowatch/watchserver.h')
-rw-r--r-- | libsowatch/watchserver.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libsowatch/watchserver.h b/libsowatch/watchserver.h index af2a8de..91f9b4e 100644 --- a/libsowatch/watchserver.h +++ b/libsowatch/watchserver.h @@ -8,7 +8,7 @@ #include <QtCore/QTimer> #include "sowatch_global.h" -#include "notification.h" +#include "notificationsmodel.h" namespace sowatch { @@ -41,7 +41,7 @@ public: void removeProvider(const NotificationProvider *provider); /** Get a list of all current live notifications. */ - QList<Notification*> liveNotifications(); + const NotificationsModel * notifications() const; public slots: void postNotification(Notification *notification); @@ -71,8 +71,8 @@ private: /** Stores all the watchlets with a given watchled id. */ QMap<QString, Watchlet*> _watchletIds; - /** Stores current live notifications, classified by type. */ - QList<Notification*> _notifications[Notification::TypeCount]; + /** Stores current live notifications. */ + NotificationsModel *_notifications; /** A list of notifications that are yet to be shown to the user. */ QQueue<Notification*> _pendingNotifications; /** Stores the count of notifications hidden between each notification object. */ @@ -92,6 +92,8 @@ private: /** Counts all notifications from a given type. */ uint getNotificationCount(Notification::Type type); + /** Remove a notification of a certain type. */ + void removeNotification(Notification::Type type, Notification* n); void deactivateCurrentWatchlet(); void reactivateCurrentWatchlet(); |