Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qqstylekitglobal_p.h
Go to the documentation of this file.
1
// Copyright (C) 2025 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
QQSTYLEKITGLOBAL_P_H
6
#
define
QQSTYLEKITGLOBAL_P_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
<
QtLabsStyleKit
/
qtlabsstylekitexports
.
h
>
20
#
include
<
QtQml
/
QtQml
>
21
22
QT_BEGIN_NAMESPACE
23
24
class
Q_LABSSTYLEKIT_EXPORT
QQSK
:
public
QObject
25
{
26
Q_OBJECT
27
28
public
:
29
enum
class
Delegate {
30
NoDelegate = 0x0000,
31
Control = 0x0001,
32
Background = 0x0002,
33
Handle = 0x0004,
34
HandleFirst = 0x0008,
35
HandleSecond = 0x0010,
36
Indicator = 0x0020,
37
IndicatorForeground = 0x0040,
38
IndicatorFirst = 0x0080,
39
IndicatorFirstForeground = 0x0100,
40
IndicatorSecond = 0x0200,
41
IndicatorSecondForeground = 0x0400,
42
// Note: for now, "control.text" is not treated as a separate delegate, but
43
// as an integrated part of "control". Hence, there is no "Text" value in this enum.
44
};
45
Q_DECLARE_FLAGS(Delegates, Delegate)
46
Q_FLAG(Delegate)
47
48
enum
class
PropertyGroup {
49
Control,
50
Background,
51
Foreground,
52
Border,
53
Handle,
54
Image,
55
Indicator,
56
Shadow,
57
Text,
58
PATH_ID_GROUP_COUNT,
59
60
/* Sub types, like states, are a part of a propertys storage ID, not its Path ID.
61
* They appear in the group path, but are handled differently. */
62
DelegateSubtype0,
63
DelegateSubtype1,
64
DelegateSubtype2,
65
66
/* Read options are not a part of either the Path ID nor the Storage ID. They
67
* just offer a convenient API for providing read options when reading a property.
68
* The Global flag is used to signal that a property should be read directly from
69
* the global style, circumventing the local StyleKitReader cache. */
70
GlobalFlag,
71
72
Unspecified
73
};
74
Q_ENUM(PropertyGroup)
75
76
enum
class
PropertyPathFlag : quint8 {
77
NoFlags = 0x0,
78
DelegateSubtype0 = 0x1,
79
DelegateSubtype1 = 0x2,
80
DelegateSubtype2 = 0x4,
81
Global = 0x8
82
};
83
Q_DECLARE_FLAGS(PropertyPathFlags, PropertyPathFlag)
84
Q_FLAG(PropertyPathFlag)
85
86
enum
class
Property {
87
NoProperty,
88
BottomLeftRadius,
89
BottomMargin,
90
BottomPadding,
91
BottomRightRadius,
92
Clip,
93
Color,
94
Data,
95
Delegate,
96
FillMode,
97
FillWidth,
98
FillHeight,
99
Gradient,
100
HOffset,
101
Image,
102
LeftMargin,
103
LeftPadding,
104
Margins,
105
MinimumWidth,
106
MinimumHeight,
107
Opacity,
108
Padding,
109
Radius,
110
RightMargin,
111
RightPadding,
112
Rotation,
113
Scale,
114
Source,
115
Spacing,
116
TopLeftRadius,
117
TopMargin,
118
TopPadding,
119
TopRightRadius,
120
Transition,
121
Variations,
122
Visible,
123
VOffset,
124
Width,
125
Height,
126
Blur,
127
Alignment,
128
Bold,
129
Italic,
130
PointSize,
131
COUNT
132
};
133
Q_ENUM(Property)
134
135
enum
class
StateFlag {
136
Unspecified = 0x000,
137
Normal = 0x001,
138
Pressed = 0x002,
139
Hovered = 0x004,
140
Highlighted = 0x008,
141
Focused = 0x010,
142
Checked = 0x020,
143
Vertical = 0x040,
144
Disabled = 0x080,
145
MAX_STATE = 0x100,
146
};
147
Q_DECLARE_FLAGS(State, StateFlag)
148
Q_FLAG(State)
149
150
enum
class
Subclass {
151
QQStyleKitState,
152
QQStyleKitReader,
153
};
154
Q_ENUM(Subclass)
155
156
public
:
157
template
<
typename
T,
typename
Owner,
typename
... Args>
158
static
inline
T *lazyCreate(T *
const
&ptr,
const
Owner *self, Args&&... args)
159
{
160
if
(!ptr) {
161
auto
*mutableSelf =
const_cast
<Owner *>(self);
162
auto
*&mutablePtr =
const_cast
<T *&>(ptr);
163
mutablePtr =
new
T(std::forward<Args>(args)..., mutableSelf);
164
}
165
return
ptr;
166
}
167
};
168
169
Q_DECLARE_OPERATORS_FOR_FLAGS(QQSK::State)
170
Q_DECLARE_OPERATORS_FOR_FLAGS(QQSK::Delegates)
171
Q_DECLARE_OPERATORS_FOR_FLAGS(QQSK::PropertyPathFlags)
172
173
QT_END_NAMESPACE
174
175
#
endif
// QQSTYLEKITGLOBAL_P_H
QQSK
Definition
qqstylekitglobal_p.h:25
QQStyleKitBorderProperties
Definition
qqstylekitcontrolproperties_p.h:153
QQStyleKitControlProperties
Definition
qqstylekitcontrolproperties_p.h:603
QQStyleKitDelegateContainer
Definition
qqstylekitdelegatecontainer_p.h:27
QQStyleKitDelegateContainer::delegateStyle
QQStyleKitDelegateProperties * delegateStyle() const
Definition
qqstylekitdelegatecontainer.cpp:28
QQStyleKitDelegateContainer::~QQStyleKitDelegateContainer
~QQStyleKitDelegateContainer() override
Definition
qqstylekitdelegatecontainer.cpp:19
QQStyleKitDelegateContainer::componentComplete
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
Definition
qqstylekitdelegatecontainer.cpp:210
QQStyleKitDelegateContainer::quickControl
QObject * quickControl() const
Definition
qqstylekitdelegatecontainer.cpp:51
QQStyleKitDelegateContainer::setQuickControl
void setQuickControl(QObject *control)
Definition
qqstylekitdelegatecontainer.cpp:56
QQStyleKitDelegateContainer::quickControlChanged
void quickControlChanged()
QQStyleKitDelegateContainer::delegateInstanceChanged
void delegateInstanceChanged()
QQStyleKitDelegateContainer::geometryChange
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override
Definition
qqstylekitdelegatecontainer.cpp:276
QQStyleKitDelegateContainer::setDelegateStyle
void setDelegateStyle(QQStyleKitDelegateProperties *delegateProperties)
Definition
qqstylekitdelegatecontainer.cpp:33
QQStyleKitDelegateContainer::delegateInstance
QQuickItem * delegateInstance() const
Definition
qqstylekitdelegatecontainer.cpp:64
QQStyleKitDelegateProperties
Definition
qqstylekitcontrolproperties_p.h:237
QQStyleKitHandleProperties
Definition
qqstylekitcontrolproperties_p.h:405
QQStyleKitImageProperties
Definition
qqstylekitcontrolproperties_p.h:121
QQStyleKitIndicatorProperties
Definition
qqstylekitcontrolproperties_p.h:436
QQStyleKitIndicatorWithSubTypes
Definition
qqstylekitcontrolproperties_p.h:467
QQStyleKitPropertyGroup
Definition
qqstylekitcontrolproperties_p.h:41
QQStyleKitPropertyGroup::setStyleProperty
bool setStyleProperty(QQSK::Property property, T value)
Definition
qqstylekitcontrolproperties_p.h:70
QQStyleKitPropertyGroup::m_groupSpace
QQStyleKitPropertyGroupSpace m_groupSpace
Definition
qqstylekitcontrolproperties_p.h:110
QQStyleKitPropertyGroup::styleProperty
T styleProperty(QQSK::Property property, QQSK::Property alternative=QQSK::Property::NoProperty) const
Definition
qqstylekitcontrolproperties_p.h:55
QQStyleKitPropertyGroup::lazyCreateGroup
T * lazyCreateGroup(T *const &ptr, QQSK::PropertyGroup group) const
Definition
qqstylekitcontrolproperties.cpp:991
QQStyleKitPropertyGroup::forEachRelevantStyleReader
void forEachRelevantStyleReader(const QQStyleKitControl *control, const std::function< void(QQStyleKitReader *reader)> &f) const
Definition
qqstylekitcontrolproperties.cpp:1028
QQStyleKitPropertyGroup::handleStylePropertyChanged
void handleStylePropertyChanged(void(SUBCLASS::*changedSignal)())
Definition
qqstylekitcontrolproperties.cpp:1081
QQStyleKitPropertyGroup::forEachExistingNestedGroup
virtual void forEachExistingNestedGroup(const std::function< void(QQStyleKitPropertyGroup *)> &f) const
Definition
qqstylekitcontrolproperties.cpp:1182
QQStyleKitPropertyGroup::handleStylePropertiesChanged
void handleStylePropertiesChanged(CHANGED_SIGNALS... changedSignals)
Definition
qqstylekitcontrolproperties.cpp:1086
QQStyleKitPropertyGroup::isDefined
bool isDefined(QQSK::Property property) const
Definition
qqstylekitcontrolproperties_p.h:76
QQStyleKitPropertyGroup::controlProperties
QQStyleKitControlProperties * controlProperties() const
Definition
qqstylekitcontrolproperties.cpp:979
QQStyleKitPropertyGroup::isControlProperties
bool isControlProperties() const
Definition
qqstylekitcontrolproperties_p.h:90
QQStyleKitPropertyPath
Definition
qqstylekitpropertypath_p.h:82
QQStyleKitPropertyPath::pathId
PropertyPathId pathId() const
Definition
qqstylekitpropertypath_p.h:104
QQStyleKitPropertyPath::storageIdToPathString
static QString storageIdToPathString(PropertyStorageId storageId)
Definition
qqstylekitpropertypath.cpp:89
QQStyleKitShadowProperties
Definition
qqstylekitcontrolproperties_p.h:180
QQStyleKitTextProperties
Definition
qqstylekitcontrolproperties_p.h:513
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
subtypeStorageSpaceSize
constexpr PropertyPathId subtypeStorageSpaceSize
Definition
qqstylekitpropertypath_p.h:75
stateStorageSpaceSize
constexpr PropertyPathId stateStorageSpaceSize
Definition
qqstylekitpropertypath_p.h:72
maxPropertyStorageSpaceSize
constexpr PropertyPathId maxPropertyStorageSpaceSize
Definition
qqstylekitpropertypath_p.h:69
nestedGroupCount
constexpr PropertyPathId nestedGroupCount
Definition
qqstylekitpropertypath_p.h:70
maxStateCombinationCount
constexpr PropertyPathId maxStateCombinationCount
Definition
qqstylekitpropertypath_p.h:71
nestedGroupsStartSize
constexpr PropertyPathId nestedGroupsStartSize
Definition
qqstylekitpropertypath_p.h:74
subtypeCount
constexpr PropertyPathId subtypeCount
Definition
qqstylekitpropertypath_p.h:73
QQStyleKitPropertyGroupSpace
Definition
qqstylekitpropertypath_p.h:77
QQStyleKitPropertyGroupSpace::start
PropertyPathId start
Definition
qqstylekitpropertypath_p.h:79
QQStyleKitPropertyGroupSpace::size
PropertyPathId size
Definition
qqstylekitpropertypath_p.h:78
qtdeclarative
src
labs
stylekit
qqstylekitglobal_p.h
Generated on
for Qt by
1.18.0