mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Merge branch '3.0'
This commit is contained in:
commit
bc419370d0
6 changed files with 53 additions and 37 deletions
|
@ -1,8 +1,6 @@
|
|||
# Copyright (c) 2017 Ultimaker B.V.
|
||||
# Uranium is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
from threading import Thread, Event
|
||||
|
||||
from PyQt5.QtCore import Qt, QCoreApplication, QTimer
|
||||
from PyQt5.QtGui import QPixmap, QColor, QFont, QPen, QPainter
|
||||
from PyQt5.QtWidgets import QSplashScreen
|
||||
|
@ -10,6 +8,7 @@ from PyQt5.QtWidgets import QSplashScreen
|
|||
from UM.Resources import Resources
|
||||
from UM.Application import Application
|
||||
|
||||
|
||||
class CuraSplashScreen(QSplashScreen):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
@ -26,7 +25,6 @@ class CuraSplashScreen(QSplashScreen):
|
|||
self._change_timer = QTimer()
|
||||
self._change_timer.setInterval(50)
|
||||
self._change_timer.setSingleShot(False)
|
||||
#self.timeoutSignal.connect(self._onTimeout)
|
||||
self._change_timer.timeout.connect(self.updateLoadingImage)
|
||||
|
||||
def show(self):
|
||||
|
@ -62,12 +60,12 @@ class CuraSplashScreen(QSplashScreen):
|
|||
font = QFont() # Using system-default font here
|
||||
font.setPixelSize(37)
|
||||
painter.setFont(font)
|
||||
painter.drawText(220, 66, 330 * self._scale, 230 * self._scale, Qt.AlignLeft | Qt.AlignTop, version[0])
|
||||
painter.drawText(215, 66, 330 * self._scale, 230 * self._scale, Qt.AlignLeft | Qt.AlignTop, version[0])
|
||||
if len(version) > 1:
|
||||
font.setPointSize(12)
|
||||
painter.setFont(font)
|
||||
painter.setPen(QColor(200, 200, 200, 255))
|
||||
painter.drawText(252, 105, 330 * self._scale, 255 * self._scale, Qt.AlignLeft | Qt.AlignTop, version[1])
|
||||
painter.drawText(247, 105, 330 * self._scale, 255 * self._scale, Qt.AlignLeft | Qt.AlignTop, version[1])
|
||||
painter.setPen(QColor(255, 255, 255, 255))
|
||||
|
||||
# draw the loading image
|
||||
|
|
|
@ -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:
|
||||
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)
|
||||
|
|
|
@ -1537,7 +1537,7 @@
|
|||
"default_value": 0,
|
||||
"type": "int",
|
||||
"minimum_value": "0",
|
||||
"maximum_value_warning": "5",
|
||||
"maximum_value_warning": "1 if (infill_pattern == 'cross' or infill_pattern == 'cross_3d' or support_pattern == 'concentric' or support_pattern == 'concentric_3d') else 5",
|
||||
"maximum_value": "0 if spaghetti_infill_enabled else (999999 if infill_line_distance == 0 else (20 - math.log(infill_line_distance) / math.log(2)))",
|
||||
"enabled": "infill_sparse_density > 0 and infill_pattern != 'cubicsubdiv' and not spaghetti_infill_enabled",
|
||||
"limit_to_extruder": "infill_extruder_nr",
|
||||
|
@ -3605,7 +3605,7 @@
|
|||
"default_value": 0,
|
||||
"type": "int",
|
||||
"minimum_value": "0",
|
||||
"maximum_value_warning": "5",
|
||||
"maximum_value_warning": "1 if (support_pattern == 'cross' or support_pattern == 'lines' or support_pattern == 'zigzag' or support_pattern == 'concentric' or support_pattern == 'concentric_3d') else 5",
|
||||
"maximum_value": "999999 if support_line_distance == 0 else (20 - math.log(support_line_distance) / math.log(2))",
|
||||
"enabled": "support_enable and support_infill_rate > 0",
|
||||
"limit_to_extruder": "support_infill_extruder_nr",
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 32 KiB |
Loading…
Add table
Add a link
Reference in a new issue