summaryrefslogtreecommitdiffstats
path: root/framework
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-07-22 04:30:45 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-07-22 04:30:45 +0200
commit7eddc26d24defb3444e21adfbd43f8e568be576d (patch)
tree3304b432ba49ef52df8f9de993a7ea4694dc0fff /framework
parent26e02b898d3f4e63c942d2742cb920aec9e6489c (diff)
downloadkube-7eddc26d24defb3444e21adfbd43f8e568be576d.tar.gz
kube-7eddc26d24defb3444e21adfbd43f8e568be576d.zip
ModelIndexRetriever to abuse Repeater less publicly
Simliar to Retriever, but we'd have to alias all properties/roles automatically somehow.
Diffstat (limited to 'framework')
-rw-r--r--framework/qml/ModelIndexRetriever.qml32
-rw-r--r--framework/qmldir1
2 files changed, 33 insertions, 0 deletions
diff --git a/framework/qml/ModelIndexRetriever.qml b/framework/qml/ModelIndexRetriever.qml
new file mode 100644
index 00000000..fa3fb64b
--- /dev/null
+++ b/framework/qml/ModelIndexRetriever.qml
@@ -0,0 +1,32 @@
1/*
2 * Copyright (C) 2017 Christian Mollekopf, <mollekopf@kolabsys.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 */
18
19import QtQuick 2.4
20
21Repeater {
22 id: root
23 property var currentData
24 Item {
25 id: delegate
26 property var currentData: model
27 onCurrentDataChanged: {
28 root.currentData = model
29 }
30 visible: false
31 }
32}
diff --git a/framework/qmldir b/framework/qmldir
index b7e455b3..0a71b6c8 100644
--- a/framework/qmldir
+++ b/framework/qmldir
@@ -33,6 +33,7 @@ ListView 1.0 ListView.qml
33TreeView 1.0 TreeView.qml 33TreeView 1.0 TreeView.qml
34GridView 1.0 GridView.qml 34GridView 1.0 GridView.qml
35ScrollHelper 1.0 ScrollHelper.qml 35ScrollHelper 1.0 ScrollHelper.qml
36ModelIndexRetriever 1.0 ModelIndexRetriever.qml
36singleton Messages 1.0 Messages.qml 37singleton Messages 1.0 Messages.qml
37singleton Colors 1.0 Colors.qml 38singleton Colors 1.0 Colors.qml
38singleton Icons 1.0 Icons.qml 39singleton Icons 1.0 Icons.qml