aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktableview_p_p.h
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2019-04-09 14:55:27 +0200
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2019-04-25 12:44:18 +0000
commitef6c58722e6a639a6b48efba007b2f59822b826e (patch)
treeaa6c082bc98edfdc4394b54cb507c35c29626885 /src/quick/items/qquicktableview_p_p.h
parent561a2cec9b95b22783a00b48078b532010357066 (diff)
QQuickTableView: update viewportMoved() to take syncView into account
Now that several table views can stay in sync through the syncView parent-child chain, we also need to ensure that the position of the content views stays in sync. This patch will recursively go through all connected views when one of the views are moved and set the same position on them all according to the syncDirection flag. Change-Id: I5a5b8e795426484eeab3771f6c8d4c9b7da046eb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quick/items/qquicktableview_p_p.h')
-rw-r--r--src/quick/items/qquicktableview_p_p.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/quick/items/qquicktableview_p_p.h b/src/quick/items/qquicktableview_p_p.h
index 13c69d0b43..0b15e63342 100644
--- a/src/quick/items/qquicktableview_p_p.h
+++ b/src/quick/items/qquicktableview_p_p.h
@@ -251,6 +251,8 @@ public:
bool polishing = false;
bool syncVertically = false;
bool syncHorizontally = false;
+ bool inSetLocalViewportPos = false;
+ bool inSyncViewportPosRecursive = false;
QJSValue rowHeightProvider;
QJSValue columnWidthProvider;
@@ -394,6 +396,11 @@ public:
void layoutChangedCallback(const QList<QPersistentModelIndex> &parents, QAbstractItemModel::LayoutChangeHint hint);
void modelResetCallback();
+ void scheduleRebuildIfFastFlick();
+ void setLocalViewportX(qreal contentX);
+ void setLocalViewportY(qreal contentY);
+ void syncViewportPosRecursive();
+
void _q_componentFinalized();
void registerCallbackWhenBindingsAreEvaluated();