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
qquickgroupbox_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 QQUICKGROUPBOX_P_H
6#define QQUICKGROUPBOX_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 <QtQuickTemplates2/private/qquickframe_p.h>
20
21QT_BEGIN_NAMESPACE
22
23class QQuickGroupBoxPrivate;
24
25class Q_QUICKTEMPLATES2_EXPORT QQuickGroupBox : public QQuickFrame
26{
27 Q_OBJECT
28 Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged FINAL)
29 Q_PROPERTY(QQuickItem *label READ label WRITE setLabel NOTIFY labelChanged FINAL)
30 // 2.5 (Qt 5.12)
31 Q_PROPERTY(qreal implicitLabelWidth READ implicitLabelWidth NOTIFY implicitLabelWidthChanged FINAL REVISION(2, 5))
32 Q_PROPERTY(qreal implicitLabelHeight READ implicitLabelHeight NOTIFY implicitLabelHeightChanged FINAL REVISION(2, 5))
33 Q_CLASSINFO("DeferredPropertyNames", "background,contentItem,label")
34 QML_NAMED_ELEMENT(GroupBox)
35 QML_ADDED_IN_VERSION(2, 0)
36
37public:
38 explicit QQuickGroupBox(QQuickItem *parent = nullptr);
39 ~QQuickGroupBox();
40
41 QString title() const;
42 void setTitle(const QString &title);
43
44 QQuickItem *label() const;
45 void setLabel(QQuickItem *label);
46
47 // 2.5 (Qt 5.12)
48 qreal implicitLabelWidth() const;
49 qreal implicitLabelHeight() const;
50
51Q_SIGNALS:
52 void titleChanged();
53 void labelChanged();
54 // 2.5 (Qt 5.12)
55 Q_REVISION(2, 5) void implicitLabelWidthChanged();
56 Q_REVISION(2, 5) void implicitLabelHeightChanged();
57
58protected:
59 void componentComplete() override;
60
61 QFont defaultFont() const override;
62
63#if QT_CONFIG(accessibility)
64 QAccessible::Role accessibleRole() const override;
65 void accessibilityActiveChanged(bool active) override;
66#endif
67
68private:
69 Q_DISABLE_COPY(QQuickGroupBox)
70 Q_DECLARE_PRIVATE(QQuickGroupBox)
71};
72
73QT_END_NAMESPACE
74
75#endif // QQUICKGROUPBOX_P_H
Visual frame and title for a logical group of controls.
QQuickDeferredPointer< QQuickItem > label
void executeLabel(bool complete=false)
void itemDestroyed(QQuickItem *item) override
void itemImplicitWidthChanged(QQuickItem *item) override
void itemImplicitHeightChanged(QQuickItem *item) override
QPalette defaultPalette() const override
static QString labelName()