6#if QT_CONFIG(quick_viewtransitions)
10#include <QtCore/qscopedvaluerollback.h>
11#include <QtQml/qqmlinfo.h>
12#include <QtQml/qqmllist.h>
13#include <QtQml/private/qv4qmlcontext_p.h>
14#include <QtQml/private/qv4qobjectwrapper_p.h>
15#include <QtQml/private/qv4variantobject_p.h>
16#include <QtQml/private/qv4urlobject_p.h>
17#include <QtQuick/private/qquickanimation_p.h>
18#include <QtQuick/private/qquicktransition_p.h>
34 qmlWarning(
q) <<
"cannot " << attemptedOperation <<
" while already in the process of completing a " <<
operation;
49 emit q->currentItemChanged();
54 if (
props.isObject()) {
75 for (
int i = from;
i < argc; ++
i) {
90 }
else if (!
error.isEmpty()) {
104 }
else if (!
error.isEmpty()) {
126 if (!nextArg.mProperties.
isEmpty()
127 || (!nextArg.mItem && !nextArg.mComponent && !nextArg.mUrl.
isValid())) {
139 if (!
arg.mProperties.isEmpty()) {
140 qmlWarning(
q) <<
"Properties must come after an Item, Component or URL";
148 stackElements.
append(element);
150 return stackElements;
198 if (
data.typeId() == QMetaType::QUrl) {
277 bool nothingToDo =
false;
309 previousItem = exit->
item;
312#if QT_CONFIG(quick_viewtransitions)
322#if QT_CONFIG(quick_viewtransitions)
323void QQuickStackViewPrivate::ensureTransitioner()
334 first.element->transitionNextReposition(transitioner,
first.type,
first.target);
336 second.
element->transitionNextReposition(transitioner, second.
type, second.
target);
342 if (!
first.element->item || !
first.element->prepareTransition(transitioner,
first.viewBounds) || immediate)
345 first.element->startTransition(transitioner,
first.status);
351 second.
element->startTransition(transitioner, second.
status);
355 setBusy(!transitioner->runningJobs.isEmpty());
356 transitioner->resetTargetLists();
364 if (element->prepared) {
372 }
else if (element->
item) {
379 viewItemTransitionFinished(element);
392 if (!existingElement || element == existingElement)
394 if (element->
removal || element->isPendingRemoval())
398 if (transitioner && transitioner->runningJobs.isEmpty()) {
409 if (removedElement->item &&
findElement(removedElement->item)) {
411 removedElement->item =
nullptr;
429 q->setFiltersChildMouseEvents(
busy);
430 emit q->busyChanged();
436 if (newDepth == oldDepth)
439 emit q->depthChanged();
440 if (newDepth == 0 || oldDepth == 0)
441 emit q->emptyChanged();
void setFocus(Qt::FocusReason focusReason=Qt::OtherFocusReason)
Gives keyboard input focus to this item.
QV4::ExecutionEngine * handle() const
qsizetype size() const noexcept
bool isEmpty() const noexcept
qsizetype length() const noexcept
const_reference at(qsizetype i) const noexcept
T value(qsizetype i) const
void append(parameter_type t)
void removeItemChangeListener(QQuickItemChangeListener *, ChangeTypes types)
QQuickAnchorLine top() const
static QQuickItemPrivate * get(QQuickItem *item)
void setChangeListener(QQuickItemViewTransitionChangeListener *obj)
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
void setPosition(const QPointF &)
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
bool load(QQuickStackView *parent)
QV4::PersistentValue qmlCallingContext
void warnOfInterruption(const QString &attemptedOperation)
bool pushElements(const QList< QQuickStackElement * > &elements)
bool replaceElements(QQuickStackElement *element, const QList< QQuickStackElement * > &elements)
QList< QQuickStackElement * > removed
QQuickStackElement * createElement(const QV4::Value &value, const QQmlRefPointer< QQmlContextData > &context, QString *error)
void warn(const QString &error)
void setCurrentItem(QQuickStackElement *element)
QList< QQuickStackElement * > parseElements(int from, QQmlV4Function *args, QStringList *errors)
bool popElements(QQuickStackElement *element)
QStack< QQuickStackElement * > elements
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)
bool remove(const T &value)
iterator insert(const T &value)
T & top()
Returns a reference to the stack's top item.
T pop()
Removes the top item from the stack and returns it.
void push(const T &t)
Adds element t to the top of the stack.
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
bool isRelative() const
Returns true if the URL is relative; otherwise returns false.
bool isValid() const
Returns true if the URL is non-empty and valid; otherwise returns false.
QString toString(FormattingOptions options=FormattingOptions(PrettyDecoded)) const
Returns a string representation of the URL.
void set(ExecutionEngine *engine, const Value &value)
qDeleteAll(list.begin(), list.end())
Combined button and popup list for selecting options.
#define ACTION_IF_DELETED(p, func, action)
static const QCssKnownValue properties[NumProperties - 1]
DBusConnection const char DBusError * error
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
static QV4::ExecutionEngine * v4Engine(QV4::Value *d)
GLboolean GLboolean GLboolean b
GLdouble GLdouble GLdouble GLdouble top
GLenum GLuint GLsizei const GLenum * props
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLdouble GLdouble GLdouble GLdouble q
QQmlEngine * qmlEngine(const QObject *obj)
Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me)
QQuickItem * qobject_cast< QQuickItem * >(QObject *o)
static bool initProperties(QQuickStackElement *element, const QV4::Value &props, QQmlV4Function *args)
static QUrl resolvedUrl(const QUrl &url, const QQmlRefPointer< QQmlContextData > &context)
#define QStringLiteral(str)
QUrl url("example.com")
[constructor-url-reference]
QQuickStackElement * element
QQuickItemViewTransitioner::TransitionType type
QQuickStackView::Status status
QQuickTransition * transition
static QQuickStackTransition popExit(QQuickStackView::Operation operation, QQuickStackElement *element, QQuickStackView *view)
static QQuickStackTransition popEnter(QQuickStackView::Operation operation, QQuickStackElement *element, QQuickStackView *view)
QQmlRefPointer< QQmlContextData > callingQmlContext() const
QV4::ReturnedValue fromVariant(const QVariant &)
static QVariant toVariant(const QV4::Value &value, QMetaType typeHint, bool createJSValueForObjectsAndSymbols=true)
static Heap::ExecutionContext * qmlContext(Heap::ExecutionContext *ctx)