mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-17 07:45:56 +08:00
Merge branch 'master' of github.com:Ultimaker/Cura
This commit is contained in:
commit
9de94d8a5b
@ -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
|
||||||
|
@ -261,8 +261,9 @@ class ContainerManager(QObject):
|
|||||||
|
|
||||||
@pyqtSlot(str, result = bool)
|
@pyqtSlot(str, result = bool)
|
||||||
def isContainerUsed(self, container_id):
|
def isContainerUsed(self, container_id):
|
||||||
UM.Logger.log("d", "Checking if container %s is currently used in the active stacks", container_id)
|
UM.Logger.log("d", "Checking if container %s is currently used", container_id)
|
||||||
for stack in cura.Settings.ExtruderManager.getInstance().getActiveGlobalAndExtruderStacks():
|
containers = self._container_registry.findContainerStacks()
|
||||||
|
for stack in containers:
|
||||||
if container_id in [child.getId() for child in stack.getContainers()]:
|
if container_id in [child.getId() for child in stack.getContainers()]:
|
||||||
UM.Logger.log("d", "The container is in use by %s", stack.getId())
|
UM.Logger.log("d", "The container is in use by %s", stack.getId())
|
||||||
return True
|
return True
|
||||||
|
@ -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)
|
||||||
|
@ -126,7 +126,7 @@ Item
|
|||||||
{
|
{
|
||||||
return UM.Theme.getColor("setting_control_disabled_text")
|
return UM.Theme.getColor("setting_control_disabled_text")
|
||||||
}
|
}
|
||||||
return UM.Theme.getColor("text")
|
return UM.Theme.getColor("setting_control_disabled_text")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user