-
Notifications
You must be signed in to change notification settings - Fork 0
/
SettingsWindow.qml
160 lines (124 loc) · 4.15 KB
/
SettingsWindow.qml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
import QtQuick 2.0
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.2
Rectangle {
id: settingsWindow
anchors.fill: parent
color: "darkgray"
Rectangle {
id: titleRect
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width
height: parent.height/10
color: "black"
Text {
id: title
text: qsTr("OPTIONS")
font.pixelSize: backButton.height/2
color: "steelblue"
font.bold: true
anchors.centerIn: parent
}
}
Rectangle {
id:label
width: parent.width/1.3
height: parent.height/12
color: "black"
anchors.top: titleRect.bottom
anchors.topMargin: 10
anchors.left: titleRect.left
Text {
id: addKiloPrefixText
text: qsTr("ADD KILO PREFIX TO UNITS")
font.pixelSize: backButton.height/3
anchors.centerIn: parent
color: "steelblue"
}
}
signal switchSignal (bool state);
Switch {
id: unitsPrefixSwitch
anchors.left: label.right
anchors.leftMargin: 10
anchors.top: label.top
onClicked: unitsPrefixSwitch.checked ? switchSignal(true) :switchSignal(false)
checked: root.setSwitch
style: SwitchStyle {
groove: Rectangle {
implicitWidth: label.width/4
implicitHeight: label.height
border.width: 1
color: "black"
Text {
id: onn
text: unitsPrefixSwitch.checked?"ON":""
color: "white"
font.bold: true
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
font.pixelSize: backButton.height/3
}
Text {
id: off
text: unitsPrefixSwitch.checked?"":"OFF"
color: "white"
font.bold: true
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
font.pixelSize: backButton.height/3
}
}
}
}
Text {
id: todoText
text: qsTr(" \n SOME MORE OPTIONS COMMING SOON")
anchors.centerIn: parent
color: "black"
font.pixelSize: backButton.height/3
}
Rectangle {
anchors.bottom: backButton.top
anchors.bottomMargin: height*0.1
width: parent.width
height: parent.height/10
color: "black"
Text {
id: aboutText
text: qsTr("ABOUT")
font.pixelSize: parent.height/2.2
anchors.centerIn: parent
// font.bold: true
color: "steelblue"
}
MouseArea {
id: aboutButton
anchors.fill: parent
onClicked: {
settingsLoader.source = "About.qml"
}
}
}
Rectangle {
id: backButton
anchors.bottom: parent.bottom
width: parent.width
height: parent.height/10
color: "black"
Text {
id: backText
text: qsTr("BACK")
color: "steelblue"
font.pixelSize: parent.height/2
anchors.centerIn: parent
}
MouseArea {
anchors.fill: parent
onClicked: {
settingsLoader.source = ""
}
}
}
}