| 1 |
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd. |
| 2 |
// |
| 3 |
// SPDX-License-Identifier: LGPL-3.0-or-later |
| 4 |
|
| 5 |
#ifndef DNOTIFYSENDER_H |
| 6 |
#define DNOTIFYSENDER_H |
| 7 |
|
| 8 |
#include "dtkcore_global.h" |
| 9 |
|
| 10 |
#include <QDBusPendingCall> |
| 11 |
#include <memory> |
| 12 |
|
| 13 |
DCORE_BEGIN_NAMESPACE |
| 14 |
|
| 15 |
namespace DUtil { |
| 16 |
struct DNotifyData; |
| 17 |
class LIBDTKCORESHARED_EXPORT DNotifySender { |
| 18 |
public: |
| 19 |
DNotifySender(const QString &summary); |
| 20 |
DNotifySender appName(const QString &appName = QString()); |
| 21 |
DNotifySender appIcon(const QString &appIcon = QString()); |
| 22 |
DNotifySender appBody(const QString &appBody = QString()); |
| 23 |
DNotifySender replaceId(const uint replaceId = 0); |
| 24 |
DNotifySender timeOut(const int timeOut = -1); |
| 25 |
DNotifySender actions(const QStringList &actions = QStringList()); |
| 26 |
DNotifySender hints(const QVariantMap &hints = QVariantMap()); |
| 27 |
QDBusPendingCall call(); |
| 28 |
|
| 29 |
private: |
| 30 |
std::shared_ptr<DNotifyData> m_dbusData; |
| 31 |
}; |
| 32 |
} // namespace DUtil |
| 33 |
|
| 34 |
DCORE_END_NAMESPACE |
| 35 |
|
| 36 |
#endif // DNOTIFYSENDER_H |