the-libs/tnotification.h

72 lines
1.4 KiB
C
Raw Normal View History

2017-01-21 08:21:40 -05:00
#ifndef TNOTIFICATION_H
#define TNOTIFICATION_H
#include <QObject>
#include <QDBusMessage>
#include <QDBusConnection>
2017-11-10 05:04:07 -05:00
#include <QCoreApplication>
2017-01-21 08:21:40 -05:00
#include <QDBusPendingReply>
#include <QDBusPendingCallWatcher>
class tNotification : public QObject
{
Q_OBJECT
public:
enum Urgency {
Low = 0,
Normal = 1,
Critical = 2
};
explicit tNotification(QString summary = "", QString text = "", QObject *parent = 0);
void setTransient(bool transient);
bool transient();
void setTimeout(int timeout);
int timeout();
void setSummary(QString summary);
QString summary();
void setText(QString text);
QString text();
void setCategory(QString category);
QString category();
void setSound(QString sound);
QString sound();
void setSoundOn(bool soundOn);
bool soundOn();
void setUrgency(Urgency urgency);
Urgency urgency();
void setAppName(QString appName);
QString appName();
2018-01-14 07:20:08 -05:00
void setAppIcon(QString appIcon);
QString appIcon();
void insertHint(QString key, QVariant hint);
2017-01-21 08:21:40 -05:00
signals:
void actionClicked(QString key);
public slots:
void post(bool deleteWhenDone = true);
private slots:
private:
2018-01-14 07:20:08 -05:00
QString sum, txt, cat, snd, app, aIcon;
2017-01-21 08:21:40 -05:00
bool isTransient = false, noSound = false;
uint replace = 0;
int time = -1;
Urgency urg = Normal;
2018-01-14 07:20:08 -05:00
QVariantMap extraHints;
2017-01-21 08:21:40 -05:00
};
#endif // TNOTIFICATION_H