Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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_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);
44 ~QQuickLabel();
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
73 void fontChanged();
74 void backgroundChanged();
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
98#endif // QQUICKLABEL_P_H
\reentrant
Definition qfont.h:22
\inmodule QtCore
Definition qmargins.h:270
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
ItemChange
Used in conjunction with QQuickItem::itemChange() to notify the item about certain types of changes.
Definition qquickitem.h:144
\inmodule QtCore\reentrant
Definition qrect.h:484
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
#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:187
#define explicit
\inmodule QtQuick
Definition qquickitem.h:159