1 Star 2 Fork 11

morixinguan / 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
C++
1
https://gitee.com/morixinguan/workxp.git
git@gitee.com:morixinguan/workxp.git
morixinguan
workxp
WorkXP
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891