Merge branch 'new_firmware_notification' of https://github.com/Ultimaker/Cura into new_firmware_notification

This commit is contained in:
ChrisTerBeke 2017-09-14 13:11:31 +02:00
commit 648828e49e
7 changed files with 70 additions and 16 deletions

View File

@ -2,10 +2,9 @@
# Uranium is released under the terms of the AGPLv3 or higher.
from threading import Thread, Event
import time
from PyQt5.QtCore import Qt, QCoreApplication
from PyQt5.QtGui import QPixmap, QColor, QFont, QFontMetrics, QImage, QPen
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QPixmap, QColor, QFont, QPen, QPainter
from PyQt5.QtWidgets import QSplashScreen
from UM.Resources import Resources
@ -22,8 +21,6 @@ class CuraSplashScreen(QSplashScreen):
self._current_message = ""
self._loading_image = QImage(Resources.getPath(Resources.Images, "loading.png"))
self._loading_image = self._loading_image.scaled(30, 30, Qt.KeepAspectRatio)
self._loading_image_rotation_angle = 0
self._to_stop = False
@ -46,6 +43,8 @@ class CuraSplashScreen(QSplashScreen):
painter.save()
painter.setPen(QColor(255, 255, 255, 255))
painter.setRenderHint(QPainter.Antialiasing)
painter.setRenderHint(QPainter.Antialiasing, True)
version = Application.getInstance().getVersion().split("-")
buildtype = Application.getInstance().getBuildType()
@ -56,25 +55,28 @@ class CuraSplashScreen(QSplashScreen):
font = QFont() # Using system-default font here
font.setPointSize(34)
painter.setFont(font)
painter.drawText(275, 87, 330 * self._scale, 230 * self._scale, Qt.AlignLeft | Qt.AlignBottom, version[0])
painter.drawText(300, 110, 330 * self._scale, 230 * self._scale, Qt.AlignLeft | Qt.AlignTop, version[0])
if len(version) > 1:
font.setPointSize(12)
painter.setFont(font)
painter.drawText(320, 82, 330 * self._scale, 255 * self._scale, Qt.AlignLeft | Qt.AlignBottom, version[1])
painter.setPen(QColor(200, 200, 200, 255))
painter.drawText(343, 160, 330 * self._scale, 255 * self._scale, Qt.AlignLeft | Qt.AlignTop, version[1])
painter.setPen(QColor(255, 255, 255, 255))
# draw the loading image
pen = QPen()
pen.setWidth(4 * self._scale)
pen.setWidth(6 * self._scale)
pen.setColor(QColor(255, 255, 255, 255))
painter.setPen(pen)
painter.drawArc(130, 380, 32 * self._scale, 32 * self._scale, self._loading_image_rotation_angle * 16, 300 * 16)
painter.drawArc(60, 350, 32 * self._scale, 32 * self._scale, self._loading_image_rotation_angle * 16, 300 * 16)
# draw message text
if self._current_message:
font = QFont() # Using system-default font here
font.setPointSize(16)
painter.setFont(font)
painter.drawText(180, 243, 330 * self._scale, 230 * self._scale, Qt.AlignLeft | Qt.AlignBottom,
painter.drawText(100, 328, 260, 64,
Qt.AlignLeft | Qt.AlignVCenter | Qt.TextWordWrap,
self._current_message)
painter.restore()
@ -86,7 +88,6 @@ class CuraSplashScreen(QSplashScreen):
self._current_message = message
self.messageChanged.emit(message)
self.repaint()
def close(self):
# set stop flags

View File

@ -44,8 +44,8 @@ class FirmwareUpdateCheckerJob(Job):
reader = codecs.getreader("utf-8")
# get machine name from the definition container
machine_name = self._container.definition.getName().lower()
machine_name_parts = machine_name.split(" ")
machine_name = self._container.definition.getName()
machine_name_parts = machine_name.lower().split(" ")
# If it is not None, then we compare between the checked_version and the current_version
# Now we just do that if the active printer is Ultimaker 3 or Ultimaker 3 Extended or any

View File

@ -1354,7 +1354,7 @@
"default_value": 2,
"minimum_value": "0",
"minimum_value_warning": "infill_line_width",
"value": "0 if infill_sparse_density == 0 else (infill_line_width * 100) / infill_sparse_density * (2 if infill_pattern == 'grid' else (3 if infill_pattern == 'triangles' or infill_pattern == 'cubic' or infill_pattern == 'cubicsubdiv' else (2 if infill_pattern == 'tetrahedral' or infill_pattern == 'quarter_cubic' else 1)))",
"value": "0 if infill_sparse_density == 0 else (infill_line_width * 100) / infill_sparse_density * (2 if infill_pattern == 'grid' else (3 if infill_pattern == 'triangles' or infill_pattern == 'cubic' or infill_pattern == 'cubicsubdiv' else (2 if infill_pattern == 'tetrahedral' or infill_pattern == 'quarter_cubic' else (1 if infill_pattern == 'cross' or infill_pattern == 'cross_3d' else 1))))",
"limit_to_extruder": "infill_extruder_nr",
"settable_per_mesh": true
}
@ -1376,7 +1376,9 @@
"quarter_cubic": "Quarter Cubic",
"concentric": "Concentric",
"concentric_3d": "Concentric 3D",
"zigzag": "Zig Zag"
"zigzag": "Zig Zag",
"cross": "Cross",
"cross_3d": "Cross 3D"
},
"default_value": "grid",
"enabled": "infill_sparse_density > 0",
@ -1384,6 +1386,15 @@
"limit_to_extruder": "infill_extruder_nr",
"settable_per_mesh": true
},
"zig_zaggify_infill":
{
"label": "Connect Infill Lines",
"description": "Connect the ends where the infill pattern meets the inner wall using a lines which follows the shape of the inner wall. Enabling this setting can make the infill adhere to the walls better and reduces the effects on infill on the quality of vertical surfaces. Disabling this setting reduces the amount of material used.",
"type": "bool",
"default_value": true,
"enabled": "infill_pattern == 'cross' or infill_pattern == 'cross_3d'",
"settable_per_mesh": true
},
"infill_angles":
{
"label": "Infill Line Directions",
@ -3360,7 +3371,8 @@
"triangles": "Triangles",
"concentric": "Concentric",
"concentric_3d": "Concentric 3D",
"zigzag": "Zig Zag"
"zigzag": "Zig Zag",
"cross": "Cross"
},
"default_value": "zigzag",
"enabled": "support_enable",
@ -5168,6 +5180,30 @@
"limit_to_extruder": "top_bottom_extruder_nr",
"settable_per_mesh": true
},
"cross_infill_pocket_size":
{
"label": "Cross 3D Pocket Size",
"description": "The size of pockets at four-way crossings in the cross 3D pattern at heights where the pattern is touching itself.",
"unit": "mm",
"type": "float",
"default_value": 2.0,
"value": "infill_line_distance",
"minimum_value": "0",
"maximum_value_warning": "infill_line_distance * math.sqrt(2)",
"enabled": "infill_pattern == 'cross_3d'",
"limit_to_extruder": "infill_extruder_nr",
"settable_per_mesh": true
},
"cross_infill_apply_pockets_alternatingly":
{
"label": "Alternate Cross 3D Pockets",
"description": "Only apply pockets at half of the four-way crossings in the cross 3D pattern and alternate the location of the pockets between heights where the pattern is touching itself.",
"type": "bool",
"default_value": true,
"enabled": "infill_pattern == 'cross_3d'",
"limit_to_extruder": "infill_extruder_nr",
"settable_per_mesh": true
},
"spaghetti_infill_enabled":
{
"label": "Spaghetti Infill",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -766,6 +766,8 @@ Item
visible: adhesionCheckBox.visible
anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
anchors.right: infillCellLeft.right
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width
anchors.verticalCenter: adhesionCheckBox.verticalCenter
text: catalog.i18nc("@label", "Build Plate Adhesion");
font: UM.Theme.getFont("default");

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch -->
<title>Unknown</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="00-printer-status-overview" transform="translate(-407.000000, -62.000000)" fill="#D8D8D8" opacity="0.231600996">
<rect id="Rectangle-12" x="379" y="0" width="261" height="163"></rect>
</g>
<g id="Unknown" fill="#ffffff">
<path d="M7,14 C3.13400675,14 0,10.8659932 0,7 C0,3.13400675 3.13400675,0 7,0 C10.8659932,0 14,3.13400675 14,7 C14,10.8659932 10.8659932,14 7,14 Z M6.78333984,11.3842884 C7.41672998,11.3842884 7.93020964,10.8704803 7.93020964,10.2374186 C7.93020964,9.60435702 7.41672998,9.09087736 6.78333984,9.09087736 C6.1499497,9.09087736 5.63647003,9.6040285 5.63647003,10.2374186 C5.63647003,10.8708088 6.1499497,11.3842884 6.78333984,11.3842884 Z M7.5343408,7.73605322 C8.81853274,7.61975648 9.82775188,6.53727696 9.82808041,5.22351806 C9.82808041,3.83222799 8.69632261,2.7004702 7.30503254,2.7004702 C5.91374248,2.7004702 4.78198468,3.83255652 4.78198468,5.22351806 L6.33589307,5.22351806 C6.33589307,4.68967004 6.77052748,4.25503562 7.30470402,4.25503562 C7.83920908,4.25503562 8.27351498,4.68967004 8.27351498,5.22351806 C8.27351498,5.75802312 7.83920908,6.19232901 7.30470402,6.19232901 L5.9801039,6.19232901 L5.9801039,8.54355994 L7.5343408,8.54355994 L7.5343408,7.73605322 Z" id="Combined-Shape"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB