10#include "dtknotification_global.h"
12DNOTIFICATIONS_BEGIN_NAMESPACE
15class DNotificationAppConfigPrivate;
20 Q_PROPERTY(QString appName READ appName)
21 Q_PROPERTY(QString appIcon READ appIcon)
22 Q_PROPERTY(
bool notificationEnabled READ notificationEnabled WRITE setNotificationEnabled NOTIFY notificationEnabledChanged)
23 Q_PROPERTY(
bool previewEnabled READ previewEnabled WRITE setPreviewEnabled NOTIFY previewEnabledChanged)
24 Q_PROPERTY(
bool soundEnabled READ soundEnabled WRITE setSoundEnabled NOTIFY soundEnabledChanged)
25 Q_PROPERTY(
bool showInNotificationCenterEnabled READ showInNotificationCenterEnabled WRITE setShowInNotificationCenterEnabled NOTIFY showInNotificationCenterEnabledChanged)
26 Q_PROPERTY(
bool showInLockScreenEnabled READ showInLockScreenEnabled WRITE setShowInLockScreenEnabled NOTIFY showInLockScreenEnabledChanged)
60 QScopedPointer<DNotificationAppConfigPrivate> d_ptr;
63typedef QSharedPointer<DNotificationAppConfig> DNotificationAppConfigPtr;
65DNOTIFICATIONS_END_NAMESPACE
DAppNotificationConfig类
Definition: dnotificationappconfig.h:18
QString appIcon() const
应用图标名称
void notificationEnabledChanged(const QString &id, const bool enabled)
是否打开通知的配置发生变化后发出的信号
DExpected< void > setNotificationEnabled(bool enabled)
设置是否打开通知
DExpected< void > setPreviewEnabled(const bool enabled)
设置是否打开预览
DExpected< void > setShowInLockScreenEnabled(const bool enabled)
设置是否在锁屏界面显示
bool soundEnabled() const
判断是否打开声音
bool notificationEnabled() const
判断是否打开通知
bool showInNotificationCenterEnabled() const
判断是否在通知中心显示
void soundEnabledChanged(const QString &id, const bool enabled)
是否打开声音的配置发生变化后发出的信号
void previewEnabledChanged(const QString &id, const bool enabled)
是否打开预览的配置发生变化后发出的信号
void showInLockScreenEnabledChanged(const QString &id, const bool enabled)
是否在锁屏界面展示的配置发生变化后发出的信号
DExpected< void > setSoundEnabled(const bool enabled)
设置是否打开声音
void showInNotificationCenterEnabledChanged(const QString &id, const bool enabled)
是否在通知中心展示的配置发生变化后发出的信号
QString appName() const
应用名称
bool showInLockScreenEnabled() const
判断是否在锁屏界面显示
DExpected< void > setShowInNotificationCenterEnabled(const bool enabled)
设置是否在通知中心显示
bool previewEnabled() const
判断是否打开预览
DNotificationAppConfig(const QString &id, QObject *parent=nullptr)
构造通知应用配置对象