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 | |
21 | QT_BEGIN_NAMESPACE |
22 | |
23 | class QQuickPanePrivate; |
24 | |
25 | class 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 | |
36 | public: |
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 | |
48 | Q_SIGNALS: |
49 | void contentWidthChanged(); |
50 | void contentHeightChanged(); |
51 | void contentChildrenChanged(); |
52 | |
53 | protected: |
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 | |
65 | private: |
66 | Q_DISABLE_COPY(QQuickPane) |
67 | Q_DECLARE_PRIVATE(QQuickPane) |
68 | }; |
69 | |
70 | QT_END_NAMESPACE |
71 | |
72 | QML_DECLARE_TYPE(QQuickPane) |
73 | |
74 | #endif // QQUICKPANE_P_H |
75 | |