mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 10:17:52 -06:00
Automatically show the Print Monitor when starting a print
CURA-1036
This commit is contained in:
parent
6800991fa1
commit
087ebc0768
3 changed files with 11 additions and 1 deletions
|
@ -242,6 +242,8 @@ class CuraApplication(QtApplication):
|
||||||
def _onEngineCreated(self):
|
def _onEngineCreated(self):
|
||||||
self._engine.addImageProvider("camera", CameraImageProvider.CameraImageProvider())
|
self._engine.addImageProvider("camera", CameraImageProvider.CameraImageProvider())
|
||||||
|
|
||||||
|
showPrintMonitor = pyqtSignal(bool, arguments = ["show"])
|
||||||
|
|
||||||
## Cura has multiple locations where instance containers need to be saved, so we need to handle this differently.
|
## Cura has multiple locations where instance containers need to be saved, so we need to handle this differently.
|
||||||
#
|
#
|
||||||
# Note that the AutoSave plugin also calls this method.
|
# Note that the AutoSave plugin also calls this method.
|
||||||
|
|
|
@ -365,6 +365,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
|
||||||
self.onError.emit()
|
self.onError.emit()
|
||||||
|
|
||||||
def requestWrite(self, node, file_name = None, filter_by_machine = False):
|
def requestWrite(self, node, file_name = None, filter_by_machine = False):
|
||||||
|
Application.getInstance().showPrintMonitor.emit(True)
|
||||||
self.startPrint()
|
self.startPrint()
|
||||||
|
|
||||||
def _setEndstopState(self, endstop_key, value):
|
def _setEndstopState(self, endstop_key, value):
|
||||||
|
@ -516,6 +517,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
|
||||||
self._is_printing = False
|
self._is_printing = False
|
||||||
self._is_paused = False
|
self._is_paused = False
|
||||||
self._updateJobState("ready")
|
self._updateJobState("ready")
|
||||||
|
Application.getInstance().showPrintMonitor.emit(False)
|
||||||
|
|
||||||
## Check if the process did not encounter an error yet.
|
## Check if the process did not encounter an error yet.
|
||||||
def hasError(self):
|
def hasError(self):
|
||||||
|
|
|
@ -15,6 +15,11 @@ Rectangle
|
||||||
|
|
||||||
property int currentModeIndex;
|
property int currentModeIndex;
|
||||||
property bool monitoringPrint: false
|
property bool monitoringPrint: false
|
||||||
|
Connections
|
||||||
|
{
|
||||||
|
target: Printer
|
||||||
|
onShowPrintMonitor: base.monitoringPrint = show
|
||||||
|
}
|
||||||
|
|
||||||
// Is there an output device for this printer?
|
// Is there an output device for this printer?
|
||||||
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
|
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
|
||||||
|
@ -83,7 +88,7 @@ Rectangle
|
||||||
onClicked: monitoringPrint = false
|
onClicked: monitoringPrint = false
|
||||||
iconSource: UM.Theme.getIcon("tab_settings");
|
iconSource: UM.Theme.getIcon("tab_settings");
|
||||||
checkable: true
|
checkable: true
|
||||||
checked: true
|
checked: !monitoringPrint
|
||||||
exclusiveGroup: sidebarHeaderBarGroup
|
exclusiveGroup: sidebarHeaderBarGroup
|
||||||
|
|
||||||
style: UM.Theme.styles.sidebar_header_tab
|
style: UM.Theme.styles.sidebar_header_tab
|
||||||
|
@ -104,6 +109,7 @@ Rectangle
|
||||||
return UM.Theme.getIcon("tab_monitor_connected")
|
return UM.Theme.getIcon("tab_monitor_connected")
|
||||||
}
|
}
|
||||||
checkable: true
|
checkable: true
|
||||||
|
checked: monitoringPrint
|
||||||
exclusiveGroup: sidebarHeaderBarGroup
|
exclusiveGroup: sidebarHeaderBarGroup
|
||||||
|
|
||||||
style: UM.Theme.styles.sidebar_header_tab
|
style: UM.Theme.styles.sidebar_header_tab
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue