6#include <QtQml/qqmlinfo.h>
7#include <QtQuickTemplates2/private/qquickcontainer_p_p.h>
102 return attached->d_func();
119 qmlWarning(
item) <<
"SwipeView has detected conflicting anchors. Unable to layout the item.";
120 item->setProperty(
"_q_QQuickSwipeView_warned",
true);
132 const int count =
q->count();
142 return view->d_func();
149 if (
item ==
q->currentItem())
157 if (
item ==
q->currentItem())
197 return d->interactive;
207 emit interactiveChanged();
225 return d->orientation;
237 emit orientationChanged();
313#if QT_CONFIG(accessibility)
314QAccessible::Role QQuickSwipeView::accessibleRole()
const
316 return QAccessible::PageTabList;
378 const bool wasCurrent =
q->isCurrentItem();
379 const bool wasNext =
q->isNextItem();
380 const bool wasPrevious =
q->isPreviousItem();
383 if (wasCurrent !=
q->isCurrentItem())
384 emit q->isCurrentItemChanged();
385 if (wasNext !=
q->isNextItem())
386 emit q->isNextItemChanged();
387 if (wasPrevious !=
q->isPreviousItem())
388 emit q->isPreviousItemChanged();
394 int oldIndex =
index;
400 if (oldView != newView) {
409 emit q->viewChanged();
411 if (oldIndex != newIndex)
412 emit q->indexChanged();
420 if (!qobject_cast<QQuickItem *>(
parent))
421 qmlWarning(
parent) <<
"SwipeView: attached properties must be accessed from within a child item";
433 return d->index != -1 &&
d->currentIndex != -1 &&
d->index ==
d->currentIndex;
445 return d->index != -1 &&
d->currentIndex != -1 &&
d->index ==
d->currentIndex + 1;
451 return d->index != -1 &&
d->currentIndex != -1 &&
d->index ==
d->currentIndex - 1;
456#include "moc_qquickswipeview_p.cpp"
static QMetaObject::Connection connect(const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
QObject * parent() const
Returns a pointer to the parent object.
QQuickItem * itemAt(int index) const
void currentItemChanged()
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
void currentIndexChanged()
void updateImplicitContentSize()
QQuickDeferredPointer< QQuickItem > contentItem
void updateImplicitContentWidth()
void updateImplicitContentHeight()
virtual void itemImplicitWidthChanged(QQuickItem *)
virtual void itemImplicitHeightChanged(QQuickItem *)
QQuickAnchors * anchors() const
\qmlpropertygroup QtQuick::Item::anchors \qmlproperty AnchorLine QtQuick::Item::anchors....
static QQuickItemPrivate * get(QQuickItem *item)
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
void setFlag(Flag flag, bool enabled=true)
Enables the specified flag for this item if enabled is true; if enabled is false, the flag is disable...
virtual void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry)
qreal width
This property holds the width of this item.
bool isComponentComplete() const
Returns true if construction of the QML component is complete; otherwise returns false.
qreal height
This property holds the height of this item.
void setActiveFocusOnTab(bool)
static QQuickSwipeViewAttachedPrivate * get(QQuickSwipeViewAttached *attached)
void updateCurrentIndex()
\qmlattachedproperty int QtQuick.Controls::SwipeView::index \readonly
void setCurrentIndex(int i)
void update(QQuickSwipeView *newView, int newIndex)
QQuickSwipeView * swipeView
QQuickSwipeViewAttached(QObject *parent=nullptr)
Enables the user to navigate pages by swiping sideways.
void resizeItem(int index, QQuickItem *item)
void itemImplicitWidthChanged(QQuickItem *item) override
qreal getContentHeight() const override
qreal getContentWidth() const override
static QQuickSwipeViewPrivate * get(QQuickSwipeView *view)
Qt::Orientation orientation
void itemImplicitHeightChanged(QQuickItem *item) override
void setInteractive(bool interactive)
Qt::Orientation orientation
void setOrientation(Qt::Orientation orientation)
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override
void itemRemoved(int index, QQuickItem *item) override
bool isHorizontal() const
static QQuickSwipeViewAttached * qmlAttachedProperties(QObject *object)
void itemMoved(int index, QQuickItem *item) override
bool isInteractive() const
QQuickSwipeView(QQuickItem *parent=nullptr)
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
void itemAdded(int index, QQuickItem *item) override
\inmodule QtCore\reentrant
Combined button and popup list for selecting options.
GLenum GLenum GLsizei count
GLdouble GLdouble GLdouble GLdouble q
Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me)
myObject disconnect()
[26]