Some cleanup

This commit is contained in:
ChrisTerBeke 2017-12-06 18:15:17 +01:00
parent 28c5debd61
commit 548761fcc3
2 changed files with 38 additions and 61 deletions

View file

@ -16,7 +16,7 @@ Rectangle
anchors.left: parent.left
anchors.right: parent.right
height: UM.Theme.getSize("sidebar_header").height
color: UM.Controller.activeStage.id == "MonitorStage" ? UM.Theme.getColor("topbar_background_color_monitoring") : UM.Theme.getColor("topbar_background_color")
color: UM.Controller.activeStage.stageId == "MonitorStage" ? UM.Theme.getColor("topbar_background_color_monitoring") : UM.Theme.getColor("topbar_background_color")
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
property bool printerAcceptsCommands: printerConnected && Cura.MachineManager.printerOutputDevices[0].acceptsCommands
@ -87,66 +87,6 @@ Rectangle
}
ExclusiveGroup { id: topbarMenuGroup }
// Button
// {
// id: showMonitor
// width: UM.Theme.getSize("topbar_button").width
// height: UM.Theme.getSize("sidebar_header").height
// text: catalog.i18nc("@title:tab", "Monitor")
// checkable: true
// checked: isChecked()
// exclusiveGroup: sidebarHeaderBarGroup
// style: UM.Theme.styles.topbar_header_tab_no_overlay
//
// // We use a Qt.binding to re-bind the checkbox state after manually setting it
// // https://stackoverflow.com/questions/38798450/qt-5-7-qml-why-are-my-checkbox-property-bindings-disappearing
// onClicked: {
// base.startMonitoringPrint()
// checked = Qt.binding(isChecked)
// }
//
// function isChecked () {
// return base.monitoringPrint
// }
//
// property string iconSource:
// {
// if (!printerConnected)
// {
// return UM.Theme.getIcon("tab_status_unknown");
// }
// else if (!printerAcceptsCommands)
// {
// return UM.Theme.getIcon("tab_status_unknown");
// }
//
// if (Cura.MachineManager.printerOutputDevices[0].printerState == "maintenance")
// {
// return UM.Theme.getIcon("tab_status_busy");
// }
//
// switch (Cura.MachineManager.printerOutputDevices[0].jobState)
// {
// case "printing":
// case "pre_print":
// case "pausing":
// case "resuming":
// return UM.Theme.getIcon("tab_status_busy");
// case "wait_cleanup":
// return UM.Theme.getIcon("tab_status_finished");
// case "ready":
// case "":
// return UM.Theme.getIcon("tab_status_connected")
// case "paused":
// return UM.Theme.getIcon("tab_status_paused")
// case "error":
// return UM.Theme.getIcon("tab_status_stopped")
// default:
// return UM.Theme.getIcon("tab_status_unknown")
// }
// }
// }
}
ToolButton