blob: d3e0f5ad2e6b3cdb504f1eddfc84fee1be6495dc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
import QtQuick 2.9
import QtQuick.Controls 2.2
import "../themes/themes.js" as Theme
Page {
title: qsTr("Select Location")
ListView {
id: gwList
focus: true
currentIndex: -1
anchors.fill: parent
spacing: 1
delegate: ItemDelegate {
id: loc
Rectangle {
width: parent.width
height: 1
color: Theme.borderColor
}
width: parent.width
text: model.text
highlighted: ListView.isCurrentItem
icon.color: "transparent"
icon.source: model.icon
onClicked: {
model.triggered()
stackView.pop()
}
MouseArea {
property var onMouseAreaClicked: function () {
parent.clicked()
}
id: mouseArea
anchors.fill: loc
cursorShape: Qt.PointingHandCursor
onReleased: {
onMouseAreaClicked()
}
}
}
model: ListModel {
ListElement {
text: qsTr("Paris")
triggered: function () {}
icon: "../resources/reception-4.svg"
}
ListElement {
text: qsTr("Montreal")
triggered: function () {}
icon: "../resources/reception-4.svg"
}
ListElement {
text: qsTr("Seattle")
triggered: function () {}
icon: "../resources/reception-2.svg"
}
}
}
}
|