mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 01:07:52 -06:00
Added start & stop camera interface
CURA-2411
This commit is contained in:
parent
761efa1681
commit
c769a05408
2 changed files with 24 additions and 0 deletions
|
@ -134,6 +134,20 @@ class PrinterOutputDevice(QObject, OutputDevice):
|
||||||
def _setJobState(self, job_state):
|
def _setJobState(self, job_state):
|
||||||
Logger.log("w", "_setJobState is not implemented by this output device")
|
Logger.log("w", "_setJobState is not implemented by this output device")
|
||||||
|
|
||||||
|
@pyqtSlot()
|
||||||
|
def startCamera(self):
|
||||||
|
self._startCamera()
|
||||||
|
|
||||||
|
def _startCamera(self, job_state):
|
||||||
|
Logger.log("w", "_startCamera is not implemented by this output device")
|
||||||
|
|
||||||
|
@pyqtSlot()
|
||||||
|
def stopCamera(self):
|
||||||
|
self._stopCamera()
|
||||||
|
|
||||||
|
def _stopCamera(self, job_state):
|
||||||
|
Logger.log("w", "_stopCamera is not implemented by this output device")
|
||||||
|
|
||||||
@pyqtProperty(str, notify = jobNameChanged)
|
@pyqtProperty(str, notify = jobNameChanged)
|
||||||
def jobName(self):
|
def jobName(self):
|
||||||
return self._job_name
|
return self._job_name
|
||||||
|
|
|
@ -402,6 +402,16 @@ UM.MainWindow
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.horizontalCenterOffset: - UM.Theme.getSize("sidebar").width / 2
|
anchors.horizontalCenterOffset: - UM.Theme.getSize("sidebar").width / 2
|
||||||
visible: base.monitoringPrint
|
visible: base.monitoringPrint
|
||||||
|
onVisibleChanged:
|
||||||
|
{
|
||||||
|
if(visible)
|
||||||
|
{
|
||||||
|
Cura.MachineManager.printerOutputDevices[0].startCamera()
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
Cura.MachineManager.printerOutputDevices[0].stopCamera()
|
||||||
|
}
|
||||||
|
}
|
||||||
source:
|
source:
|
||||||
{
|
{
|
||||||
if(!base.monitoringPrint)
|
if(!base.monitoringPrint)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue