-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.qml
114 lines (98 loc) · 2.77 KB
/
main.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
import QtQuick 2.15
import QtQuick.Controls 2.15
ApplicationWindow {
id: window
visible: true
width: 800
maximumWidth: 800
minimumWidth: 800
height: 480
maximumHeight: 480
minimumHeight: 480
title: "ARIG Robot GUI"
header: ToolBar {
id: toolBar
contentHeight: toolButton.implicitHeight
visible: !RobotModel.inMatch
ToolButton {
visible: stackView.depth > 1
text: "\u25C0"
font.pixelSize: Qt.application.font.pixelSize * 1.6
onClicked: stackView.pop()
}
ToolButton {
text: "PAMIs"
anchors.leftMargin: 50
font.pixelSize: Qt.application.font.pixelSize * 1.6
visible: (ParamsModel.primary || !RobotModel.otherRobot) && !ParamsModel.pami && stackView.currentItem.title !== "Etats des PAMIs"
onClicked: stackView.push("Pamis.qml")
}
Label {
text: stackView.currentItem.title
font.pixelSize: Qt.application.font.pixelSize * 1.6
anchors.centerIn: parent
}
ToolButton {
id: toolButton
text: "\u274c"
font.pixelSize: Qt.application.font.pixelSize * 1.6
anchors.right: parent.right
onClicked: exitConfirmation.open()
}
}
StackView {
id: stackView
initialItem: "ConfigurationForm.qml"
anchors.fill: parent
}
Popup {
id: exitConfirmation
modal: true
focus: true
width: 400
height: 150
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
enter: Transition {
NumberAnimation {
property: "opacity"
from: 0.0
to: 1.0
}
}
exit: Transition {
NumberAnimation {
property: "opacity"
from: 1.0
to: 0.0
}
}
anchors.centerIn: Overlay.overlay
contentItem: Column {
padding: 5
spacing: 10
Label {
text: "Quitter le programme ?"
font.pointSize: 16
}
Row {
padding: 5
spacing: 10
anchors.right: parent.right
anchors.rightMargin: 5
Button {
text: "Non"
onClicked: {
RobotModel.exit = false
exitConfirmation.close();
}
}
Button {
text: "Oui"
onClicked: {
RobotModel.exit = true
}
}
}
}
}
}