- made connection icons variable

This commit is contained in:
Dorian Zedler 2019-03-27 22:26:45 +01:00
parent b52ff6701e
commit 03ec489cfb

View file

@ -38,10 +38,6 @@ Window {
id:root
anchors.fill: parent
property double startTime: 0
property double stoppedTime: 0
property double currTime
//set default state to IDLE
state: "IDLE"
@ -180,36 +176,45 @@ Window {
height: !root.landscape()? parent.height*0.3:parent.width*0.3
}
ConnectionIcon {
id: buzzerConnIcon
status: speedBackend.baseStationConnections[1]["state"]
Row {
id: connectedExtensionsRow
source: appTheme.style.buzzerIcon
anchors {
top: parent.top
topMargin: 10
left: baseConnConnIcon.right
leftMargin: 1
}
height: !root.landscape()? parent.height*0.17:parent.width*0.17
}
ConnectionIcon {
id: startpadConnIcon
status: speedBackend.baseStationConnections[0]["state"]
height: parent.height
width: parent.width
source: appTheme.style.startpadIcon
anchors {
top: parent.top
topMargin: 10
left: buzzerConnIcon.right
leftMargin: 0
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
}
}
Rectangle {
id: upper_line
width: root.landscape() ? 1:parent.width
@ -238,8 +243,8 @@ Window {
contentItem: Text {
//make text disappear
}
height: root.landscape() ? size > parent.height * 0.9 ? parent.height * 0.9:size : size
width: root.landscape() ? size : size > parent.width * 0.9 ? parent.width * 0.9: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: height
Label {
id: startButt_text
@ -361,10 +366,6 @@ Window {
}
}
ErrorDialog {
id: errorDialog
}
// ProfilesDialog {
// id: profilesDialog
// }