diff options
author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2019-03-22 14:43:23 +0100 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2019-04-23 18:56:46 +0000 |
commit | 93818a359973003531e2a5ef2d55cf58b3d440d9 (patch) | |
tree | 6bb00a4e32a7da618aa178fd133792be02d8293d /src/quick/items/qquicktableview_p_p.h | |
parent | ebc45299ccf4750cfc0b93c39a60f94b7ec4ea7f (diff) |
QQuickTableView: add new 'syncView' property
This property can be set to point to another TableView.
If set, this TableView will be synchronized to the
other table with respect to flicking, column width, row
heights, spacing, etc. This logic is needed as a foundation
for the upcoming HeaderView.
Upcoming patches will implement this logic (together with
autotests) gradually.
Change-Id: Ic7dea8e1d1aa46bbb3ea6e795953a65c96c25cc6
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.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/quick/items/qquicktableview_p_p.h b/src/quick/items/qquicktableview_p_p.h index 6bbfd4e2d6..c018356efa 100644 --- a/src/quick/items/qquicktableview_p_p.h +++ b/src/quick/items/qquicktableview_p_p.h @@ -249,6 +249,8 @@ public: bool blockItemCreatedCallback = false; bool layoutWarningIssued = false; bool polishing = false; + bool syncVertically = false; + bool syncHorizontally = false; QJSValue rowHeightProvider; QJSValue columnWidthProvider; @@ -271,6 +273,11 @@ public: QSizeF averageEdgeSize; + QPointer<QQuickTableView> assignedSyncView; + QPointer<QQuickTableView> syncView; + QList<QPointer<QQuickTableView> > syncChildren; + Qt::Orientations assignedSyncDirection = Qt::Horizontal | Qt::Vertical; + const static QPoint kLeft; const static QPoint kRight; const static QPoint kUp; @@ -369,6 +376,7 @@ public: inline void syncDelegate(); inline void syncModel(); inline void syncRebuildOptions(); + inline void syncSyncView(); void connectToModel(); void disconnectFromModel(); |