8#include <private/qqmlobjectmodel_p.h>
9#include <QtQml/qqmlexpression.h>
10#include <QtQml/qqmlengine.h>
11#include <QtQml/qqmlinfo.h>
12#include <QtGui/qevent.h>
13#include <QtCore/qcoreapplication.h>
14#include <QtCore/qmath.h>
16#include <private/qquicksmoothedanimation_p_p.h>
17#include <private/qqmlcomponent_p.h>
21#ifndef QML_FLICK_SNAPONETHRESHOLD
22#define QML_FLICK_SNAPONETHRESHOLD 30
36 bool isContentFlowReversed()
const override;
37 bool isRightToLeft()
const;
38 bool isBottomToTop()
const;
42 qreal originPosition()
const override;
43 qreal lastPosition()
const override;
46 QString sectionAt(
int modelIndex);
51 void clear(
bool onDestruction)
override;
53 bool addVisibleItems(
qreal fillFrom,
qreal fillTo,
qreal bufferFrom,
qreal bufferTo,
bool doBuffer)
override;
54 bool removeNonVisibleItems(
qreal bufferFrom,
qreal bufferTo)
override;
55 void visibleItemsChanged()
override;
64 void resetFirstItemPosition(
qreal pos = 0.0)
override;
65 void adjustFirstItem(
qreal forwards,
qreal backwards,
int)
override;
66 void updateSizeChangesBeforeVisiblePos(
FxViewItem *
item, ChangeResult *removeResult)
override;
68 void createHighlight(
bool onDestruction =
false)
override;
69 void updateHighlight()
override;
70 void resetHighlightPosition()
override;
71 bool movingFromHighlight()
override;
74 void layoutVisibleItems(
int fromModelIndex = 0)
override;
77#if QT_CONFIG(quick_viewtransitions)
78 void translateAndTransitionItemsAfter(
int afterIndex,
const ChangeResult &insertionResult,
const ChangeResult &removalResult)
override;
81 void updateSectionCriteria()
override;
82 void updateSections()
override;
85 void releaseSectionItems();
87 void updateCurrentSection();
88 void updateStickySections();
91 qreal footerSize()
const override;
92 bool showHeaderForIndex(
int index)
const override;
93 bool showFooterForIndex(
int index)
const override;
94 void updateHeader()
override;
95 void updateFooter()
override;
96 bool hasStickyHeader()
const override;
97 bool hasStickyFooter()
const override;
101 void changedVisibleIndex(
int newIndex)
override;
102 void initializeCurrentItem()
override;
104 void updateAverage();
107 void fixupPosition()
override;
108 void fixup(AxisData &
data,
qreal minExtent,
qreal maxExtent)
override;
115 void fixupHeaderCompleted();
137 static const int sectionCacheSize = 5;
160 , averageSize(100.0),
spacing(0.0)
165 , highlightMoveVelocity(400), highlightResizeVelocity(400), highlightResizeDuration(-1)
167 , overshootDist(0.0), desiredViewportPosition(0.0), fixupHeaderPosition(0.0)
168 , headerNeedsSeparateFixup(
false), desiredHeaderVisible(
false)
169 , correctFlick(
false), inFlickCorrection(
false), wantedMousePress(
false)
171 highlightMoveDuration = -1;
228 if (m_labelPositioning != l) {
229 m_labelPositioning = l;
307 moveTo(pointForPosition(
pos), immediate);
381 if (rem.start() <=
index) {
383 if (
index < rem.start() + rem.count)
389 if (ins.start() <=
index)
458 if (
item->index != -1)
459 lastIndex =
item->index;
460 if (
item->index == modelIndex)
464 if (lastIndex == modelIndex-1)
474 q->QQuickFlickable::setContentY(-
pos-
size());
476 q->QQuickFlickable::setContentY(
pos);
479 q->QQuickFlickable::setContentX(-
pos-
size());
481 q->QQuickFlickable::setContentX(
pos);
500 int invisibleCount = INT_MIN;
501 int delayRemovedCount = 0;
504 if (
item->index != -1) {
506 invisibleCount =
model->
count() - (
item->index + 1 + delayRemovedCount);
508 }
else if (
item->attached->delayRemove()) {
512 if (invisibleCount == INT_MIN) {
517 if (invisibleCount > 0)
528 return item->position();
550 return item->endPosition();
566 return item->attached->section();
580 return snapItem->itemPosition();
584 if (
pos < firstPos) {
586 }
else if (
pos > endPos)
597 qreal prevItemSize = 0;
599 if (
item->index == -1)
608 if (listItem->
section() && velocity > 0) {
609 if (itemTop + listItem->
sectionSize() / 2 >=
pos && itemTop - prevItemSize / 2 <
pos)
616 qreal halfwayToNextItem = itemTop + (itemSize+
spacing) / 2;
617 qreal halfwayToPrevItem = itemTop - (prevItemSize+
spacing) / 2;
618 if (halfwayToNextItem >=
pos && halfwayToPrevItem <
pos)
621 prevItemSize = listItem->
itemSize();
659 listItem->
index = modelIndex;
667 if (modelIndex > 0) {
669 prevSection =
item->attached->section();
673 if (modelIndex < model->
count()-1) {
687 item->trackGeometry(
true);
734 bool haveValidItems = modelIndex >= 0;
735 modelIndex = modelIndex < 0 ?
visibleIndex : modelIndex + 1;
743 count = newModelIdx - modelIndex;
746 modelIndex = newModelIdx;
755 bool changed =
false;
758 while (modelIndex < model->
count() &&
pos <= fillTo) {
761 qCDebug(lcItemViewDelegateLifecycle) <<
"refill: append item" << modelIndex <<
"pos" <<
pos <<
"buffer" << doBuffer <<
"item" << (
QObject *)(
item->item);
762#if QT_CONFIG(quick_viewtransitions)
783#if QT_CONFIG(quick_viewtransitions)
798#if QT_CONFIG(quick_viewtransitions)
799 if (
item->transitionScheduledOrRunning()) {
800 qCDebug(lcItemViewDelegateLifecycle) <<
"\tnot releasing animating item" <<
item->index << (
QObject *)(
item->item);
801 item->releaseAfterTransition =
true;
802 releasePendingTransition.append(
item);
806 qCDebug(lcItemViewDelegateLifecycle) <<
"\treleasing stationary item" <<
item->index << (
QObject *)(
item->item);
814 bool changed =
false;
823 if (
item->attached->delayRemove())
826 if (
item->size() > 0) {
827 qCDebug(lcItemViewDelegateLifecycle) <<
"refill: remove first" <<
visibleIndex <<
"top end pos" <<
item->endPosition();
830 if (
item->index != -1)
845 if (
item->attached->delayRemove())
896 if (
item->index >= fromModelIndex) {
951 qreal diff = forwards - backwards;
963 bool changed =
false;
986 std::unique_ptr<FxListItemSG> newHighlight
987 = std::make_unique<FxListItemSG>(
item,
q,
true);
988 newHighlight->trackGeometry(
true);
1015 emit q->highlightItemChanged();
1082 const bool reuseExistingContext = delegate->
isBound();
1087 auto baseContext = creationContext ? creationContext :
qmlContext(
q);
1092 if (delegatePriv->hadTopLevelRequiredProperties()) {
1094 }
else if (!reuseExistingContext) {
1097 if (!reuseExistingContext)
1104 sectionItem->
setZ(2);
1111 }
else if (!reuseExistingContext) {
1175 }
else if (listItem->
section()) {
1205 visTop = isFlowReversed ? -sectionPos-sectionSize >= startPos : sectionPos >= startPos;
1208 visBot = isFlowReversed ? -sectionPos <= endPos : sectionPos + sectionSize < endPos;
1209 section->setVisible(visBot && visTop);
1210 if (visTop && !sectionItem)
1211 sectionItem = section;
1212 if (isFlowReversed) {
1213 if (-sectionPos <= endPos)
1214 lastSectionItem = section;
1216 if (sectionPos + sectionSize < endPos)
1217 lastSectionItem = section;
1244 pos = isFlowReversed ?
qMax(
pos, sectionPos + sectionSize) :
qMin(
pos, sectionPos - sectionSize);
1274 if (lastSectionItem) {
1276 pos = isFlowReversed ?
qMin(
pos, sectionPos - sectionSize) :
qMax(
pos, sectionPos + sectionSize);
1293 if (!
q->isComponentComplete())
1308 if (
item->index != -1) {
1316 prevSection = attached->
section();
1318 prevIdx =
item->index;
1321 if (idx > 0 && idx < model->
count()-1)
1337 emit q->currentSectionChanged();
1348 if (
item->endPosition() > startPos)
1350 if (
item->index != -1)
1351 modelIndex =
item->index;
1363 emit q->currentSectionChanged();
1379 if (listItem->
index != -1)
1380 modelIndex = listItem->
index;
1390 if (section != lastSection) {
1458 bool created =
false;
1484 if (endPos <= visiblePos || listItem->
position() < endPos)
1493 emit q->footerItemChanged();
1524 bool created =
false;
1563 emit q->headerItemChanged();
1579 qmlAttachedPropertiesObject<QQuickListView>(
item));
1585 const QRectF &oldGeometry)
1590 if (!
q->isComponentComplete())
1610#if QT_CONFIG(quick_viewtransitions)
1611 if (listItem->transitionScheduledOrRunning())
1622 const qreal oldItemEndPosition =
q->effectiveLayoutDirection() ==
Qt::RightToLeft ? -oldGeometry.
x() : oldGeometry.
x() + oldGeometry.
width();
1624 if (
q->effectiveLayoutDirection() ==
Qt::LeftToRight && oldItemEndPosition <
q->contentX())
1626 else if (
q->effectiveLayoutDirection() ==
Qt::RightToLeft && oldItemEndPosition >
q->contentX())
1673 else if (
data.velocity < 0 && dist < -QML_FLICK_SNAPONETHRESHOLD && dist > -
averageSize/2)
1677 tempPosition -=
bias;
1680 qreal snapOffset = 0;
1681 qreal overlayHeaderOffset = 0;
1682 bool isHeaderWithinBounds =
false;
1685 isHeaderWithinBounds = visiblePartOfHeader > 0;
1727 if (
header && !topItem && isInBounds) {
1740 }
else if (topItem && (isInBounds || strictHighlightRange)) {
1796 }
else if (bottomItem && isInBounds) {
1815 data.fixingUp =
true;
1829 viewPos = -viewPos-
size();
1838 data.fixingUp =
true;
1847 data.inOvershoot =
false;
1854 data.fixingUp =
false;
1860 qreal maxDistance = 0;
1861 const qreal dataValue =
1873 maxDistance =
qAbs(
data.flickTarget -
data.move.value());
1890 maxDistance =
qAbs(
data.flickTarget -
data.move.value());
1900 if (maxDistance > 0 || overShoot) {
1919 if (maxDistance > 0)
1941 qreal adjv2 = accel * 2.0f *
qAbs(adjDist);
1951 }
else if (overShoot) {
1974 if (velocity < 0 && newtarget <=
maxExtent)
1976 else if (velocity > 0 && newtarget >=
minExtent)
1978 if (newtarget ==
data.flickTarget) {
1983 data.flickTarget = newtarget;
1985 if ((
v < 0 &&
dist < 0) || (
v > 0 &&
dist > 0)) {
2520 if (
d->autoHighlight != autoHighlight) {
2521 if (!autoHighlight) {
2522 if (
d->highlightPosAnimator)
2523 d->highlightPosAnimator->stop();
2524 if (
d->highlightWidthAnimator)
2525 d->highlightWidthAnimator->stop();
2526 if (
d->highlightHeightAnimator)
2527 d->highlightHeightAnimator->stop();
2551 d->forceLayoutPolish();
2597 d->regenerate(
true);
2801 if (!
d->sectionCriteria)
2803 return d->sectionCriteria;
2813 return d->currentSection;
2855 return d->highlightMoveVelocity;
2861 if (
d->highlightMoveVelocity != speed) {
2862 d->highlightMoveVelocity = speed;
2863 if (
d->highlightPosAnimator)
2864 d->highlightPosAnimator->velocity =
d->highlightMoveVelocity;
2872 if (
d->highlightMoveDuration != duration) {
2873 if (
d->highlightPosAnimator)
2874 d->highlightPosAnimator->userDuration = duration;
2882 return d->highlightResizeVelocity;
2888 if (
d->highlightResizeVelocity != speed) {
2889 d->highlightResizeVelocity = speed;
2890 if (
d->highlightWidthAnimator)
2891 d->highlightWidthAnimator->velocity =
d->highlightResizeVelocity;
2892 if (
d->highlightHeightAnimator)
2893 d->highlightHeightAnimator->velocity =
d->highlightResizeVelocity;
2901 return d->highlightResizeDuration;
2907 if (
d->highlightResizeDuration != duration) {
2908 d->highlightResizeDuration = duration;
2909 if (
d->highlightWidthAnimator)
2910 d->highlightWidthAnimator->userDuration =
d->highlightResizeDuration;
2911 if (
d->highlightHeightAnimator)
2912 d->highlightHeightAnimator->userDuration =
d->highlightResizeDuration;
2947 if (
d->snapMode !=
mode) {
3029 return d->headerPositioning;
3035 if (
d->headerPositioning != positioning) {
3036 d->applyPendingChanges();
3037 d->headerPositioning = positioning;
3040 d->updateViewport();
3043 emit headerPositioningChanged();
3076 return d->footerPositioning;
3082 if (
d->footerPositioning != positioning) {
3083 d->applyPendingChanges();
3084 d->footerPositioning = positioning;
3087 d->updateViewport();
3090 emit footerPositioningChanged();
3401 if (!
d->itemCount) {
3402 if (
d->hasStickyHeader())
3404 if (
d->hasStickyFooter())
3410 if (
d->inViewportMoved)
3412 d->inViewportMoved =
true;
3415 if (
d->isBottomToTop())
3420 if (
d->isRightToLeft())
3426 d->refillOrLayout();
3429 qreal from =
d->isContentFlowReversed() ? -
d->position()-
d->displayMarginBeginning-
d->size() :
d->position()-
d->displayMarginBeginning;
3430 qreal to =
d->isContentFlowReversed() ? -
d->position()+
d->displayMarginEnd :
d->position()+
d->size()+
d->displayMarginEnd;
3438 if (
d->hData.flicking ||
d->vData.flicking ||
d->hData.moving ||
d->vData.moving)
3444 qreal viewPos =
d->isContentFlowReversed() ? -
d->position()-
d->size() :
d->position();
3445 if (
pos > viewPos +
d->highlightRangeEnd -
d->highlight->size())
3446 pos = viewPos +
d->highlightRangeEnd -
d->highlight->size();
3447 if (pos < viewPos + d->highlightRangeStart)
3448 pos = viewPos +
d->highlightRangeStart;
3449 if (
pos !=
d->highlight->position()) {
3450 d->highlightPosAnimator->stop();
3453 d->updateHighlight();
3457 if (
FxViewItem *snapItem =
d->snapItemAt(
d->highlight->position())) {
3458 if (snapItem->index >= 0 && snapItem->index !=
d->currentIndex)
3459 d->updateCurrent(snapItem->index);
3464 if ((
d->hData.flicking ||
d->vData.flicking) &&
d->correctFlick && !
d->inFlickCorrection) {
3465 d->inFlickCorrection =
true;
3468 if (
yflick() && !
d->vData.inOvershoot) {
3469 if (
d->vData.velocity > 0) {
3471 if ((
minY -
d->vData.move.value() <
height()/2 ||
d->vData.flickTarget -
d->vData.move.value() <
height()/2)
3472 &&
minY !=
d->vData.flickTarget)
3474 }
else if (
d->vData.velocity < 0) {
3476 if ((
d->vData.move.value() -
maxY <
height()/2 ||
d->vData.move.value() -
d->vData.flickTarget <
height()/2)
3477 &&
maxY !=
d->vData.flickTarget)
3482 if (
xflick() && !
d->hData.inOvershoot) {
3483 if (
d->hData.velocity > 0) {
3485 if ((minX -
d->hData.move.value() <
width()/2 ||
d->hData.flickTarget -
d->hData.move.value() <
width()/2)
3486 && minX !=
d->hData.flickTarget)
3488 }
else if (
d->hData.velocity < 0) {
3490 if ((
d->hData.move.value() -
maxX <
width()/2 ||
d->hData.move.value() -
d->hData.flickTarget <
width()/2)
3491 &&
maxX !=
d->hData.flickTarget)
3495 d->inFlickCorrection =
false;
3497 if (
d->hasStickyHeader())
3499 if (
d->hasStickyFooter())
3501 if (
d->sectionCriteria) {
3502 d->updateCurrentSection();
3503 d->updateStickySections();
3505 d->inViewportMoved =
false;
3511 if (
d->model &&
d->model->count() && ((
d->interactive && !
d->explicitKeyNavigationEnabled)
3512 || (
d->explicitKeyNavigationEnabled &&
d->keyNavigationEnabled))) {
3521 }
else if (
d->wrap) {
3533 }
else if (
d->wrap) {
3550 d->model->drainReusableItemsPool(0);
3553 if (
d->isRightToLeft()) {
3557 }
else if (
d->isBottomToTop()) {
3574 qmlAttachedPropertiesObject<QQuickListView>(
item));
3608 int count =
d->model ?
d->model->count() : 0;
3628 int count =
d->model ?
d->model->count() : 0;
3639 if (
q->isComponentComplete() &&
model) {
3653#if QT_CONFIG(quick_viewtransitions)
3656 int modelIndex = change.
index;
3682 if (
item->index != -1 &&
item->index >= modelIndex)
3699 if (
item->index != -1 &&
item->index >= modelIndex) {
3701#if QT_CONFIG(quick_viewtransitions)
3710 bool visibleAffected =
false;
3713 int insertionIdx =
index;
3723 for (;
it.hasNext() &&
pos >= from;
it.next()) {
3732 if (
it.removedAtIndex)
3735 visibleAffected =
true;
3737 if (insertionIdx == 0)
3741#if QT_CONFIG(quick_viewtransitions)
3754 int firstOkIdx = -1;
3761 for (
int i = 0;
i < firstOkIdx;
i++) {
3769 for (;
it.hasNext() &&
pos <= lastVisiblePos;
it.next()) {
3770 visibleAffected =
true;
3774#if QT_CONFIG(quick_viewtransitions)
3775 bool newItem = !
item;
3777 it.removedAtIndex =
false;
3782 if (
it.removedAtIndex) {
3793#if QT_CONFIG(quick_viewtransitions)
3799#if QT_CONFIG(quick_viewtransitions)
3815 if (prevItem->
index !=
item->index - 1) {
3817#if QT_CONFIG(quick_viewtransitions)
3824#if QT_CONFIG(quick_viewtransitions)
3825 if (nvItem->transitionScheduledOrRunning())
3836 return visibleAffected;
3839#if QT_CONFIG(quick_viewtransitions)
3840void QQuickListViewPrivate::translateAndTransitionItemsAfter(
int afterModelIndex,
const ChangeResult &insertionResult,
const ChangeResult &removalResult)
3847 int markerItemIndex = -1;
3850 markerItemIndex =
i;
3854 if (markerItemIndex < 0)
3858 qreal sizeRemoved = -removalResult.sizeChangesAfterVisiblePos
3863 if (listItem->
position() >= viewEndPos)
3865 if (!listItem->transitionScheduledOrRunning()) {
3996 QPointF pos =
event->points().first().position();
3997 if (!
pos.isNull()) {
3998 if (
auto header =
q->headerItem()) {
4003 if (
auto footer =
q->footerItem()) {
4010 switch (
event->type()) {
4027#include "moc_qquicklistview_p.cpp"
DarwinBluetooth::DeviceInquiryDelegate * m_delegate
bool contains(qreal x, qreal y) const override
FxListItemSG(QQuickItem *i, QQuickListView *v, bool own)
qreal itemPosition() const
QQuickItem * section() const
qreal position() const override
qreal endPosition() const override
qreal size() const override
qreal sectionSize() const override
void setSection(QQuickItem *s)
void setPosition(qreal pos, bool immediate=false)
QQuickItemViewAttached * attached
MutableModelIterator(QQmlInstanceModel *model, int iBegin, int iEnd)
Type
This enum type defines the valid event types in Qt.
qreal y() const
This convenience function is equivalent to calling pos().y().
qreal x() const
This convenience function is equivalent to calling pos().x().
void setVisible(bool visible)
If visible is true, the item is made visible.
The QKeyEvent class describes a key event.
qsizetype size() const noexcept
bool isEmpty() const noexcept
void removeAt(qsizetype i)
const T & constLast() const noexcept
iterator insert(qsizetype i, parameter_type t)
bool removeOne(const AT &t)
const_reference at(qsizetype i) const noexcept
const_iterator constBegin() const noexcept
void prepend(rvalue_ref t)
const T & constFirst() const noexcept
void removeLast() noexcept
void append(parameter_type t)
const_iterator constEnd() const noexcept
T take(const Key &key)
Removes the item with the key from the hash and returns the value associated with it.
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)
static bool disconnect(const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot)
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
\threadsafe
bool setProperty(const char *name, const QVariant &value)
Sets the value of the object's name property to value.
\inmodule QtCore\reentrant
A base class for pointer events.
The QQmlChangeSet class stores an ordered list of notifications about changes to a linear data set.
const QVector< Change > & removes() const
const QVector< Change > & inserts() const
static QQmlComponentPrivate * get(QQmlComponent *c)
The QQmlComponent class encapsulates a QML component definition.
bool isBound() const
Returns true if the component was created in a QML files that specifies {pragma ComponentBehavior: Bo...
virtual QObject * beginCreate(QQmlContext *)
Create an object instance from this component, within the specified context.
virtual void completeCreate()
This method provides advanced control over component instance creation.
QQmlContext * creationContext() const
Returns the QQmlContext the component was created in.
void setInitialProperties(QObject *component, const QVariantMap &properties)
Set top-level properties of the component.
static QQmlRefPointer< QQmlContextData > get(QQmlContext *context)
The QQmlContext class defines a context within a QML engine.
QQmlContext * parentContext() const
Return the context's parent QQmlContext, or \nullptr if this context has no parent or if the parent h...
static QQmlContext * contextForObject(const QObject *)
Returns the QQmlContext for the object, or nullptr if no context has been set.
IncubationMode
Specifies the mode the incubator operates in.
virtual void setWatchedRoles(const QList< QByteArray > &roles)=0
void modelUpdated(const QQmlChangeSet &changeSet, bool reset)
QString stringValue(int index, const QString &role)
The QQmlProperty class abstracts accessing properties on objects created from QML.
virtual bool flick(AxisData &data, qreal minExtent, qreal maxExtent, qreal vSize, QQuickTimeLineCallback::Callback fixupCallback, QEvent::Type eventType, qreal velocity)
MovementReason moveReason
qreal overShootDistance(qreal velocity) const
virtual void fixup(AxisData &data, qreal minExtent, qreal maxExtent)
QQuickFlickable::FlickableDirection flickableDirection
QQuickFlickable::BoundsBehavior boundsBehavior
void setContentWidth(qreal)
virtual void viewportMoved(Qt::Orientations orient)
void setFlickableDirection(FlickableDirection)
virtual qreal maxXExtent() const
virtual qreal maxYExtent() const
void setContentHeight(qreal)
bool heightChange() const
void removeItemChangeListener(QQuickItemChangeListener *, ChangeTypes types)
void addItemChangeListener(QQuickItemChangeListener *listener, ChangeTypes types)
static QQuickItemPrivate * get(QQuickItem *item)
void setSections(const QString &prev, const QString §, const QString &next)
void setView(QQuickItemView *view)
void setSection(const QString §)
void setPrevSection(const QString §)
void setNextSection(const QString §)
QMultiHash< QQmlChangeSet::MoveKey, FxViewItem * > removedItems
QPointer< QQuickItem > item
virtual qreal position() const =0
void setVisible(bool visible)
virtual qreal endPosition() const =0
void moveTo(const QPointF &pos, bool immediate)
virtual qreal size() const =0
void trackGeometry(bool track)
virtual bool contains(qreal x, qreal y) const =0
int findLastVisibleIndex(int defaultValue=-1) const
virtual void initializeCurrentItem()
qreal highlightRangeStart
FxViewItem * visibleItem(int modelIndex) const
int highlightMoveDuration
virtual void clear(bool onDestruction=false)
QQuickItem * createHighlightItem() const
QPointer< QQmlInstanceModel > model
QList< FxViewItem * > visibleItems
int displayMarginBeginning
virtual void initializeViewItem(FxViewItem *)
virtual void updateSizeChangesBeforeVisiblePos(FxViewItem *item, ChangeResult *removeResult)
virtual void updateSections()
QQmlComponent * footerComponent
qreal firstVisibleItemPosition
QQuickItemViewChangeSet currentChanges
void updateUnrequestedPositions()
void applyPendingChanges()
void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &) override
QQuickItemView::VerticalLayoutDirection verticalLayoutDirection
int mapFromModel(int modelIndex) const
void updateVisibleIndex()
QQuickItem * createComponentItem(QQmlComponent *component, qreal zValue, bool createDefault=false) const
void releaseVisibleItems(QQmlInstanceModel::ReusableFlag reusableFlag)
FxViewItem * createItem(int modelIndex, QQmlIncubator::IncubationMode incubationMode=QQmlIncubator::AsynchronousIfNested)
QQmlComponent * headerComponent
qreal startPosition() const
virtual bool releaseItem(FxViewItem *item, QQmlInstanceModel::ReusableFlag reusableFlag)
QQmlInstanceModel::ReusableFlag reusableFlag
std::unique_ptr< FxViewItem > highlight
virtual void setHighlightFollowsCurrentItem(bool)
qreal maxYExtent() const override
qreal maxXExtent() const override
qreal minYExtent() const override
void setContentX(qreal pos) override
Qt::LayoutDirection effectiveLayoutDirection
void setContentY(qreal pos) override
virtual void initItem(int index, QObject *item)
virtual void setHighlightMoveDuration(int)
void setCurrentIndex(int idx)
VerticalLayoutDirection verticalLayoutDirection
qreal minXExtent() const override
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
virtual void keyPressEvent(QKeyEvent *event)
This event handler can be reimplemented in a subclass to receive key press events for an item.
qreal x
\qmlproperty real QtQuick::Item::x \qmlproperty real QtQuick::Item::y \qmlproperty real QtQuick::Item...
void setParentItem(QQuickItem *parent)
qreal z
\qmlproperty real QtQuick::Item::z
qreal y
Defines the item's y position relative to its parent.
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.
QPointer< QQuickItem > m_sectionItem
void releaseSectionItem(QQuickItem *item)
void createHighlight(bool onDestruction=false) override
void visibleItemsChanged() override
bool hasStickyHeader() const override
static void setSectionHelper(QQmlContext *context, QQuickItem *sectionItem, const QString §ion)
FxViewItem * snapItemAt(qreal pos)
QQuickListView::Orientation orient
void updateInlineSection(FxListItemSG *)
void updateSections() override
bool headerNeedsSeparateFixup
qreal originPosition() const override
QQuickListView::FooterPositioning footerPositioning
void fixupPosition() override
QString sectionAt(int modelIndex)
void updateSectionCriteria() override
qreal snapPosAt(qreal pos)
void initializeComponentItem(QQuickItem *item) const override
void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &oldGeometry) override
void updateHeader() override
void layoutVisibleItems(int fromModelIndex=0) override
static const int sectionCacheSize
qreal desiredViewportPosition
void fixupHeaderCompleted()
qreal endPositionAt(int index) const override
QString nextStickySection
void updateHighlight() override
void setPosition(qreal pos) override
qreal lastPosition() const override
bool addVisibleItems(qreal fillFrom, qreal fillTo, qreal bufferFrom, qreal bufferTo, bool doBuffer) override
void adjustFirstItem(qreal forwards, qreal backwards, int) override
QQuickItem * currentSectionItem
void repositionPackageItemAt(QQuickItem *item, int index) override
void fixup(AxisData &data, qreal minExtent, qreal maxExtent) override
bool applyInsertionChange(const QQmlChangeSet::Change &insert, ChangeResult *changeResult, QList< FxViewItem * > *addedItems, QList< MovedItem > *movingIntoView) override
void changedVisibleIndex(int newIndex) override
QQuickViewSection * sectionCriteria
bool releaseItem(FxViewItem *item, QQmlInstanceModel::ReusableFlag reusableFlag) override
bool showFooterForIndex(int index) const override
FxViewItem * newViewItem(int index, QQuickItem *item) override
void resetHighlightPosition() override
qreal footerSize() const override
bool desiredHeaderVisible
QString lastVisibleSection
bool wantsPointerEvent(const QPointerEvent *event) override
Qt::Orientation layoutOrientation() const override
void repositionItemAt(FxViewItem *item, int index, qreal sizeBuffer) override
bool isRightToLeft() const
bool showHeaderForIndex(int index) const override
void initializeCurrentItem() override
std::unique_ptr< QSmoothedAnimation > highlightHeightAnimator
QQuickListView::HeaderPositioning headerPositioning
qreal fixupHeaderPosition
void updateSizeChangesBeforeVisiblePos(FxViewItem *item, ChangeResult *removeResult) override
void initializeViewItem(FxViewItem *item) override
bool hasStickyFooter() const override
int highlightResizeDuration
qreal positionAt(int index) const override
bool flick(QQuickItemViewPrivate::AxisData &data, qreal minExtent, qreal maxExtent, qreal vSize, QQuickTimeLineCallback::Callback fixupCallback, QEvent::Type eventType, qreal velocity) override
qreal highlightResizeVelocity
void updateCurrentSection()
void updateStickySections()
std::unique_ptr< QSmoothedAnimation > highlightWidthAnimator
QString currentStickySection
void updateFooter() override
FxViewItem * itemBefore(int modelIndex) const
QQuickItem * nextSectionItem
QQuickItem * sectionCache[sectionCacheSize]
void releaseSectionItems()
QQuickItemViewAttached * getAttachedObject(const QObject *object) const override
bool movingFromHighlight() override
void resetFirstItemPosition(qreal pos=0.0) override
bool isBottomToTop() const
bool removeNonVisibleItems(qreal bufferFrom, qreal bufferTo) override
qreal highlightMoveVelocity
QQuickItem * getSectionItem(const QString §ion)
void removeItem(FxViewItem *item)
bool isContentFlowReversed() const override
QQuickListView::SnapMode snapMode
qreal headerSize() const override
std::unique_ptr< QSmoothedAnimation > highlightPosAnimator
void clear(bool onDestruction) override
void setOrientation(Orientation)
int highlightResizeDuration
QQuickListView(QQuickItem *parent=nullptr)
\qmltype ListView \instantiates QQuickListView \inqmlmodule QtQuick\inherits Flickable
void viewportMoved(Qt::Orientations orient) override
\qmlproperty Transition QtQuick::ListView::populate
void highlightMoveVelocityChanged()
void setHighlightMoveDuration(int) override
void highlightResizeDurationChanged()
void orientationChanged()
qreal highlightResizeVelocity
void keyPressEvent(QKeyEvent *) override
This event handler can be reimplemented in a subclass to receive key press events for an item.
FINALFooterPositioning footerPositioning
void setFooterPositioning(FooterPositioning positioning)
void setHighlightResizeDuration(int)
void setSnapMode(SnapMode mode)
void setSpacing(qreal spacing)
qreal maxYExtent() const override
void highlightResizeVelocityChanged()
qreal maxXExtent() const override
void incrementCurrentIndex()
\qmlmethod QtQuick::ListView::incrementCurrentIndex()
void setHighlightResizeVelocity(qreal)
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override
void setHighlightFollowsCurrentItem(bool) override
\qmlattachedproperty bool QtQuick::ListView::isCurrentItem \readonly
HeaderPositioning headerPositioning
void decrementCurrentIndex()
\qmlmethod QtQuick::ListView::decrementCurrentIndex()
void setHeaderPositioning(HeaderPositioning positioning)
static QQuickListViewAttached * qmlAttachedProperties(QObject *)
\qmlmethod QtQuick::ListView::positionViewAtIndex(int index, PositionMode mode)
void setHighlightMoveVelocity(qreal)
QQuickViewSection * sectionCriteria()
\qmlproperty enumeration QtQuick::ListView::layoutDirection This property holds the layout direction ...
qreal highlightMoveVelocity
void reset(QQuickTimeLineValue &)
Cancel (but don't complete) all scheduled actions for timeLineValue.
int accel(QQuickTimeLineValue &, qreal velocity, qreal accel)
Decelerate timeLineValue from the starting velocity to zero at the given acceleration rate.
void callback(const QQuickTimeLineCallback &)
Execute the event.
int accelDistance(QQuickTimeLineValue &, qreal velocity, qreal distance)
Decelerate timeLineValue from the starting velocity to zero over the given distance.
void set(QQuickTimeLineValue &, qreal)
Set the value of timeLineValue.
void move(QQuickTimeLineValue &, qreal destination, int time=500)
Linearly change the timeLineValue from its current value to the given destination value over time mil...
void updated()
Emitted each time the timeline modifies QQuickTimeLineValues.
int duration() const override
void setDelegate(QQmlComponent *delegate)
QQuickViewSection(QQuickListView *parent=nullptr)
void labelPositioningChanged()
void setProperty(const QString &)
QString sectionString(const QString &value)
void setCriteria(SectionCriteria)
void setLabelPositioning(int pos)
\inmodule QtCore\reentrant
constexpr qreal y() const noexcept
Returns the y-coordinate of the rectangle's top edge.
constexpr qreal height() const noexcept
Returns the height of the rectangle.
constexpr qreal width() const noexcept
Returns the width of the rectangle.
constexpr qreal x() const noexcept
Returns the x-coordinate of the rectangle's left edge.
\macro QT_RESTRICTED_CAST_FROM_ASCII
void clear()
Clears the contents of the string and makes it null.
QString section(QChar sep, qsizetype start, qsizetype end=-1, SectionFlags flags=SectionDefault) const
This function returns a section of the string.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
int compare(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
QByteArray toUtf8() const &
cache insert(employee->id(), employee)
QSet< QString >::iterator it
Combined button and popup list for selecting options.
static QDBusError::ErrorType get(const char *name)
static const qint64 headerSize
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) noexcept
bool qFuzzyIsNull(qfloat16 f) noexcept
qfloat16 qSqrt(qfloat16 f)
int qRound(qfloat16 d) noexcept
#define Q_LOGGING_CATEGORY(name,...)
#define qCDebug(category,...)
constexpr const T & qMin(const T &a, const T &b)
constexpr const T & qBound(const T &min, const T &val, const T &max)
constexpr const T & qMax(const T &a, const T &b)
constexpr T qAbs(const T &t)
n void setPosition(void) \n\
GLint GLfloat GLfloat GLfloat v2
GLsizei const GLfloat * v
[13]
GLint GLint GLint GLint GLint x
[0]
GLint GLsizei GLsizei height
GLfloat GLfloat GLfloat GLfloat GLfloat maxY
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLenum GLsizei count
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLfloat GLfloat GLfloat GLfloat maxX
GLdouble GLdouble GLdouble GLdouble q
QQmlContext * qmlContext(const QObject *obj)
QObject * qmlAttachedPropertiesObject(QObject *object, QQmlAttachedPropertiesFunc func, bool create)
void QQml_setParent_noEvent(QObject *object, QObject *parent)
Makes the object a child of parent.
QQuickItem * qmlobject_cast< QQuickItem * >(QObject *object)
static QQuickAttachedPropertyPropagator * attachedObject(const QMetaObject *type, QObject *object, bool create=false)
const qreal _q_MinimumFlickVelocity
QQuickItem * qobject_cast< QQuickItem * >(QObject *o)
#define QML_FLICK_SNAPONETHRESHOLD
static qreal positionAt(const QQuickRangeSlider *slider, QQuickItem *handle, const QPointF &point)
QLatin1StringView QLatin1String
#define QStringLiteral(str)
static QT_BEGIN_NAMESPACE void init(QTextBoundaryFinder::BoundaryType type, QStringView str, QCharAttributes *attributes)
QSqlQueryModel * model
[16]
std::uniform_real_distribution dist(1, 2.5)
[2]
MoveKey moveKey(int index) const
QQmlNullableValue< qreal > visiblePos
qreal sizeChangesAfterVisiblePos
qreal sizeChangesBeforeVisiblePos
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent