[vlc-devel] [PATCH 06/22] qml: expose positionViewAtIndex in KeyNavigable{List|Grid}View

Pierre Lamot pierre at videolabs.io
Fri Feb 14 11:23:41 CET 2020


---
 modules/gui/qt/widgets/qml/KeyNavigableGridView.qml  | 4 ++++
 modules/gui/qt/widgets/qml/KeyNavigableListView.qml  | 4 ++++
 modules/gui/qt/widgets/qml/KeyNavigableTableView.qml | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/modules/gui/qt/widgets/qml/KeyNavigableGridView.qml b/modules/gui/qt/widgets/qml/KeyNavigableGridView.qml
index cea95a75a5..b71ca5555e 100644
--- a/modules/gui/qt/widgets/qml/KeyNavigableGridView.qml
+++ b/modules/gui/qt/widgets/qml/KeyNavigableGridView.qml
@@ -53,6 +53,10 @@ NavigableFocusScope {
 
     Accessible.role: Accessible.Table
 
+    function positionViewAtIndex(index, mode) {
+        view.positionViewAtIndex(index, mode)
+    }
+
     GridView {
         id: view
 
diff --git a/modules/gui/qt/widgets/qml/KeyNavigableListView.qml b/modules/gui/qt/widgets/qml/KeyNavigableListView.qml
index 013c16d129..d7a9664a12 100644
--- a/modules/gui/qt/widgets/qml/KeyNavigableListView.qml
+++ b/modules/gui/qt/widgets/qml/KeyNavigableListView.qml
@@ -69,6 +69,10 @@ NavigableFocusScope {
         view.contentX -= Math.min(view.width,view.contentX )
     }
 
+    function positionViewAtIndex(index, mode) {
+        view.positionViewAtIndex(index, mode)
+    }
+
     Component {
         id: sectionHeading
 
diff --git a/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml b/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
index 26d2ed9e5a..ad59f7ff8e 100644
--- a/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
+++ b/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
@@ -55,6 +55,10 @@ NavigableFocusScope {
 
     Accessible.role: Accessible.Table
 
+    function positionViewAtIndex(index, mode) {
+        view.positionViewAtIndex(index, mode)
+    }
+
     Util.SelectableDelegateModel {
         id: delegateModel
 
-- 
2.17.1



More information about the vlc-devel mailing list