summaryrefslogtreecommitdiffstats
path: root/tools/qmldebugger/standalone/engines.qml
blob: 0b2b7ac498eb792346cd2d3803140ace46b3f4d9 (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()
        }
    }
}