Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquickstackview_p_p.h
Go to the documentation of this file.
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 QQUICKSTACKVIEW_P_P_H
5#define QQUICKSTACKVIEW_P_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/qquickstackview_p.h>
19#include <QtQuickTemplates2/private/qquickcontrol_p_p.h>
20#if QT_CONFIG(quick_viewtransitions)
21#include <QtQuick/private/qquickitemviewtransition_p.h>
22#endif
23#include <QtQuick/private/qquickitemchangelistener_p.h>
24#include <QtQml/private/qv4value_p.h>
25#include <QtQml/private/qqmlcontextdata_p.h>
26#include <QtCore/qset.h>
27#include <QtCore/qstack.h>
28
30
33
35#if QT_CONFIG(quick_viewtransitions)
37#endif
38{
39 Q_DECLARE_PUBLIC(QQuickStackView)
40
41public:
43 {
44 return view->d_func();
45 }
46
47 void warn(const QString &error);
48 void warnOfInterruption(const QString &attemptedOperation);
49
51
52 QList<QQuickStackElement *> parseElements(int from, QQmlV4FunctionPtr args, QStringList *errors);
53 QList<QQuickStackElement *> parseElements(const QList<QQuickStackViewArg> &args);
54 QQuickStackElement *findElement(QQuickItem *item) const;
55 QQuickStackElement *findElement(const QV4::Value &value) const;
56 QQuickStackElement *createElement(const QV4::Value &value, const QQmlRefPointer<QQmlContextData> &context, QString *error);
57 bool pushElements(const QList<QQuickStackElement *> &elements);
58 bool pushElement(QQuickStackElement *element);
59 bool popElements(QQuickStackElement *element);
60 bool replaceElements(QQuickStackElement *element, const QList<QQuickStackElement *> &elements);
61
62 enum class CurrentItemPolicy {
64 Pop
65 };
66 QQuickItem *popToItem(QQuickItem *item, QQuickStackView::Operation operation, CurrentItemPolicy currentItemPolicy);
67
68#if QT_CONFIG(quick_viewtransitions)
69 void ensureTransitioner();
72
74#endif
75 void setBusy(bool busy);
76 void depthChange(int newDepth, int oldDepth);
77
78 bool busy = false;
79 bool modifyingElements = false;
86#if QT_CONFIG(quick_viewtransitions)
88#endif
89};
90
92//#if QT_CONFIG(quick_viewtransitions)
94//#endif
95{
96 Q_DECLARE_PUBLIC(QQuickStackViewAttached)
97
98public:
103
104//#if QT_CONFIG(quick_viewtransitions)
106//#endif
107
108 bool explicitVisible = false;
110};
111
112QT_END_NAMESPACE
113
114#endif // QQUICKSTACKVIEW_P_P_H
void itemDestroyed(QQuickItem *item) override
QPointer< QQuickItem > originalParent
void initialize(RequiredProperties *requiredProperties)
void setVisible(bool visible)
static QQuickStackElement * fromObject(QObject *object, QQuickStackView *view, QString *error)
void setStatus(QQuickStackView::Status status)
static QQuickStackElement * fromString(const QString &str, QQuickStackView *view, QString *error)
static QQuickStackElement * fromStackViewArg(QQuickStackView *view, QQuickStackViewArg arg)
QV4::PersistentValue properties
QQuickStackView::Status status
void setView(QQuickStackView *view)
bool load(QQuickStackView *parent)
void incubate(QObject *object, RequiredProperties *requiredProperties)
QV4::PersistentValue qmlCallingContext
QQuickStackIncubator(QQuickStackElement *element)
void setInitialState(QObject *object) override
Called after the object is first created, but before complex property bindings are evaluated and,...
friend QDebug operator<<(QDebug debug, const QQuickStackViewArg &arg)
void warnOfInterruption(const QString &attemptedOperation)
bool pushElements(const QList< QQuickStackElement * > &elements)
bool replaceElements(QQuickStackElement *element, const QList< QQuickStackElement * > &elements)
QList< QQuickStackElement * > parseElements(int from, QQmlV4FunctionPtr args, QStringList *errors)
QList< QQuickStackElement * > removed
QQuickStackElement * createElement(const QV4::Value &value, const QQmlRefPointer< QQmlContextData > &context, QString *error)
void setCurrentItem(QQuickStackElement *element)
QQuickStackElement * findElement(const QV4::Value &value) const
bool popElements(QQuickStackElement *element)
QStack< QQuickStackElement * > elements
QList< QQuickStackElement * > parseElements(const QList< QQuickStackViewArg > &args)
QQuickStackElement * findElement(QQuickItem *item) const
void depthChange(int newDepth, int oldDepth)
QSet< QQuickStackElement * > removing
QQuickItem * popToItem(QQuickItem *item, QQuickStackView::Operation operation, CurrentItemPolicy currentItemPolicy)
bool pushElement(QQuickStackElement *element)
Combined button and popup list for selecting options.