summaryrefslogtreecommitdiff
path: root/libsowatch/notificationsmodel.h
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2013-06-15 20:35:33 +0200
committerJavier S. Pedro <maemo@javispedro.com>2013-06-15 20:35:33 +0200
commit378611f629abc146eaf0b13301f119d826edb86b (patch)
tree3f2447b75bfe155bbb013b07e08f2922d23a0f3a /libsowatch/notificationsmodel.h
parenta3797790c7da7a5c88005735619dc56a96264930 (diff)
downloadsowatch-378611f629abc146eaf0b13301f119d826edb86b.tar.gz
sowatch-378611f629abc146eaf0b13301f119d826edb86b.zip
add some support for notifications in liveview
Diffstat (limited to 'libsowatch/notificationsmodel.h')
-rw-r--r--libsowatch/notificationsmodel.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/libsowatch/notificationsmodel.h b/libsowatch/notificationsmodel.h
index ffd8ab7..86ed2af 100644
--- a/libsowatch/notificationsmodel.h
+++ b/libsowatch/notificationsmodel.h
@@ -24,10 +24,18 @@ public:
int rowCount(const QModelIndex &parent) const;
QVariant data(const QModelIndex &index, int role) const;
+ int size() const;
+ int size(const QList<Notification::Type>& types) const;
+ Notification* at(int position) const;
+ Notification* at(Notification::Type type, int position) const;
+ Notification* at(const QList<Notification::Type>& types, int position) const;
+
void add(Notification *n);
void remove(Notification *n);
void remove(Notification::Type type, Notification *n);
+ Q_INVOKABLE int countByType(Notification::Type type) const;
+
Q_INVOKABLE int fullCount() const;
Q_INVOKABLE int fullCountByType(Notification::Type type) const;
Q_INVOKABLE int fullCountByType(int type) const; // See QTBUG-26415
@@ -44,7 +52,6 @@ private:
int getOffsetForType(Notification::Type type) const;
int getAppendOffsetForType(Notification::Type type) const;
int getIndexForNotification(Notification *n) const;
- const Notification* getNotificationByIndex(int index) const;
private slots:
void handleNotificationChanged();