blob: 2435f107dc7eb388c126b6b56527c0b0c5c3548c (
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
|
Item {
height: 100
id: Root
signal engineClicked(int id)
signal refreshEngines()
HorizontalLayout {
anchors.fill: parent
Repeater {
dataSource: engines
Item {
width: 100; height: 100;
Image {
id: Image;
source: "engine.png"
anchors.horizontalCenter: parent.horizontalCenter
}
Text {
anchors.top: Image.bottom;
text: modelData.name + "(" + modelData.engineId + ")"
anchors.horizontalCenter: parent.horizontalCenter
}
MouseRegion {
anchors.fill: parent
onClicked: Root.engineClicked(modelData.engineId);
}
}
}
}
Image {
y: 15
source: "refresh.png";
width: 75;
height: 63;
smooth: true
anchors.right: parent.right
MouseRegion {
anchors.fill: parent
onClicked: Root.refreshEngines()
}
}
}
|