Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquicksystempalette_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QQUICKSYSTEMPALETTE_H
6#define QQUICKSYSTEMPALETTE_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <private/qtquickglobal_p.h>
20
21#include <QtCore/qobject.h>
22
23#include <QtGui/qpalette.h>
24
25#include <QtQml/qqml.h>
26
27QT_BEGIN_NAMESPACE
28
29class QQuickSystemPalettePrivate;
30class Q_QUICK_EXPORT QQuickSystemPalette : public QObject
31{
32 Q_OBJECT
33 Q_DECLARE_PRIVATE(QQuickSystemPalette)
34
35 Q_PROPERTY(QQuickSystemPalette::ColorGroup colorGroup READ colorGroup WRITE setColorGroup NOTIFY paletteChanged)
36 Q_PROPERTY(QColor window READ window NOTIFY paletteChanged)
37 Q_PROPERTY(QColor windowText READ windowText NOTIFY paletteChanged)
38 Q_PROPERTY(QColor base READ base NOTIFY paletteChanged)
39 Q_PROPERTY(QColor text READ text NOTIFY paletteChanged)
40 Q_PROPERTY(QColor alternateBase READ alternateBase NOTIFY paletteChanged)
41 Q_PROPERTY(QColor button READ button NOTIFY paletteChanged)
42 Q_PROPERTY(QColor buttonText READ buttonText NOTIFY paletteChanged)
43 Q_PROPERTY(QColor light READ light NOTIFY paletteChanged)
44 Q_PROPERTY(QColor midlight READ midlight NOTIFY paletteChanged)
45 Q_PROPERTY(QColor dark READ dark NOTIFY paletteChanged)
46 Q_PROPERTY(QColor mid READ mid NOTIFY paletteChanged)
47 Q_PROPERTY(QColor shadow READ shadow NOTIFY paletteChanged)
48 Q_PROPERTY(QColor highlight READ highlight NOTIFY paletteChanged)
49 Q_PROPERTY(QColor highlightedText READ highlightedText NOTIFY paletteChanged)
50 Q_PROPERTY(QColor placeholderText READ placeholderText NOTIFY paletteChanged REVISION(6, 2))
51 Q_PROPERTY(QColor accent READ accent NOTIFY paletteChanged REVISION(6, 7) FINAL)
52 QML_NAMED_ELEMENT(SystemPalette)
53 QML_ADDED_IN_VERSION(2, 0)
54
55public:
56 QQuickSystemPalette(QObject *parent=nullptr);
57
58 enum ColorGroup { Active = QPalette::Active, Inactive = QPalette::Inactive, Disabled = QPalette::Disabled };
59 Q_ENUM(ColorGroup)
60
61 QColor window() const;
62 QColor windowText() const;
63
64 QColor base() const;
65 QColor text() const;
66 QColor alternateBase() const;
67
68 QColor button() const;
69 QColor buttonText() const;
70
71 QColor light() const;
72 QColor midlight() const;
73 QColor dark() const;
74 QColor mid() const;
75 QColor shadow() const;
76
77 QColor highlight() const;
78 QColor highlightedText() const;
79
80 QColor placeholderText() const;
81 QColor accent() const;
82
83 QQuickSystemPalette::ColorGroup colorGroup() const;
84 void setColorGroup(QQuickSystemPalette::ColorGroup);
85
86Q_SIGNALS:
87 void paletteChanged();
88};
89
90QT_END_NAMESPACE
91
92#endif // QQUICKSYSTEMPALETTE_H