diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-11-04 10:49:42 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-11-06 10:17:22 +0000 |
commit | 430fe83ecb7106118cbebd735637aee9e9253914 (patch) | |
tree | c27f1c2a5ae6a2b740467375439d8eac021e06e0 /src/quicktemplates2/qquickpage.cpp | |
parent | 6470a54ed34523822c50ac846a17a9f76564cf58 (diff) |
Re-order all revisioned members and add explanatory comments
We've come to realize that even though it's tempting to group similar
properties together, organizing the API so that revisions are grouped
together makes future maintenance more pleasant. It's a lot easier to
to see what was added and when.
Change-Id: I47ba7725260f2c259048848cc2a9b17bce2f01c7
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickpage.cpp')
-rw-r--r-- | src/quicktemplates2/qquickpage.cpp | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/src/quicktemplates2/qquickpage.cpp b/src/quicktemplates2/qquickpage.cpp index ecc5a9c9..50050df3 100644 --- a/src/quicktemplates2/qquickpage.cpp +++ b/src/quicktemplates2/qquickpage.cpp @@ -233,6 +233,51 @@ void QQuickPage::setFooter(QQuickItem *footer) } /*! + \qmlproperty list<Object> QtQuick.Controls::Page::contentData + \default + + This property holds the list of content data. + + The list contains all objects that have been declared in QML as children + of the container. + + \note Unlike \c contentChildren, \c contentData does include non-visual QML + objects. + + \sa Item::data, contentChildren +*/ +QQmlListProperty<QObject> QQuickPage::contentData() +{ + return QQmlListProperty<QObject>(contentItem(), nullptr, + QQuickItemPrivate::data_append, + QQuickItemPrivate::data_count, + QQuickItemPrivate::data_at, + QQuickItemPrivate::data_clear); +} + +/*! + \qmlproperty list<Item> QtQuick.Controls::Page::contentChildren + + This property holds the list of content children. + + The list contains all items that have been declared in QML as children + of the page. + + \note Unlike \c contentData, \c contentChildren does not include non-visual + QML objects. + + \sa Item::children, contentData +*/ +QQmlListProperty<QQuickItem> QQuickPage::contentChildren() +{ + return QQmlListProperty<QQuickItem>(contentItem(), nullptr, + QQuickItemPrivate::children_append, + QQuickItemPrivate::children_count, + QQuickItemPrivate::children_at, + QQuickItemPrivate::children_clear); +} + +/*! \qmlproperty real QtQuick.Controls::Page::contentWidth \since QtQuick.Controls 2.1 (Qt 5.8) @@ -282,51 +327,6 @@ void QQuickPage::setContentHeight(qreal height) emit contentHeightChanged(); } -/*! - \qmlproperty list<Object> QtQuick.Controls::Page::contentData - \default - - This property holds the list of content data. - - The list contains all objects that have been declared in QML as children - of the container. - - \note Unlike \c contentChildren, \c contentData does include non-visual QML - objects. - - \sa Item::data, contentChildren -*/ -QQmlListProperty<QObject> QQuickPage::contentData() -{ - return QQmlListProperty<QObject>(contentItem(), nullptr, - QQuickItemPrivate::data_append, - QQuickItemPrivate::data_count, - QQuickItemPrivate::data_at, - QQuickItemPrivate::data_clear); -} - -/*! - \qmlproperty list<Item> QtQuick.Controls::Page::contentChildren - - This property holds the list of content children. - - The list contains all items that have been declared in QML as children - of the page. - - \note Unlike \c contentData, \c contentChildren does not include non-visual - QML objects. - - \sa Item::children, contentData -*/ -QQmlListProperty<QQuickItem> QQuickPage::contentChildren() -{ - return QQmlListProperty<QQuickItem>(contentItem(), nullptr, - QQuickItemPrivate::children_append, - QQuickItemPrivate::children_count, - QQuickItemPrivate::children_at, - QQuickItemPrivate::children_clear); -} - void QQuickPage::componentComplete() { Q_D(QQuickPage); |