yhkylin-backup-tools/kybackup/gsettingswrapper.h

61 lines
1.6 KiB
C
Raw Normal View History

2021-09-16 16:05:46 +08:00
#ifndef GSETTINGSWRAPPER_H
#define GSETTINGSWRAPPER_H
#include <QHash>
#include <QSize>
2022-02-15 16:51:03 +08:00
#include <QColor>
#include <QGSettings/qgsettings.h>
#include "../common/singleton.h"
2021-09-16 16:05:46 +08:00
class QWidget;
2022-02-15 16:51:03 +08:00
// 主题key
#define ORG_UKUI_STYLE "org.ukui.style"
#define STYLE_NAME "styleName"
#define STYLE_NAME_VALUE_DEFAULT "ukui-default"
#define STYLE_NAME_VALUE_DARK "ukui-dark"
#define STYLE_NAME_VALUE_BLACK "ukui-black"
#define STYLE_NAME_VALUE_LIGHT "ukui-light"
#define STYLE_NAME_VALUE_WHITE "ukui-white"
#define ICON_THEME_NAME "iconThemeName"
#define TRANSPARENCY_NAME "transparency"
#define COLOR_QT_KEY "themeColor"
2022-02-15 16:51:03 +08:00
// 颜色
// 浅灰
#define COLOR_WINDOW_LIGHT_LEFT "#FAFAFA"
// 深灰
#define COLOR_WINDOW_DARK_LEFT "#232426"
// #define COLOR_WINDOW_DARK_LEFT "#242424"
// 白色
#define COLOR_WINDOW_LIGHT_RIGHT "#FFFFFF"
// 黑色
#define COLOR_WINDOW_DARK_RIGHT "#121212"
2021-09-16 16:05:46 +08:00
/**
* @brief 使
*/
2022-02-15 16:51:03 +08:00
class GSettingsWrapper : public Singleton<GSettingsWrapper>
2021-09-16 16:05:46 +08:00
{
public:
2022-02-15 16:51:03 +08:00
GSettingsWrapper(token);
virtual ~GSettingsWrapper();
2022-02-21 11:04:44 +08:00
/**
* @brief
* @return true-false-
*/
bool isDarkTheme() {
return m_isDarkTheme;
}
2022-02-15 16:51:03 +08:00
public:
QGSettings *m_pGsettingThemeData;
2022-02-21 11:04:44 +08:00
bool m_isDarkTheme;
2021-09-16 16:05:46 +08:00
};
2023-03-17 17:59:26 +08:00
#define g_GSettingWrapper GSettingsWrapper::instance()
2022-02-15 16:51:03 +08:00
2021-09-16 16:05:46 +08:00
#endif // GSETTINGSWRAPPER_H