Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qquicklabel_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
4#ifndef QQUICKLABEL_P_H
5#define QQUICKLABEL_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtGui/qpalette.h>
19#include <QtQuick/private/qquicktext_p.h>
20#include <QtQuickTemplates2/private/qtquicktemplates2global_p.h>
21
23
25
26class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickLabel : public QQuickText
27{
29 Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged) // override
30 Q_PROPERTY(QQuickItem *background READ background WRITE setBackground NOTIFY backgroundChanged FINAL)
31 // 2.5 (Qt 5.12)
32 Q_PROPERTY(qreal implicitBackgroundWidth READ implicitBackgroundWidth NOTIFY implicitBackgroundWidthChanged FINAL REVISION(2, 5))
33 Q_PROPERTY(qreal implicitBackgroundHeight READ implicitBackgroundHeight NOTIFY implicitBackgroundHeightChanged FINAL REVISION(2, 5))
34 Q_PROPERTY(qreal topInset READ topInset WRITE setTopInset RESET resetTopInset NOTIFY topInsetChanged FINAL REVISION(2, 5))
35 Q_PROPERTY(qreal leftInset READ leftInset WRITE setLeftInset RESET resetLeftInset NOTIFY leftInsetChanged FINAL REVISION(2, 5))
36 Q_PROPERTY(qreal rightInset READ rightInset WRITE setRightInset RESET resetRightInset NOTIFY rightInsetChanged FINAL REVISION(2, 5))
37 Q_PROPERTY(qreal bottomInset READ bottomInset WRITE setBottomInset RESET resetBottomInset NOTIFY bottomInsetChanged FINAL REVISION(2, 5))
38 Q_CLASSINFO("DeferredPropertyNames", "background")
41
42public:
43 explicit QQuickLabel(QQuickItem *parent = nullptr);
45
46 QFont font() const;
47 void setFont(const QFont &font);
48
49 QQuickItem *background() const;
50 void setBackground(QQuickItem *background);
51
52 // 2.5 (Qt 5.12)
53 qreal implicitBackgroundWidth() const;
54 qreal implicitBackgroundHeight() const;
55
56 qreal topInset() const;
57 void setTopInset(qreal inset);
58 void resetTopInset();
59
60 qreal leftInset() const;
61 void setLeftInset(qreal inset);
62 void resetLeftInset();
63
64 qreal rightInset() const;
65 void setRightInset(qreal inset);
66 void resetRightInset();
67
68 qreal bottomInset() const;
69 void setBottomInset(qreal inset);
70 void resetBottomInset();
71
75 // 2.5 (Qt 5.12)
76 Q_REVISION(2, 5) void implicitBackgroundWidthChanged();
77 Q_REVISION(2, 5) void implicitBackgroundHeightChanged();
78 Q_REVISION(2, 5) void topInsetChanged();
79 Q_REVISION(2, 5) void leftInsetChanged();
80 Q_REVISION(2, 5) void rightInsetChanged();
81 Q_REVISION(2, 5) void bottomInsetChanged();
82
83protected:
84 void classBegin() override;
85 void componentComplete() override;
86
87 void itemChange(ItemChange change, const ItemChangeData &value) override;
88 void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
89 virtual void insetChange(const QMarginsF &newInset, const QMarginsF &oldInset);
90
92 Q_DISABLE_COPY(QQuickLabel)
93 Q_DECLARE_PRIVATE(QQuickLabel)
94};
95
97
99
100#endif // QQUICKLABEL_P_H
\reentrant
Definition qfont.h:20
\inmodule QtCore
Definition qmargins.h:274
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:64
ItemChange
Used in conjunction with QQuickItem::itemChange() to notify the item about certain types of changes.
Definition qquickitem.h:143
void backgroundChanged()
Q_REVISION(2, 5) void implicitBackgroundWidthChanged()
void fontChanged()
void setFont(const QFont &font)
\inmodule QtCore\reentrant
Definition qrect.h:483
Combined button and popup list for selecting options.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
#define QML_DECLARE_TYPE(TYPE)
Definition qqml.h:19
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_REVISION(...)
#define Q_CLASSINFO(name, value)
#define Q_SIGNALS
double qreal
Definition qtypes.h:92
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent
\inmodule QtQuick
Definition qquickitem.h:158