diff options
Diffstat (limited to 'src/controls/qquickstack.cpp')
-rw-r--r-- | src/controls/qquickstack.cpp | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/src/controls/qquickstack.cpp b/src/controls/qquickstack.cpp index 1723ef72..c949ffeb 100644 --- a/src/controls/qquickstack.cpp +++ b/src/controls/qquickstack.cpp @@ -47,15 +47,11 @@ QT_BEGIN_NAMESPACE \qmltype Stack \instantiates QQuickStack \inqmlmodule QtQuick.Controls 1.0 - \ingroup views \brief Provides attached properties for items pushed onto a StackView. - The Stack attached property provides information when an item becomes - active or inactive through the \l{Stack::status}{Stack.status} property. - Status will be \c Stack.Activating when an item is transitioning into - being the current item on the screen, and \c Stack.Active once the - transition stops. When it leaves the screen, it will be - \c Stack.Deactivating, and then \c Stack.Inactive. + The Stack type provides attached properties for items pushed onto a \l StackView. + It gives specific information about the item, such as its \l status and + \l index in the stack \l view the item is in. \sa StackView */ @@ -64,7 +60,7 @@ QQuickStack::QQuickStack(QObject *object) : QObject(object), m_index(-1), m_status(Inactive), - m_pageStack(0) + m_view(0) { } @@ -75,11 +71,11 @@ QQuickStack *QQuickStack::qmlAttachedProperties(QObject *object) /*! \readonly - \qmlproperty int Stack::index + \qmlattachedproperty int Stack::index - This property holds the index of the item inside \l{pageStack}{StackView}, - so that \l{StackView::get()}{pageStack.get(index)} will return the item itself. - If \l{Stack::pageStack}{pageStack} is \c null, \a index will be \c -1. + This property holds the index of the item inside \l{view}{StackView}, + so that \l{StackView::get()}{StackView.get(index)} will return the item itself. + If \l{Stack::view}{view} is \c null, \a index will be \c -1. */ int QQuickStack::index() const { @@ -96,7 +92,7 @@ void QQuickStack::setIndex(int index) /*! \readonly - \qmlproperty enumeration Stack::status + \qmlattachedproperty enumeration Stack::status This property holds the status of the item. It can have one of the following values: \list @@ -121,21 +117,21 @@ void QQuickStack::setStatus(Status status) /*! \readonly - \qmlproperty StackView Stack::pageStack + \qmlattachedproperty StackView Stack::view This property holds the StackView the item is in. If the item is not inside - a StackView, \a pageStack will be \c null. + a StackView, \a view will be \c null. */ -QQuickItem *QQuickStack::pageStack() const +QQuickItem *QQuickStack::view() const { - return m_pageStack; + return m_view; } -void QQuickStack::setStackView(QQuickItem *pageStack) +void QQuickStack::setView(QQuickItem *view) { - if (m_pageStack != pageStack) { - m_pageStack = pageStack; - emit pageStackChanged(); + if (m_view != view) { + m_view = view; + emit viewChanged(); } } |