1 Star 0 Fork 127

王保强/qt-notify

forked from 终端组/qt-notify 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
notifymanager.h 918 Bytes
一键复制 编辑 原始数据 按行查看 历史
潘昕 提交于 2016-10-14 11:34 . INIT
#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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/wang-baoqiang/qt-notify.git
git@gitee.com:wang-baoqiang/qt-notify.git
wang-baoqiang
qt-notify
qt-notify
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385