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
qquickiconlabel_p_p.h
Go to the documentation of this file.
1
// Copyright (C) 2017 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
QQUICKICONLABEL_P_P_H
6
#
define
QQUICKICONLABEL_P_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
<
QtQuick
/
private
/
qquickitem_p
.
h
>
20
#
include
<
QtQuickControls2Impl
/
private
/
qtquickcontrols2implglobal_p
.
h
>
21
#
include
<
QtQuickControls2Impl
/
private
/
qquickiconlabel_p
.
h
>
22
23
QT_BEGIN_NAMESPACE
24
25
class
QQuickIconImage;
26
class
QQuickMnemonicLabel;
27
28
class
Q_AUTOTEST_EXPORT
QQuickIconLabelPrivate
:
public
QQuickItemPrivate,
29
public
QSafeQuickItemChangeListener<QQuickIconLabelPrivate>
30
{
31
Q_DECLARE_PUBLIC(QQuickIconLabel)
32
33
public
:
34
~QQuickIconLabelPrivate() override;
35
36
bool
hasIcon()
const
;
37
bool
hasText()
const
;
38
39
bool
createImage();
40
bool
destroyImage();
41
bool
updateImage();
42
void
syncImage();
43
void
updateOrSyncImage();
44
45
bool
createLabel();
46
bool
destroyLabel();
47
bool
updateLabel();
48
void
syncLabel();
49
void
updateOrSyncLabel();
50
51
virtual
void
updateImplicitSize();
52
virtual
void
layout();
53
54
void
watchChanges(QQuickItem *item);
55
void
unwatchChanges(QQuickItem *item);
56
void
setPositioningDirty();
57
58
bool
isLeftToRight()
const
;
59
60
void
itemImplicitWidthChanged(QQuickItem *) override;
61
void
itemImplicitHeightChanged(QQuickItem *) override;
62
void
itemDestroyed(QQuickItem *item) override;
63
64
virtual
void
textChange();
65
virtual
void
displayChange();
66
67
static
void
beginClass(QQuickItem *item);
68
static
void
completeComponent(QQuickItem *item);
69
static
QRectF alignedRect(
bool
mirrored, Qt::Alignment alignment,
const
QSizeF &size,
70
const
QRectF &rectangle);
71
72
bool
mirrored =
false
;
73
// See QQuickMnemonicLabel::m_mnemonicEnabled for why this is true by default.
74
// We just act as an intermediary between types that require an Icon + Label, like Button,
75
// and the QQuickMnemonicLabel itself. Other types like CheckBox use QQuickCheckLabel directly,
76
// which derives from QQuickMnemonicLabel.
77
bool
mnemonicEnabled =
true
;
78
QQuickIconLabel::Display display = QQuickIconLabel::TextBesideIcon;
79
Qt::Alignment alignment = Qt::AlignCenter;
80
qreal spacing = 0;
81
qreal topPadding = 0;
82
qreal leftPadding = 0;
83
qreal rightPadding = 0;
84
qreal bottomPadding = 0;
85
QFont font;
86
QColor color;
87
QString text;
88
QQuickIcon icon;
89
QColor defaultIconColor = Qt::transparent;
90
QQuickIconImage *image =
nullptr
;
91
QQuickMnemonicLabel *label =
nullptr
;
92
};
93
94
QT_END_NAMESPACE
95
96
#
endif
// QQUICKICONLABEL_P_P_H
QQuickIconLabelPrivate
Definition
qquickiconlabel_p_p.h:30
QQuickIconLabel
Definition
qquickiconlabel_p.h:28
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
itemChangeTypes
static const QQuickItemPrivate::ChangeTypes itemChangeTypes
Definition
qquickiconlabel.cpp:313
qtdeclarative
src
quickcontrolsimpl
qquickiconlabel_p_p.h
Generated on
for Qt by
1.18.0