1 Star 0 Fork 14

yupeng/WorkXP

forked from ITVENTI科技/WorkXP 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
thememanager.h 851 Bytes
一键复制 编辑 原始数据 按行查看 历史
huanglingzhi 提交于 2020-06-29 18:07 . Let's roll
#ifndef THEMEMANAGER_H
#define THEMEMANAGER_H
#include <QObject>
#include <QPixmap>
#include <QColor>
#include <QPalette>
class MainWindow;
#define THEME ThemeManager::instance()
class ThemeManager : public QObject
{
Q_OBJECT
static ThemeManager * m_instance;
QString m_defaultStyle;
QPalette m_defaultPalette;
QPixmap m_rotateCursorPm;
QPixmap m_drawingCursorPm;
public:
static ThemeManager *instance(QObject *mainwindow = nullptr);
inline QPixmap rotateCursorPm(){return m_rotateCursorPm;}
inline QPixmap drawingCursorPm(){return m_drawingCursorPm;}
signals:
void styleApplied();
private:
//only allow singleton instanc
ThemeManager();
void apply();
QColor parseColor(const QString & str);
public slots:
void themeChanged(int arg1);
};
#endif // THEMEMANAGER_H
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/yujingpeng/workxp.git
git@gitee.com:yujingpeng/workxp.git
yujingpeng
workxp
WorkXP
master

搜索帮助