Debian Codegraph @

tests/resources/sliders/SliderTest.qml

raw
1 /*
2 * Copyright 2014 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17 import QtQuick 2.0
18 import Lomiri.Components 1.1
19 import Lomiri.Components.ListItems 1.0
20
21 MainView {
22 width: units.gu(50)
23 height: units.gu(100)
24
25 Column {
26 anchors {
27 fill: parent
28 margins: units.gu(1)
29 }
30 LomiriListView {
31 id: listView
32 width: parent.width
33 height: units.gu(20)
34 clip: true
35 model: 10
36 interactive: true
37 delegate: Standard {
38 control: Slider {
39 objectName: "testSlider" + index
40 }
41 }
42 }
43 LomiriListView {
44 id: listView2
45 width: parent.width
46 height: units.gu(20)
47 clip: true
48 model: 10
49 delegate: Slider {
50 objectName: "testSlider" + index
51 }
52 }
53 Flickable {
54 id: flickable
55 width: parent.width
56 height: units.gu(20)
57 clip: true
58 contentHeight: column.height
59 Column {
60 id: column
61 width: parent.width
62 height: childrenRect.height
63 Repeater {
64 model: 10
65 Standard {
66 control: Slider {
67 objectName: "testSlider" + index
68 }
69 }
70 }
71 }
72 }
73 Flickable {
74 id: flickable2
75 width: parent.width
76 height: units.gu(20)
77 clip: true
78 contentHeight: column2.height
79 Column {
80 id: column2
81 width: parent.width
82 height: childrenRect.height
83 Repeater {
84 model: 10
85 Slider {
86 objectName: "testSlider" + index
87 }
88 }
89 }
90 }
91 }
92 }