1// Copyright (C) 2020 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 QQUICKSTYLEITEMGROUPBOX_H
5#define QQUICKSTYLEITEMGROUPBOX_H
6
7#include "qquickstyleitem.h"
8#include <QtQuickTemplates2/private/qquickgroupbox_p.h>
9
10QT_BEGIN_NAMESPACE
11
12class QQuickStyleItemGroupBox : public QQuickStyleItem
13{
14 Q_OBJECT
15 Q_PROPERTY(QQuickStyleMargins groupBoxPadding READ groupBoxPadding NOTIFY groupBoxPaddingChanged)
16 Q_PROPERTY(QPointF labelPos READ labelPos NOTIFY labelPosChanged)
17 QML_NAMED_ELEMENT(GroupBox)
18
19public:
20 QQuickStyleMargins groupBoxPadding() const;
21 QPointF labelPos() const;
22 QFont styleFont(QQuickItem *control) const override;
23
24Q_SIGNALS:
25 void groupBoxPaddingChanged();
26 void labelPosChanged();
27
28protected:
29 void paintEvent(QPainter *painter) const override;
30 StyleItemGeometry calculateGeometry() override;
31
32private:
33 QQuickStyleMargins m_groupBoxPadding;
34 QPointF m_labelPos;
35
36 void initStyleOption(QStyleOptionGroupBox &styleOption) const;
37};
38
39QT_END_NAMESPACE
40
41#endif // QQUICKSTYLEITEMGROUPBOX_H
42

source code of qtdeclarative/src/quicknativestyle/items/qquickstyleitemgroupbox.h