1
/***************************************************************************
4
* Copyright (C) 2008 Jason Stubbs <jasonbstubbs@gmail.com> *
6
* This program is free software; you can redistribute it and/or modify *
7
* it under the terms of the GNU General Public License as published by *
8
* the Free Software Foundation; either version 2 of the License, or *
9
* (at your option) any later version. *
11
* This program is distributed in the hope that it will be useful, *
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14
* GNU General Public License for more details. *
16
* You should have received a copy of the GNU General Public License *
17
* along with this program; if not, write to the *
18
* Free Software Foundation, Inc., *
19
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *
20
***************************************************************************/
22
#ifndef NOTIFICATION_H
23
#define NOTIFICATION_H
26
#include <QtCore/QHash>
27
#include <QtCore/QObject>
29
#include <QtGui/QIcon>
33
class Notification : public QObject
38
Notification(QObject *parent = 0);
39
virtual ~Notification();
41
QString applicationName() const;
42
QIcon applicationIcon() const;
43
QString message() const;
44
QString summary() const;
48
void setUrgency(int urgency);
51
QHash<QString, QString> actions() const;
52
QStringList actionOrder() const;
54
bool isExpired() const;
56
void setRead(const bool read);
59
void setDeleteTimeout(const int time);
60
int deleteTimeOut() const;
63
virtual void triggerAction(const QString &actionId);
64
virtual void remove();
65
virtual void linkActivated(const QString &link);
66
void startDeletionCountdown();
71
void changed(Notification *notification = 0);
74
* Emitted when the notification is about to be destroyed
76
void notificationDestroyed(Notification *notification = 0);
79
* emitted when the notification wants to hide itself
81
void expired(Notification *notification = 0);
84
void setApplicationName(const QString &applicationName);
85
void setApplicationIcon(const QIcon &applicationIcon);
86
void setMessage(const QString &message);
87
void setSummary(const QString &summary);
88
void setImage(QImage image);
89
void setTimeout(int timeout);
90
void setActions(const QHash<QString, QString> &actions);
91
void setActionOrder(const QStringList &actionOrder);