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

Rectangle {
	width: 96
	height: 96

	color: "white"

	Column {
		anchors.fill: parent
		spacing: 4

		MWTitle {
			id: title
			text: qsTr("Phone Info")
			icon.source: "icon.png"
		}

		MWLabel {
			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"
			}
		}

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

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