- made connection icons variable
This commit is contained in:
parent
b52ff6701e
commit
03ec489cfb
1 changed files with 28 additions and 27 deletions
57
qml/main.qml
57
qml/main.qml
|
@ -38,10 +38,6 @@ Window {
|
||||||
id:root
|
id:root
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
property double startTime: 0
|
|
||||||
property double stoppedTime: 0
|
|
||||||
property double currTime
|
|
||||||
|
|
||||||
//set default state to IDLE
|
//set default state to IDLE
|
||||||
state: "IDLE"
|
state: "IDLE"
|
||||||
|
|
||||||
|
@ -180,35 +176,44 @@ Window {
|
||||||
height: !root.landscape()? parent.height*0.3:parent.width*0.3
|
height: !root.landscape()? parent.height*0.3:parent.width*0.3
|
||||||
}
|
}
|
||||||
|
|
||||||
ConnectionIcon {
|
Row {
|
||||||
id: buzzerConnIcon
|
id: connectedExtensionsRow
|
||||||
status: speedBackend.baseStationConnections[1]["state"]
|
|
||||||
|
|
||||||
source: appTheme.style.buzzerIcon
|
|
||||||
anchors {
|
anchors {
|
||||||
top: parent.top
|
top: parent.top
|
||||||
topMargin: 10
|
topMargin: 10
|
||||||
left: baseConnConnIcon.right
|
left: baseConnConnIcon.right
|
||||||
leftMargin: 1
|
leftMargin: 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
height: parent.height
|
||||||
|
width: parent.width
|
||||||
|
|
||||||
|
Repeater {
|
||||||
|
id: connectedExtensionsRep
|
||||||
|
anchors.fill: parent
|
||||||
|
model: speedBackend.baseStationConnections.length
|
||||||
|
delegate: ConnectionIcon {
|
||||||
|
id: buzzerConnIcon
|
||||||
|
status: speedBackend.baseStationConnections[index]["state"]
|
||||||
|
|
||||||
|
source: {
|
||||||
|
var source
|
||||||
|
switch(speedBackend.baseStationConnections[index]["type"]){
|
||||||
|
case "STARTPAD":
|
||||||
|
source = appTheme.style.startpadIcon
|
||||||
|
break
|
||||||
|
case "TOPPAD":
|
||||||
|
source = appTheme.style.buzzerIcon
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
height: !root.landscape()? parent.height*0.17:parent.width*0.17
|
height: !root.landscape()? parent.height*0.17:parent.width*0.17
|
||||||
}
|
}
|
||||||
|
|
||||||
ConnectionIcon {
|
|
||||||
id: startpadConnIcon
|
|
||||||
status: speedBackend.baseStationConnections[0]["state"]
|
|
||||||
|
|
||||||
source: appTheme.style.startpadIcon
|
|
||||||
anchors {
|
|
||||||
top: parent.top
|
|
||||||
topMargin: 10
|
|
||||||
left: buzzerConnIcon.right
|
|
||||||
leftMargin: 0
|
|
||||||
}
|
|
||||||
height: !root.landscape() ? parent.height*0.17:parent.width*0.17
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: upper_line
|
id: upper_line
|
||||||
|
@ -238,8 +243,8 @@ Window {
|
||||||
contentItem: Text {
|
contentItem: Text {
|
||||||
//make text disappear
|
//make text disappear
|
||||||
}
|
}
|
||||||
height: root.landscape() ? size > parent.height * 0.9 ? parent.height * 0.9:size : size
|
height: root.landscape() ? (size > parent.height * 0.9 ? parent.height * 0.9:size) : (size > parent.width * 0.9 ? parent.width * 0.9:size)
|
||||||
width: root.landscape() ? size : size > parent.width * 0.9 ? parent.width * 0.9:size
|
width: height
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
id: startButt_text
|
id: startButt_text
|
||||||
|
@ -361,10 +366,6 @@ Window {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorDialog {
|
|
||||||
id: errorDialog
|
|
||||||
}
|
|
||||||
|
|
||||||
// ProfilesDialog {
|
// ProfilesDialog {
|
||||||
// id: profilesDialog
|
// id: profilesDialog
|
||||||
// }
|
// }
|
||||||
|
|
Reference in a new issue