diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2013-05-06 23:13:37 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2013-05-06 23:13:37 +0200 |
commit | ae37832316d905889c82706b351b3c037c9e1ab6 (patch) | |
tree | d90c4a18729937b782f557e170cf95d4ef38f031 /libsowatch/notification.h | |
parent | d83093df7602aa2896de71292b47948540c22a44 (diff) | |
download | sowatch-ae37832316d905889c82706b351b3c037c9e1ab6.tar.gz sowatch-ae37832316d905889c82706b351b3c037c9e1ab6.zip |
prepare for weather qml notifications
Diffstat (limited to 'libsowatch/notification.h')
-rw-r--r-- | libsowatch/notification.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libsowatch/notification.h b/libsowatch/notification.h index 7080f7f..e20f897 100644 --- a/libsowatch/notification.h +++ b/libsowatch/notification.h @@ -13,8 +13,9 @@ namespace sowatch class SOWATCH_EXPORT Notification : public QObject { Q_OBJECT - Q_ENUMS(Type) + Q_ENUMS(Type Priority) Q_PROPERTY(Type type READ type CONSTANT) + Q_PROPERTY(Priority priority READ priority NOTIFY priorityChanged) Q_PROPERTY(uint count READ count NOTIFY countChanged) Q_PROPERTY(QDateTime dateTime READ dateTime NOTIFY dateTimeChanged) Q_PROPERTY(QString displayTime READ displayTime NOTIFY displayTimeChanged STORED false) @@ -36,10 +37,17 @@ public: TypeCount }; + enum Priority { + Silent, + Normal, + Urgent + }; + explicit Notification(QObject *parent = 0); virtual ~Notification(); virtual Type type() const = 0; + virtual Priority priority() const; virtual uint count() const = 0; virtual QDateTime dateTime() const = 0; virtual QString displayTime() const; @@ -54,7 +62,7 @@ public slots: virtual void dismiss() = 0; signals: - /* For the convenience of QML users */ + void priorityChanged(); void countChanged(); void dateTimeChanged(); void displayTimeChanged(); @@ -74,5 +82,6 @@ signals: QML_DECLARE_TYPE(sowatch::Notification) QML_DECLARE_TYPE(sowatch::Notification::Type) +QML_DECLARE_TYPE(sowatch::Notification::Priority) #endif // SOWATCH_NOTIFICATION_H |