blob: a782602116c36405bd499b566042a8fab5cc1140 (
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
import QtQuick 2.0
Item {
ListView {
model: pois
anchors.fill: parent
id: listView
delegate: Rectangle {
height: 64
color: "#ff0000"
radius: 2
border.width: 1
Image {
id: image1
height: parent.height - 4;
source : model.modelData.active ? "icons/appbar.layer.svg" : "icons/appbar.layer.delete.svg"
opacity: model.modelData.active ? 1 : 0.4
}
Text {
width: 128
id: distanceText
text: distance
color: "#ffffff"
anchors.verticalCenter: parent.verticalCenter
anchors.left: image1.right
anchors.leftMargin: 8
}
Text {
text: name
color: "#ffffff"
anchors.verticalCenter: parent.verticalCenter
anchors.left: distanceText.right
anchors.leftMargin: 8
}
MouseArea{
anchors.fill: parent
hoverEnabled: true
onEntered: {
// backend.list_maps(1)
}
}
}
Component.onCompleted: backend.get_pois()
}
Rectangle {
height: 64
width: height
x: parent.width - width
y: parent.height - height * 2
color: "#35322f"
Image {
anchors.centerIn: parent
source: "icons/appbar.chevron.up.svg"
}
MouseArea {
anchors.fill: parent
id: listUp
SmoothedAnimation {
target: listView
property: "contentY"
running: listUp.pressed
velocity: 1000
to: 0
}
onReleased: {
if (!listView.atYBeginning)
listView.flick(0, 1000)
}
}
}
Rectangle {
height: 64
width: height
x: parent.width - width
y: parent.height - height
color: "#35322f"
Image {
anchors.centerIn: parent
source: "icons/appbar.chevron.down.svg"
}
MouseArea {
anchors.fill: parent
id: listDown
SmoothedAnimation {
target: listView
property: "contentY"
running: listDown.pressed
to: listView.contentHeight - listView.height
velocity: 1000
}
onReleased: {
if (!listView.atYEnd)
listView.flick(0, -1000)
}
}
}
}
|