aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquicktumbler_p_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/quicktemplates2/qquicktumbler_p_p.h')
-rw-r--r--src/quicktemplates2/qquicktumbler_p_p.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/quicktemplates2/qquicktumbler_p_p.h b/src/quicktemplates2/qquicktumbler_p_p.h
index 4d4c3bcf..2f8b1207 100644
--- a/src/quicktemplates2/qquicktumbler_p_p.h
+++ b/src/quicktemplates2/qquicktumbler_p_p.h
@@ -76,7 +76,8 @@ public:
int visibleItemCount = 5;
bool wrap = true;
bool explicitWrap = false;
- bool ignoreWrapChanges = false;
+ bool modelBeingSet = false;
+ bool currentIndexSetDuringModelChange = false;
QQuickItem *view = nullptr;
QQuickItem *viewContentItem = nullptr;
ContentItemType viewContentItemType = UnsupportedContentItemType;
@@ -104,11 +105,17 @@ public:
void warnAboutIncorrectContentItem();
void syncCurrentIndex();
+ enum PropertyChangeReason {
+ UserChange,
+ InternalChange
+ };
+
+ void setCurrentIndex(int newCurrentIndex, PropertyChangeReason changeReason = InternalChange);
void setCount(int newCount);
void setWrapBasedOnCount();
void setWrap(bool shouldWrap, bool isExplicit);
- void lockWrap();
- void unlockWrap();
+ void beginSetModel();
+ void endSetModel();
void itemChildAdded(QQuickItem *, QQuickItem *) override;
void itemChildRemoved(QQuickItem *, QQuickItem *) override;