blob: 1e9335b58839309561e91897738684a0f14fc79e (
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
|
import Qt 4.6
Item {
height: 100
id: Root
signal engineClicked(int id)
signal refreshEngines()
Row {
anchors.fill: parent
Repeater {
model: engines
Item {
width: 100; height: 100;
Image {
id: EngineIcon;
source: "qrc:/engine.png"
anchors.horizontalCenter: parent.horizontalCenter
}
Text {
anchors.top: EngineIcon.bottom;
text: modelData.name + "(" + modelData.engineId + ")"
anchors.horizontalCenter: parent.horizontalCenter
}
MouseRegion {
anchors.fill: parent
onClicked: Root.engineClicked(modelData.engineId);
}
}
}
}
Image {
y: 15
source: "qrc:/refresh.png";
width: 75;
height: 63;
smooth: true
anchors.right: parent.right
MouseRegion {
anchors.fill: parent
onClicked: Root.refreshEngines()
}
}
}
|