- 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,36 +176,45 @@ 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
}
ConnectionIcon { height: parent.height
id: startpadConnIcon width: parent.width
status: speedBackend.baseStationConnections[0]["state"]
source: appTheme.style.startpadIcon Repeater {
anchors { id: connectedExtensionsRep
top: parent.top anchors.fill: parent
topMargin: 10 model: speedBackend.baseStationConnections.length
left: buzzerConnIcon.right delegate: ConnectionIcon {
leftMargin: 0 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 { Rectangle {
id: upper_line id: upper_line
width: root.landscape() ? 1:parent.width width: root.landscape() ? 1:parent.width
@ -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
// } // }