mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06: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
40
plugins/UM3NetworkPrinting/MonitorItem.qml
Normal file
40
plugins/UM3NetworkPrinting/MonitorItem.qml
Normal file
|
@ -0,0 +1,40 @@
|
|||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls.Styles 1.1
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Dialogs 1.1
|
||||
|
||||
import UM 1.3 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
||||
Component
|
||||
{
|
||||
Image
|
||||
{
|
||||
id: cameraImage
|
||||
width: sourceSize.width
|
||||
height: sourceSize.height * width / sourceSize.width
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
//anchors.verticalCenter: parent.verticalCenter
|
||||
//anchors.horizontalCenterOffset: - UM.Theme.getSize("sidebar").width / 2
|
||||
//visible: base.monitoringPrint
|
||||
onVisibleChanged:
|
||||
{
|
||||
if(visible)
|
||||
{
|
||||
OutputDevice.startCamera()
|
||||
} else
|
||||
{
|
||||
OutputDevice.stopCamera()
|
||||
}
|
||||
}
|
||||
source:
|
||||
{
|
||||
if(OutputDevice.cameraImage)
|
||||
{
|
||||
return OutputDevice.cameraImage;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue