- 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 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: !root.landscape()? parent.height*0.17:parent.width*0.17
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
}
} }
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 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
// } // }