Merge branch '3.0' of github.com:Ultimaker/cura into 3.0

This commit is contained in:
alekseisasin 2017-09-22 13:51:15 +02:00
commit 4c3f146995
6 changed files with 61 additions and 26 deletions

View File

@ -153,7 +153,7 @@ class CuraContainerRegistry(ContainerRegistry):
m.show() m.show()
return return
m = Message(catalog.i18nc("@info:status Don't translate the XML tag <filename>!", "Exported profile to <filename>{0}</filename>", file_name), m = Message(catalog.i18nc("@info:status Don't translate the XML tag <filename>!", "Exported profile to <filename>{0}</filename>", file_name),
title = catalog.i18nc("@info:title", "Export Details")) title = catalog.i18nc("@info:title", "Export succeeded"))
m.show() m.show()
## Gets the plugin object matching the criteria ## Gets the plugin object matching the criteria

View File

@ -150,7 +150,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
def printGCode(self, gcode_list): def printGCode(self, gcode_list):
Logger.log("d", "Started printing g-code") Logger.log("d", "Started printing g-code")
if self._progress or self._connection_state != ConnectionState.connected: if self._progress or self._connection_state != ConnectionState.connected:
self._error_message = Message(catalog.i18nc("@info:status", "Unable to start a new job because the printer is busy or not connected."), title = catalog.i18nc("@info:title", "Print Details")) self._error_message = Message(catalog.i18nc("@info:status", "Unable to start a new job because the printer is busy or not connected."), title = catalog.i18nc("@info:title", "Printer Unavailable"))
self._error_message.show() self._error_message.show()
Logger.log("d", "Printer is busy or not connected, aborting print") Logger.log("d", "Printer is busy or not connected, aborting print")
self.writeError.emit(self) self.writeError.emit(self)

View File

@ -1389,7 +1389,7 @@
"zig_zaggify_infill": "zig_zaggify_infill":
{ {
"label": "Connect Infill Lines", "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.", "description": "Connect the ends where the infill pattern meets the inner wall using a line which follows the shape of the inner wall. Enabling this setting can make the infill adhere to the walls better and reduce the effects of infill on the quality of vertical surfaces. Disabling this setting reduces the amount of material used.",
"type": "bool", "type": "bool",
"default_value": true, "default_value": true,
"enabled": "infill_pattern == 'cross' or infill_pattern == 'cross_3d'", "enabled": "infill_pattern == 'cross' or infill_pattern == 'cross_3d'",

View File

@ -23,17 +23,10 @@ UM.MainWindow
Connections Connections
{ {
target: Printer target: Printer
onShowPrintMonitor: onShowPrintMonitor: {
{ if (show) {
topbar.monitoringChanged(show)
if (show)
{
topbar.startMonitoringPrint() topbar.startMonitoringPrint()
} } else {
else
{
topbar.stopMonitoringPrint() topbar.stopMonitoringPrint()
} }
} }
@ -352,17 +345,13 @@ UM.MainWindow
} }
} }
function isMonitoringPrint () {
return base.showPrintMonitor
}
Topbar Topbar
{ {
id: topbar id: topbar
anchors.left:parent.left anchors.left:parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
monitoringPrint: isMonitoringPrint() monitoringPrint: base.showPrintMonitor
onStartMonitoringPrint: base.showPrintMonitor = true onStartMonitoringPrint: base.showPrintMonitor = true
onStopMonitoringPrint: base.showPrintMonitor = false onStopMonitoringPrint: base.showPrintMonitor = false
} }

View File

@ -491,6 +491,49 @@ Item
} }
} }
} }
MouseArea {
id: enableGradualInfillMouseArea_1
anchors.fill: parent
hoverEnabled: true
enabled: true
onEntered: {
var selectedStep = parseInt(infillSlider.value) / parseInt(infillSlider.stepSize)
var tooltipText = ""
if( enableGradualInfillCheckBox.checked){
tooltipText = catalog.i18nc("@label", "Gradual infill will gradually increase the amount of infill towards the top.");
}
else{
switch(selectedStep){
case 0: tooltipText = catalog.i18nc("@label", "Empty infill will leave your model hollow with low strength."); break;
case 1:
case 2:
case 3:
case 4: tooltipText = catalog.i18nc("@label", "Light infill will give your model an average strength."); break;
case 5:
case 6:
case 7:
case 8: tooltipText = catalog.i18nc("@label", "Dense infill will give your model an above average strength."); break;
case 9:
case 10: tooltipText = catalog.i18nc("@label", "Solid infill will make your model completely solid."); break;
}
}
if(tooltipText != "")
base.showTooltip(base, Qt.point(0,infillCellRight.y + infillIcon.y),tooltipText)
}
onExited: {
base.hideTooltip()
}
}
} }
// Gradual Support Infill Checkbox // Gradual Support Infill Checkbox

View File

@ -22,19 +22,22 @@ Rectangle
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0 property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
property bool printerAcceptsCommands: printerConnected && Cura.MachineManager.printerOutputDevices[0].acceptsCommands property bool printerAcceptsCommands: printerConnected && Cura.MachineManager.printerOutputDevices[0].acceptsCommands
property bool monitoringPrint: false
// monitoring status
property bool monitoringPrint
// incoming signal
function monitoringChanged (isNowMonitoring) {
monitoringPrint = isNowMonitoring
}
// outgoing signal // outgoing signal
signal startMonitoringPrint() signal startMonitoringPrint()
signal stopMonitoringPrint() signal stopMonitoringPrint()
// update monitoring status when event was triggered outside topbar
Component.onCompleted: {
startMonitoringPrint.connect(function () {
base.monitoringPrint = true
})
stopMonitoringPrint.connect(function () {
base.monitoringPrint = false
})
}
UM.I18nCatalog UM.I18nCatalog
{ {
id: catalog id: catalog