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 QQUICKPANE_P_H
5#define QQUICKPANE_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 <QtQuickTemplates2/private/qquickcontrol_p.h>
19#include <QtQml/qqmllist.h>
20
21QT_BEGIN_NAMESPACE
22
23class QQuickPanePrivate;
24
25class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickPane : public QQuickControl
26{
27 Q_OBJECT
28 Q_PROPERTY(qreal contentWidth READ contentWidth WRITE setContentWidth RESET resetContentWidth NOTIFY contentWidthChanged FINAL)
29 Q_PROPERTY(qreal contentHeight READ contentHeight WRITE setContentHeight RESET resetContentHeight NOTIFY contentHeightChanged FINAL)
30 Q_PRIVATE_PROPERTY(QQuickPane::d_func(), QQmlListProperty<QObject> contentData READ contentData FINAL)
31 Q_PRIVATE_PROPERTY(QQuickPane::d_func(), QQmlListProperty<QQuickItem> contentChildren READ contentChildren NOTIFY contentChildrenChanged FINAL)
32 Q_CLASSINFO("DefaultProperty", "contentData")
33 QML_NAMED_ELEMENT(Pane)
34 QML_ADDED_IN_VERSION(2, 0)
35
36public:
37 explicit QQuickPane(QQuickItem *parent = nullptr);
38 ~QQuickPane();
39
40 qreal contentWidth() const;
41 void setContentWidth(qreal width);
42 void resetContentWidth();
43
44 qreal contentHeight() const;
45 void setContentHeight(qreal height);
46 void resetContentHeight();
47
48Q_SIGNALS:
49 void contentWidthChanged();
50 void contentHeightChanged();
51 void contentChildrenChanged();
52
53protected:
54 QQuickPane(QQuickPanePrivate &dd, QQuickItem *parent);
55
56 void componentComplete() override;
57
58 void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override;
59 virtual void contentSizeChange(const QSizeF &newSize, const QSizeF &oldSize);
60
61#if QT_CONFIG(accessibility)
62 QAccessible::Role accessibleRole() const override;
63#endif
64
65private:
66 Q_DISABLE_COPY(QQuickPane)
67 Q_DECLARE_PRIVATE(QQuickPane)
68};
69
70QT_END_NAMESPACE
71
72QML_DECLARE_TYPE(QQuickPane)
73
74#endif // QQUICKPANE_P_H
75

source code of qtdeclarative/src/quicktemplates/qquickpane_p.h