QWindowKit  1.5.1.0
Cross-platform window customization framework
Loading...
Searching...
No Matches
styleagent.h
1// Copyright (C) 2023-present Stdware Collections (https://www.github.com/stdware)
2// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
3// SPDX-License-Identifier: Apache-2.0
4
5#ifndef STYLEAGENT_H
6#define STYLEAGENT_H
7
8#include <memory>
9
10#include <QtCore/QObject>
11#include <QtGui/QColor>
12
13#include <QWKCore/qwkglobal.h>
14
15namespace QWK {
16
17 class StyleAgentPrivate;
18
19 class QWK_CORE_EXPORT StyleAgent : public QObject {
20 Q_OBJECT
21 Q_DECLARE_PRIVATE(StyleAgent)
22 public:
23 explicit StyleAgent(QObject *parent = nullptr);
24 ~StyleAgent() override;
25
26 enum SystemTheme {
27 Unknown,
28 Light,
29 Dark,
30 HighContrast,
31 };
32 Q_ENUM(SystemTheme)
33
34 public:
35 SystemTheme systemTheme() const;
36 QColor systemAccentColor() const;
37
38 Q_SIGNALS:
41
42 protected:
43 StyleAgent(StyleAgentPrivate &d, QObject *parent = nullptr);
44
45 const std::unique_ptr<StyleAgentPrivate> d_ptr;
46 };
47
48}
49
50#endif // STYLEAGENT_H
StyleAgent provides some features related to system theme.
Definition styleagent.h:19
~StyleAgent() override
void systemThemeChanged()
void systemAccentColorChanged()
QWindowKit namespace.
Definition abstractwindowcontext.cpp:13