-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathServicePage.qml
90 lines (80 loc) · 3.52 KB
/
ServicePage.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
import QtQuick 2.9
import QtQuick.Window 2.3
import feedbackapp.static.utils 1.0
import QtQuick.Controls 2.2
Page {
id: page
visible: true
title: "Service"
signal serviceSelected(string serviceId)
signal quitClicked()
signal startClicked()
property int selectedService: 0
Component.onCompleted: function() {
pageSelectService(svc1.checked, svc1.text)
pageSelectService(svc2.checked, svc2.text)
pageSelectService(svc3.checked, svc3.text)
pageSelectService(svc4.checked, svc4.text)
pageSelectService(svc5.checked, svc5.text)
pageSelectService(svc6.checked, svc6.text)
pageSelectService(svc7.checked, svc7.text)
pageSelectService(svc8.checked, svc8.text)
pageSelectService(svc9.checked, svc9.text)
pageSelectService(svc10.checked, svc10.text)
}
function pageSelectService(isChecked, value) {
console.info("init page checked and value " + isChecked + " " + value)
if(isChecked) {
serviceSelected(value)
}
}
footer: Rectangle {
id: footerRectangle
width: parent.width
height: 80
color: "#00000000"
transformOrigin: Item.Center
anchors.horizontalCenter: parent.horizontalCenter
Button {
anchors.horizontalCenterOffset: parent.width * -0.2
anchors.horizontalCenter: parent.horizontalCenter
onClicked: startClicked()
text: qsTr("Start")
highlighted: true
}
Button {
anchors.horizontalCenterOffset: parent.width * 0.2
anchors.horizontalCenter: parent.horizontalCenter
onClicked: quitClicked()
text: qsTr("Quit")
}
}
Column {
anchors.topMargin: 20
anchors.top: labelTitle.bottom
anchors.horizontalCenter: parent.horizontalCenter
GroupBox {
Column{
RadioButton { id: svc1; text: AppUtils.getService(0); checked: true; onClicked: pageSelectService(svc1.checked, svc1.text); }
RadioButton { id: svc2; text: AppUtils.getService(1); onClicked: pageSelectService(svc2.checked, svc2.text); }
RadioButton { id: svc3; text: AppUtils.getService(2); onClicked: pageSelectService(svc3.checked, svc3.text); }
RadioButton { id: svc4; text: AppUtils.getService(3); onClicked: pageSelectService(svc4.checked, svc4.text); }
RadioButton { id: svc5; text: AppUtils.getService(4); onClicked: pageSelectService(svc5.checked, svc5.text); }
RadioButton { id: svc6; text: AppUtils.getService(5); onClicked: pageSelectService(svc6.checked, svc6.text); }
RadioButton { id: svc7; text: AppUtils.getService(6); onClicked: pageSelectService(svc7.checked, svc7.text); }
RadioButton { id: svc8; text: AppUtils.getService(7); onClicked: pageSelectService(svc8.checked, svc8.text) }
RadioButton { id: svc9; text: AppUtils.getService(8); onClicked: pageSelectService(svc9.checked, svc9.text) }
RadioButton { id: svc10; text: AppUtils.getService(9); onClicked: pageSelectService(svc10.checked, svc10.text) }
}
}
}
Label {
id: labelTitle
text: qsTr("Please choose the service you're running today:")
anchors.topMargin: parent.height * 0.08
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
horizontalAlignment: Text.AlignHCenter
font.pixelSize: AppUtils.FontSize
}
}