-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotifymanager.h
45 lines (36 loc) · 918 Bytes
/
notifymanager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef NOTIFYMANAGER_H
#define NOTIFYMANAGER_H
#include <QObject>
#include <QQueue>
#include "notify.h"
class NotifyManager : public QObject
{
Q_OBJECT
public:
explicit NotifyManager( QObject *parent = 0);
void notify(const QString &title, const QString &body, const QString &icon, const QString url);
void setMaxCount(int count);
void setDisplayTime(int ms);
private:
class NotifyData {
public:
NotifyData(const QString &icon, const QString &title, const QString &body, const QString url):
icon(icon),
title(title),
body(body),
url(url)
{
}
QString icon;
QString title;
QString body;
QString url;
};
void rearrange();
void showNext();
QQueue<NotifyData> dataQueue;
QList<Notify*> notifyList;
int maxCount;
int displayTime;
};
#endif // NOTIFYMANAGER_H