summaryrefslogtreecommitdiff
path: root/libsowatch/notification.h
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2011-09-24 20:52:17 +0200
committerJavier S. Pedro <maemo@javispedro.com>2011-09-24 20:52:17 +0200
commita1ec50943454ba4674c8c5e5d5dadcdbd414b111 (patch)
tree163aed51758c98fa6feec35a344aa8b5095c32e5 /libsowatch/notification.h
parentcba26597f1c09764d37be0d13863ec5d5c340da0 (diff)
downloadsowatch-a1ec50943454ba4674c8c5e5d5dadcdbd414b111.tar.gz
sowatch-a1ec50943454ba4674c8c5e5d5dadcdbd414b111.zip
Incoming phone calls working!
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();
};
}