2011-04-22 16:03:38 +02:00
|
|
|
#ifndef DESKTOPNOTIFICATIONSFACTORY_H
|
|
|
|
#define DESKTOPNOTIFICATIONSFACTORY_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QDBusInterface>
|
|
|
|
#include <QStringList>
|
2011-04-23 22:33:25 +02:00
|
|
|
#include <QSettings>
|
|
|
|
#include <QPoint>
|
|
|
|
#include <QTimer>
|
|
|
|
#include <QPointer>
|
2011-04-22 16:03:38 +02:00
|
|
|
|
2011-04-23 22:33:25 +02:00
|
|
|
class DesktopNotification;
|
2011-04-22 16:03:38 +02:00
|
|
|
class DesktopNotificationsFactory : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2011-04-23 22:33:25 +02:00
|
|
|
enum Type { DesktopNative, PopupWidget };
|
|
|
|
explicit DesktopNotificationsFactory(QObject* parent = 0);
|
|
|
|
void notify(const QPixmap &icon, const QString &heading, const QString &text);
|
2011-04-22 16:03:38 +02:00
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
public slots:
|
2011-04-23 22:33:25 +02:00
|
|
|
void loadSettings();
|
2011-04-22 16:03:38 +02:00
|
|
|
|
2011-04-23 22:33:25 +02:00
|
|
|
private:
|
|
|
|
bool m_enabled;
|
|
|
|
int m_timeout;
|
|
|
|
Type m_notifType;
|
|
|
|
QPoint m_position;
|
|
|
|
|
|
|
|
QPointer<DesktopNotification> m_desktopNotif;
|
|
|
|
unsigned int m_uint;
|
2011-04-22 16:03:38 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // DESKTOPNOTIFICATIONSFACTORY_H
|