mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 13:03:59 -06:00
Make send to DF in monitor for abstract printer work (again-ish).
Already moslty implemented, but a new approach of the base feature (abstract cloud printers) made a more? elegant and functioning implementation possible. (re)implements CURA-9422
This commit is contained in:
parent
4c55befad7
commit
4ea437ba28
6 changed files with 186 additions and 60 deletions
|
@ -1,8 +1,8 @@
|
|||
// Copyright (c) 2019 Ultimaker B.V.
|
||||
// Copyright (c) 2022 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import UM 1.3 as UM
|
||||
import QtQuick 2.15
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
||||
// This is the root component for the monitor stage.
|
||||
|
@ -37,6 +37,7 @@ Component
|
|||
Item
|
||||
{
|
||||
id: printers
|
||||
visible: !Cura.MachineManager.activeMachineIsAbstractCloudPrinter
|
||||
anchors
|
||||
{
|
||||
top: parent.top
|
||||
|
@ -69,14 +70,66 @@ Component
|
|||
top: printers.bottom
|
||||
topMargin: 48 * screenScaleFactor // TODO: Theme!
|
||||
}
|
||||
visible: OutputDevice.supportsPrintJobQueue && OutputDevice.canReadPrintJobs
|
||||
visible: OutputDevice.supportsPrintJobQueue && OutputDevice.canReadPrintJobs && !Cura.MachineManager.activeMachineIsAbstractCloudPrinter
|
||||
}
|
||||
|
||||
PrinterVideoStream
|
||||
{
|
||||
anchors.fill: parent
|
||||
cameraUrl: OutputDevice.activeCameraUrl
|
||||
visible: OutputDevice.activeCameraUrl != ""
|
||||
visible: OutputDevice.activeCameraUrl != "" && !Cura.MachineManager.activeMachineIsAbstractCloudPrinter
|
||||
}
|
||||
|
||||
Rectangle
|
||||
{
|
||||
id: sendToFactoryCard
|
||||
|
||||
visible: Cura.MachineManager.activeMachineIsAbstractCloudPrinter
|
||||
|
||||
color: UM.Theme.getColor("detail_background")
|
||||
height: childrenRect.height + UM.Theme.getSize("default_margin").height * 2
|
||||
width: childrenRect.width + UM.Theme.getSize("wide_margin").width * 2
|
||||
anchors
|
||||
{
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
top: parent.top
|
||||
topMargin: UM.Theme.getSize("wide_margin").height * screenScaleFactor * 2
|
||||
}
|
||||
|
||||
Column
|
||||
{
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: UM.Theme.getSize("wide_margin").height
|
||||
padding: UM.Theme.getSize("default_margin").width
|
||||
topPadding: 0
|
||||
|
||||
Image
|
||||
{
|
||||
id: sendToFactoryImage
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
source: UM.Theme.getImage("cura_connected_printers")
|
||||
}
|
||||
|
||||
UM.Label
|
||||
{
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: catalog.i18nc("@info", "Monitor your printers from everywhere using Ultimaker Digital Factory")
|
||||
font: UM.Theme.getFont("medium")
|
||||
width: sendToFactoryImage.width
|
||||
wrapMode: Text.WordWrap
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
|
||||
Cura.PrimaryButton
|
||||
{
|
||||
id: sendToFactoryButton
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: catalog.i18nc("@button", "View printers in Digital Factory")
|
||||
onClicked: Qt.openUrlExternally("https://digitalfactory.ultimaker.com/app/print-jobs?utm_source=cura&utm_medium=software&utm_campaign=monitor-view-cloud-printer-type")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue