mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-21 21:58:01 -06:00
Merge branch '3.0'
This commit is contained in:
commit
bc419370d0
6 changed files with 53 additions and 37 deletions
|
@ -279,7 +279,7 @@ Cura.MachineAction
|
|||
wrapMode: Text.WordWrap
|
||||
text:{
|
||||
// The property cluster size does not exist for older UM3 devices.
|
||||
if(base.selectedPrinter.clusterSize == null || base.selectedPrinter.clusterSize == 1)
|
||||
if(base.selectedPrinter != undefined && base.selectedPrinter.clusterSize == null || base.selectedPrinter.clusterSize == 1)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
|
|
@ -1203,8 +1203,14 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
|||
# Remove cached post request items.
|
||||
del self._material_post_objects[id(reply)]
|
||||
elif "print_job" in reply_url:
|
||||
reply.uploadProgress.disconnect(self._onUploadProgress)
|
||||
reply.finished.disconnect(self._onUploadFinished)
|
||||
try:
|
||||
reply.uploadProgress.disconnect(self._onUploadProgress)
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
reply.finished.disconnect(self._onUploadFinished)
|
||||
except:
|
||||
pass
|
||||
Logger.log("d", "Uploading of print succeeded after %s", time() - self._send_gcode_start)
|
||||
# Only reset the _post_reply if it was the same one.
|
||||
if reply == self._post_reply:
|
||||
|
|
|
@ -4,7 +4,6 @@ import QtQuick.Controls.Styles 1.4
|
|||
|
||||
import UM 1.3 as UM
|
||||
|
||||
|
||||
Rectangle
|
||||
{
|
||||
function strPadLeft(string, pad, length)
|
||||
|
@ -94,25 +93,38 @@ Rectangle
|
|||
id: jobNameLabel
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
|
||||
text: printJob != null ? printJob.name : ""
|
||||
font: UM.Theme.getFont("default_bold")
|
||||
elide: Text.ElideRight
|
||||
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
id: jobOwnerLabel
|
||||
anchors.top: jobNameLabel.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
text: printJob != null ? printJob.owner : ""
|
||||
opacity: 0.50
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
id: totalTimeLabel
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
text: printJob != null ? getPrettyTime(printJob.time_total) : ""
|
||||
opacity: 0.65
|
||||
font: UM.Theme.getFont("default")
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -156,7 +168,7 @@ Rectangle
|
|||
|
||||
Image
|
||||
{
|
||||
width: 40 * screenScaleFactor
|
||||
width: parent.width
|
||||
height: width
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: parent.rightMargin
|
||||
|
@ -164,26 +176,27 @@ Rectangle
|
|||
}
|
||||
}
|
||||
|
||||
Row // PrintCode config
|
||||
Row // PrintCore config
|
||||
{
|
||||
id: extruderInfo
|
||||
anchors.bottom: parent.bottom
|
||||
|
||||
width: parent.width / 2 - UM.Theme.getSize("default_margin").width
|
||||
height: childrenRect.height
|
||||
spacing: 10 * screenScaleFactor
|
||||
|
||||
spacing: UM.Theme.getSize("default_margin").width
|
||||
|
||||
PrintCoreConfiguration
|
||||
{
|
||||
id: leftExtruderInfo
|
||||
width: (parent.width-1) / 2
|
||||
width: (parent.width - extruderSeperator.width) / 2
|
||||
printCoreConfiguration: printer.configuration[0]
|
||||
}
|
||||
|
||||
Rectangle
|
||||
{
|
||||
id: extruderSeperator
|
||||
width: 1 * screenScaleFactor
|
||||
width: UM.Theme.getSize("default_lining").width
|
||||
height: parent.height
|
||||
color: lineColor
|
||||
}
|
||||
|
@ -191,7 +204,7 @@ Rectangle
|
|||
PrintCoreConfiguration
|
||||
{
|
||||
id: rightExtruderInfo
|
||||
width: (parent.width-1) / 2
|
||||
width: (parent.width - extruderSeperator.width) / 2
|
||||
printCoreConfiguration: printer.configuration[1]
|
||||
}
|
||||
}
|
||||
|
@ -207,45 +220,42 @@ Rectangle
|
|||
border.color: lineColor
|
||||
radius: cornerRadius
|
||||
property var showExtended: {
|
||||
if(printJob!= null)
|
||||
if(printJob != null)
|
||||
{
|
||||
var extendStates = ["sent_to_printer", "wait_for_configuration", "printing", "pre_print", "post_print", "wait_cleanup", "queued"];
|
||||
return extendStates.indexOf(printJob.status) !== -1;
|
||||
}
|
||||
return ! printer.enabled;
|
||||
}
|
||||
visible:
|
||||
{
|
||||
return true
|
||||
return !printer.enabled;
|
||||
}
|
||||
|
||||
Item // Status and Percent
|
||||
{
|
||||
id: printProgressTitleBar
|
||||
width: parent.width
|
||||
//border.width: UM.Theme.getSize("default_lining").width
|
||||
//border.color: lineColor
|
||||
height: 40 * screenScaleFactor
|
||||
anchors.left: parent.left
|
||||
|
||||
property var showPercent: {
|
||||
return printJob != null && (["printing", "post_print", "pre_print", "sent_to_printer"].indexOf(printJob.status) !== -1);
|
||||
}
|
||||
|
||||
width: parent.width
|
||||
//TODO: hardcoded value
|
||||
height: 40 * screenScaleFactor
|
||||
anchors.left: parent.left
|
||||
|
||||
Label
|
||||
{
|
||||
id: statusText
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: progressText.left
|
||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: {
|
||||
if ( ! printer.enabled)
|
||||
if (!printer.enabled)
|
||||
{
|
||||
return catalog.i18nc("@label:status", "Disabled");
|
||||
}
|
||||
|
||||
if ((printJob != null) && ((printer.status === "pre_print") || (printer.status === "printing")))
|
||||
if (printJob != null)
|
||||
{
|
||||
switch (printJob.status)
|
||||
{
|
||||
|
@ -283,7 +293,6 @@ Rectangle
|
|||
}
|
||||
|
||||
elide: Text.ElideRight
|
||||
|
||||
font: UM.Theme.getFont("small")
|
||||
}
|
||||
|
||||
|
@ -292,11 +301,11 @@ Rectangle
|
|||
id: progressText
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
|
||||
anchors.top: statusText.top
|
||||
|
||||
text: formatPrintJobPercent(printJob)
|
||||
visible: printProgressTitleBar.showPercent
|
||||
//TODO: Hardcoded value
|
||||
opacity: 0.65
|
||||
font: UM.Theme.getFont("very_small")
|
||||
}
|
||||
|
@ -309,10 +318,10 @@ Rectangle
|
|||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
anchors.top: statusText.top
|
||||
|
||||
visible: ! printProgressTitleBar.showPercent
|
||||
visible: !printProgressTitleBar.showPercent
|
||||
|
||||
source: {
|
||||
if ( ! printer.enabled)
|
||||
if (!printer.enabled)
|
||||
{
|
||||
return "blocked-icon.svg";
|
||||
}
|
||||
|
@ -362,7 +371,7 @@ Rectangle
|
|||
{
|
||||
text:
|
||||
{
|
||||
if ( ! printer.enabled)
|
||||
if (!printer.enabled)
|
||||
{
|
||||
return catalog.i18nc("@label", "Not accepting print jobs");
|
||||
}
|
||||
|
@ -392,6 +401,8 @@ Rectangle
|
|||
}
|
||||
return "";
|
||||
}
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
elide: Text.ElideRight
|
||||
font: UM.Theme.getFont("default")
|
||||
}
|
||||
|
@ -399,7 +410,8 @@ Rectangle
|
|||
Label // Status 2nd row
|
||||
{
|
||||
text: {
|
||||
if(printJob != null) {
|
||||
if(printJob != null)
|
||||
{
|
||||
if(printJob.status == "printing" || printJob.status == "post_print")
|
||||
{
|
||||
return OutputDevice.getDateCompleted(printJob.time_total - printJob.time_elapsed)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue