aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquicktumbler_p_p.h
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-06-25 10:49:57 +0200
committerLiang Qi <liang.qi@qt.io>2018-06-25 10:49:57 +0200
commit66a781692a4d21ba4c8a124cb4be84e4e2ffa742 (patch)
tree4fe9261e26281ddb5f1444563cda53c8bf39d978 /src/quicktemplates2/qquicktumbler_p_p.h
parent7fec7105b7f6119135aafd6f9ee609128125d594 (diff)
parentd5fbbddd7794265f24d392d33c4874ac756cb9c9 (diff)
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts: src/imports/controls/imagine/TextArea.qml src/imports/controls/imagine/TextField.qml tests/auto/controls/data/tst_tumbler.qml Change-Id: I25a8228a4299fb7a53db70b7223663a1637ed933
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;