summaryrefslogtreecommitdiff
path: root/sysinfowatchlet/metawatch-digital.qml
blob: 67486ba1c9c1bba37fc0e842233b5073cb175eae (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
import Qt 4.7
import com.javispedro.sowatch.metawatch 1.0

Rectangle {
	width: 96
	height: 96

	color: "white"

	Column {
		anchors.fill: parent

		MWTitle {
			id: title
			text: qsTr("Phone Info")
		}

		Column {
			spacing: 4

			Text {
				text: "Battery: " + batteryLevel + "%"
			}

			Rectangle {
				id: battery
				x: 12
				width: 72
				height: 16

				border.color: "black"
				border.width: 1

				Rectangle {
					width: (batteryLevel / 100) * parent.width
					height: parent.height

					color: "black"
				}
			}

			Text {
				width: parent.width
				text: "Connected to:"
			}

			Text {
				width: parent.width
				text: networkName
				horizontalAlignment: Text.AlignHCenter
				wrapMode: Text.Wrap
			}
		}
	}
}