6#include <QtQml/qqmlinfo.h>
7#include <QtQuickTemplates2/private/qquickcontainer_p_p.h>
102 return attached->d_func();
117 const int count =
q->count();
124 qmlWarning(
item) <<
"SwipeView has detected conflicting anchors. Unable to layout the item.";
125 item->setProperty(
"_q_QQuickSwipeView_warned",
true);
138 return view->d_func();
145 if (
item ==
q->currentItem())
153 if (
item ==
q->currentItem())
193 return d->interactive;
203 emit interactiveChanged();
221 return d->orientation;
233 emit orientationChanged();
282 item->setSize(
QSizeF(
d->contentItem->width(),
d->contentItem->height()));
302#if QT_CONFIG(accessibility)
303QAccessible::Role QQuickSwipeView::accessibleRole()
const
305 return QAccessible::PageTabList;
367 const bool wasCurrent =
q->isCurrentItem();
368 const bool wasNext =
q->isNextItem();
369 const bool wasPrevious =
q->isPreviousItem();
372 if (wasCurrent !=
q->isCurrentItem())
373 emit q->isCurrentItemChanged();
374 if (wasNext !=
q->isNextItem())
375 emit q->isNextItemChanged();
376 if (wasPrevious !=
q->isPreviousItem())
377 emit q->isPreviousItemChanged();
383 int oldIndex =
index;
389 if (oldView != newView) {
398 emit q->viewChanged();
400 if (oldIndex != newIndex)
401 emit q->indexChanged();
410 qmlWarning(
parent) <<
"SwipeView: attached properties must be accessed from within a child item";
422 return d->index != -1 &&
d->currentIndex != -1 &&
d->index ==
d->currentIndex;
434 return d->index != -1 &&
d->currentIndex != -1 &&
d->index ==
d->currentIndex + 1;
440 return d->index != -1 &&
d->currentIndex != -1 &&
d->index ==
d->currentIndex - 1;
445#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 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(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 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)
QQuickItem * qobject_cast< QQuickItem * >(QObject *o)
myObject disconnect()
[26]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent