diff options
Diffstat (limited to 'src/lib/xdgnotificationmessage.h')
-rw-r--r-- | src/lib/xdgnotificationmessage.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/src/lib/xdgnotificationmessage.h b/src/lib/xdgnotificationmessage.h new file mode 100644 index 0000000..8e62cab --- /dev/null +++ b/src/lib/xdgnotificationmessage.h @@ -0,0 +1,67 @@ +#ifndef NOTIFYMESSAGE_H +#define NOTIFYMESSAGE_H + +#include <QObject> +#include <QVariantMap> + +namespace xdg { + class NotificationMessage : public QObject + { + Q_OBJECT + + QString m_appName; + QString m_appIcon; + QString m_summary; + QString m_body; + QStringList m_actions; + QVariantMap m_hints; + uint m_id; + int m_timeout; + + + public: + explicit NotificationMessage( + const QString &app_name, + const QString &app_icon, + const QString &summary, + const QString &body, + const QStringList &actions, + const QVariantMap &hints, + int timeout, + QObject *parent = nullptr); + + void update( + const QString &app_name, + const QString &app_icon, + const QString &summary, + const QString &body, + const QStringList &actions, + const QVariantMap &hints, + int timeout); + + void setId(uint id); + + QString appName() const; + QString appIcon() const; + QString summary() const; + QString body() const; + QStringList actions() const; + QVariantMap hints() const; + uint id() const; + + private slots: + void _expired(); + + signals: + void appNameChanged(QString appName); + void appIconChanged(QString appIcon); + void summaryChanged(QString summary); + void bodyChanged(QString body); + void actionsChanged(QStringList actions); + void hintsChanged(QVariantMap hints); + void timeoutChanged(int timeout); + void expired(QObject *obj); + }; +} + +#endif // NOTIFYMESSAGE_H |