mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-05 16:51:12 -07:00
The monitor item is now actually used to display information on monitor page
The UM3 now provides camera image in this way CURA-3826
This commit is contained in:
parent
5dbee706a7
commit
ca922e9e9d
4 changed files with 47 additions and 32 deletions
|
|
@ -400,41 +400,15 @@ UM.MainWindow
|
|||
}
|
||||
}
|
||||
|
||||
Image
|
||||
Loader
|
||||
{
|
||||
id: cameraImage
|
||||
width: Math.min(viewportOverlay.width, sourceSize.width)
|
||||
height: sourceSize.height * width / sourceSize.width
|
||||
sourceComponent: Cura.MachineManager.printerOutputDevices.length > 0 ? Cura.MachineManager.printerOutputDevices[0].monitorItem: null
|
||||
visible: base.monitoringPrint
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenterOffset: - UM.Theme.getSize("sidebar").width / 2
|
||||
visible: base.monitoringPrint
|
||||
onVisibleChanged:
|
||||
{
|
||||
if(Cura.MachineManager.printerOutputDevices.length == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(visible)
|
||||
{
|
||||
Cura.MachineManager.printerOutputDevices[0].startCamera()
|
||||
} else
|
||||
{
|
||||
Cura.MachineManager.printerOutputDevices[0].stopCamera()
|
||||
}
|
||||
}
|
||||
source:
|
||||
{
|
||||
if(!base.monitoringPrint)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
if(Cura.MachineManager.printerOutputDevices.length > 0 && Cura.MachineManager.printerOutputDevices[0].cameraImage)
|
||||
{
|
||||
return Cura.MachineManager.printerOutputDevices[0].cameraImage;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
UM.MessageStack
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue