Finished initial QML porting
[quandoparte] / application / resources / sailfish / qml / pages / components / DelayIndicator.qml
1 import QtQuick 2.0
2 import Sailfish.Silica 1.0
3
4 Item {
5     id: indicator
6     property int level: 0
7     width: 10
8     height: parent.height
9     anchors {
10         top: parent.top
11         bottom: parent.bottom
12         rightMargin: Theme.paddingMedium
13     }
14     Rectangle {
15         id: rect
16         width: 10
17         height: indicator.height - 10
18         anchors.centerIn: parent
19         color: {
20             switch (indicator.level) {
21             case 0: return "#0b0"
22             case 1: return "#dd0"
23             case 2: return "#da0"
24             case 3: return "#d60"
25             case 4: return "#d00"
26             default: return "#b0b"
27             }
28         }
29     }
30 }