yhkylin-backup-tools/kybackup/gsettingswrapper.h

61 lines
1.6 KiB
C
Raw Normal View History

2022-11-01 10:40:05 +08:00
#ifndef GSETTINGSWRAPPER_H
#define GSETTINGSWRAPPER_H
#include <QHash>
#include <QSize>
#include <QColor>
#include <QGSettings/qgsettings.h>
#include "../common/singleton.h"
class QWidget;
// 主题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"
// 颜色
// 浅灰
#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"
/**
* @brief 使
*/
class GSettingsWrapper : public Singleton<GSettingsWrapper>
{
public:
GSettingsWrapper(token);
virtual ~GSettingsWrapper();
/**
* @brief
* @return true-false-
*/
bool isDarkTheme() {
return m_isDarkTheme;
}
public:
QGSettings *m_pGsettingThemeData;
bool m_isDarkTheme;
};
#define g_GSettingWrapper GSettingsWrapper::inst()
#endif // GSETTINGSWRAPPER_H