QtCanpool 3.3.0
载入中...
搜索中...
未找到
windowstyleagent.cpp
浏览该文件的文档.
1#include "windowstyleagent.h"
3#include <QtCore/QVariant>
4
6
16WindowStyleAgentPrivate::WindowStyleAgentPrivate()
17{
18}
19
20WindowStyleAgentPrivate::~WindowStyleAgentPrivate()
21{
22 removeSystemThemeHook();
23}
24
25void WindowStyleAgentPrivate::init()
26{
27 setupSystemThemeHook();
28}
29
30void WindowStyleAgentPrivate::notifyThemeChanged(WindowStyleAgent::SystemTheme theme)
31{
32 if (theme == systemTheme)
33 return;
34 systemTheme = theme;
35
37 Q_EMIT q->systemThemeChanged();
38}
39
44WindowStyleAgent::WindowStyleAgent(QObject *parent)
46{
47}
48
55
60{
61 Q_D(const WindowStyleAgent);
62 return d->systemTheme;
63}
64
69 : QObject(parent)
70 , d_ptr(&d)
71{
72 d.q_ptr = this;
73
74 d.init();
75}
76
WindowStyleAgent provides some features related to system theme.
WindowStyleAgent(QObject *parent=nullptr)
Constructor.
SystemTheme systemTheme() const
Returns the system theme.
~WindowStyleAgent() override
Destructor.
#define QX_WINDOW_END_NAMESPACE
#define QX_WINDOW_BEGIN_NAMESPACE