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