summaryrefslogtreecommitdiff
path: root/libsowatch/notification.h
diff options
context:
space:
mode:
Diffstat (limited to 'libsowatch/notification.h')
-rw-r--r--libsowatch/notification.h33
1 files changed, 21 insertions, 12 deletions
diff --git a/libsowatch/notification.h b/libsowatch/notification.h
index 7a46ab7..8e58653 100644
--- a/libsowatch/notification.h
+++ b/libsowatch/notification.h
@@ -3,16 +3,21 @@
#include <QtCore/QString>
#include <QtCore/QDateTime>
+#include <QtGui/QImage>
#include "sowatch_global.h"
namespace sowatch
{
-class SOWATCH_EXPORT Notification
+class SOWATCH_EXPORT Notification : public QObject
{
+ Q_OBJECT
+ Q_ENUMS(Type)
+
public:
enum Type {
OtherNotification = 0,
+ CallNotification,
MissedCallNotification,
SmsNotification,
MmsNotification,
@@ -22,19 +27,23 @@ public:
TypeCount
};
- Notification(Type type, const QDateTime& dateTime, QString title, QString body);
- ~Notification();
+ explicit Notification(QObject *parent = 0);
+ virtual ~Notification();
+
+ virtual Type type() const = 0;
+ virtual uint count() const = 0;
+ virtual QDateTime dateTime() const = 0;
+ virtual QString title() const = 0;
+ virtual QString body() const = 0;
+ virtual QImage image() const;
- inline Type type() const { return _type; }
- inline QDateTime dateTime() const { return _dateTime; }
- inline QString title() const { return _title; }
- inline QString body() const { return _body; }
+public slots:
+ virtual void activate() = 0;
+ virtual void clear() = 0;
-protected:
- Type _type;
- QDateTime _dateTime;
- QString _title;
- QString _body;
+signals:
+ void changed();
+ void cleared();
};
}