ukui-notification/libukui-notification/notification-settings/settings-properties.h

66 lines
2.9 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
//
//
#ifndef SETTINGS_PROPERTIES
#define SETTINGS_PROPERTIES
#include <QMap>
#include <QVariant>
namespace UkuiNotification {
namespace SettingsProperty {
Q_NAMESPACE
/**
* @brief The Property enum contains all settings property types
*
*/
enum Property {
Invalid = 0,
//Global settings about DND mode
ScheduleTurnOnDND, //是否在时间段内自动开启勿扰模式bool类型默认值false
ScheduleTurnOnDNDTime, //勿扰模式开启时间QDateTime类型默认值00:00
ScheduleTurnOffDNDTime, //勿扰模式结束时间QDateTime类型默认值00:00
DNDWhileMultiScreen, //多屏启动时是否启动勿扰模式bool类型默认值false
DNDWhileFullScreen, //全屏状态下是否启动勿扰模式bool类型默认值false
NotifyAlarmWhileDND, //勿扰模式下是否允许闹钟提示bool类型默认值false
//Show notifications from applications
ReceiveNotificationsFromApps, //是否获取来自应用程序的通知bool类型默认值true
//single app notification settings
AllowNotify = ReceiveNotificationsFromApps + 1, //是否接收当前应用通知bool类型默认值true
AllowSound, //是否打开通知提示声bool类型默认值true
ShowContentOnLockScreen, //锁屏界面是否显示通知内容信息bool类型默认值false
ShowNotificationOnLockScreen, //锁屏界面是否显示通知bool类型默认值false
PopupStyle, //通知样式appNotificationStyle类型默认值Mutative
//single app notification settings中的 popupStyle 类型取值范围
TransientPopup = PopupStyle +1, //横幅模式,显示在右上角,会自动消失
ResidentPopup, //提示模式,会保留在屏幕上,直到被关闭
NoPopup //无,通知不会显示在屏幕上,但是会进入通知中心
};
typedef QMap<Property, QVariant> PropertyMap;
}
static const QList<SettingsProperty::Property> GLOBAL_SETTINGS {
SettingsProperty::ScheduleTurnOnDND,
SettingsProperty::ScheduleTurnOnDNDTime,
SettingsProperty::ScheduleTurnOffDNDTime,
SettingsProperty::DNDWhileMultiScreen,
SettingsProperty::DNDWhileFullScreen,
SettingsProperty::NotifyAlarmWhileDND,
SettingsProperty::ReceiveNotificationsFromApps
};
static const QList<SettingsProperty::Property> SINGLE_APPLICATION_SETTINGS {
SettingsProperty::AllowNotify,
SettingsProperty::AllowSound,
SettingsProperty::ShowContentOnLockScreen,
SettingsProperty::ShowNotificationOnLockScreen,
SettingsProperty::PopupStyle,
};
} // namespace UkuiNotification
Q_DECLARE_METATYPE(UkuiNotification::SettingsProperty::Property)
#endif