Merge branch 'master' into network_rewrite

This commit is contained in:
ChrisTerBeke 2018-01-03 14:17:48 +01:00 committed by GitHub
commit 182e7de07d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
39 changed files with 11010 additions and 340 deletions

View file

@ -1,4 +1,4 @@
// Copyright (c) 2016 Ultimaker B.V.
// Copyright (c) 2017 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2
@ -25,6 +25,15 @@ UM.Dialog
width: minimumWidth
height: minimumHeight
flags: {
var window_flags = Qt.Dialog | Qt.CustomizeWindowHint | Qt.WindowTitleHint;
if (Cura.MachineManager.activeDefinitionId !== "") //Disallow closing the window if we have no active printer yet. You MUST add a printer.
{
window_flags |= Qt.WindowCloseButtonHint;
}
return window_flags;
}
onVisibilityChanged:
{
// Reset selection and machine name

View file

@ -401,7 +401,7 @@ UM.MainWindow
collapseSidebarAnimation.start();
}
collapsed = !collapsed;
UM.Preferences.setValue("cura/sidebar_collapse", collapsed);
UM.Preferences.setValue("cura/sidebar_collapsed", collapsed);
}
anchors
@ -432,9 +432,10 @@ UM.MainWindow
Component.onCompleted:
{
var sidebarCollapsed = UM.Preferences.getValue("cura/sidebar_collapse");
var sidebar_collapsed = UM.Preferences.getValue("cura/sidebar_collapsed");
if (sidebarCollapsed) {
if (sidebar_collapsed)
{
sidebar.collapsed = true;
viewportRect = Qt.rect(0, 0, 1, 1.0)
collapseSidebarAnimation.start();
@ -528,6 +529,12 @@ UM.MainWindow
onTriggered: preferences.visible = true
}
Connections
{
target: CuraApplication
onShowPreferencesWindow: preferences.visible = true
}
MessageDialog
{
id: newProjectDialog

View file

@ -1,4 +1,4 @@
// Copyright (c) 2017 Ultimaker B.V.
// Copyright (c) 2018 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2
@ -33,9 +33,10 @@ Menu
{
id: materialDiameterProvider
containerStackId: Cura.MachineManager.activeMachineId
containerStackId: Cura.ExtruderManager.activeExtruderStackId
key: "material_diameter"
watchedProperties: [ "value" ]
storeIndex: 5
}
MenuItem
@ -207,8 +208,8 @@ Menu
// Add to top section
var materialId = items[i].id;
genericMaterialsModel.append({
id:materialId,
name:items[i].name
id: materialId,
name: items[i].name
});
}
else

View file

@ -246,17 +246,19 @@ Item
spacing: UM.Theme.getSize("default_margin").width
}
Connections
{
target: Printer
onAdditionalComponentsChanged:
{
if(areaId == "monitorButtons")
{
for (var component in CuraApplication.additionalComponents["monitorButtons"])
{
CuraApplication.additionalComponents["monitorButtons"][component].parent = additionalComponentsRow
}
Component.onCompleted: {
buttonsRow.updateAdditionalComponents("monitorButtons")
}
Connections {
target: CuraApplication
onAdditionalComponentsChanged: buttonsRow.updateAdditionalComponents("monitorButtons")
}
function updateAdditionalComponents (areaId) {
if(areaId == "monitorButtons") {
for (var component in CuraApplication.additionalComponents["monitorButtons"]) {
CuraApplication.additionalComponents["monitorButtons"][component].parent = additionalComponentsRow
}
}
}

View file

@ -159,6 +159,7 @@ UM.PreferencesPage
append({ text: "Nederlands", code: "nl_NL" })
append({ text: "Polski", code: "pl_PL" })
append({ text: "Português do Brasil", code: "pt_BR" })
append({ text: "Português", code: "pt_PT" })
append({ text: "Русский", code: "ru_RU" })
append({ text: "Türkçe", code: "tr_TR" })
append({ text: "简体中文", code: "zh_CN" })

View file

@ -387,9 +387,10 @@ UM.ManagementPage
{
id: materialDiameterProvider
containerStackId: Cura.MachineManager.activeMachineId
containerStackId: Cura.ExtruderManager.activeExtruderStackId
key: "material_diameter"
watchedProperties: [ "value" ]
storeIndex: 5
}
UM.I18nCatalog { id: catalog; name: "cura"; }

View file

@ -138,12 +138,12 @@ Item {
}
Component.onCompleted: {
addAdditionalComponents("saveButton")
saveRow.addAdditionalComponents("saveButton")
}
Connections {
target: CuraApplication
onAdditionalComponentsChanged: addAdditionalComponents
onAdditionalComponentsChanged: saveRow.addAdditionalComponents("saveButton")
}
function addAdditionalComponents (areaId) {

View file

@ -1,5 +1,5 @@
// Copyright (c) 2015 Ultimaker B.V.
// Uranium is released under the terms of the LGPLv3 or higher.
// Copyright (c) 2017 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2
import QtQuick.Controls 1.1
@ -31,13 +31,17 @@ Button {
onClicked:
{
forceActiveFocus();
if(definition.expanded)
{
settingDefinitionsModel.collapse(definition.key);
} else {
}
else
{
settingDefinitionsModel.expandAll(definition.key);
}
//Set focus so that tab navigation continues from this point on.
//NB: This must be set AFTER collapsing/expanding the category so that the scroll position is correct.
forceActiveFocus();
}
onActiveFocusChanged:
{

View file

@ -1,5 +1,5 @@
// Copyright (c) 2015 Ultimaker B.V.
// Uranium is released under the terms of the LGPLv3 or higher.
// Copyright (c) 2017 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.1
import QtQuick.Layouts 1.1
@ -154,7 +154,7 @@ Item {
onEntered: {
hoverTimer.stop();
var tooltipText = catalog.i18nc("@label", "This setting is always shared between all extruders. Changing it here will change the value for all extruders") + ".";
var tooltipText = catalog.i18nc("@label", "This setting is always shared between all extruders. Changing it here will change the value for all extruders.");
if ((resolve != "None") && (stackLevel != 0)) {
// We come here if a setting has a resolve and the setting is not manually edited.
tooltipText += " " + catalog.i18nc("@label", "The value is resolved from per-extruder values ") + "[" + Cura.ExtruderManager.getInstanceExtruderValues(definition.key) + "].";

View file

@ -372,7 +372,7 @@ Item
{
id: provider
containerStackId: Cura.MachineManager.activeMachineId
containerStackId: Cura.ExtruderManager.activeExtruderStackId
key: model.key ? model.key : ""
watchedProperties: [ "value", "enabled", "state", "validationState", "settable_per_extruder", "resolve" ]
storeIndex: 0

View file

@ -97,7 +97,7 @@ Rectangle
SidebarHeader {
id: header
width: parent.width
visible: machineExtruderCount.properties.value > 1 || Cura.MachineManager.hasMaterials || Cura.MachineManager.hasVariants
visible: (machineExtruderCount.properties.value > 1 || Cura.MachineManager.hasMaterials || Cura.MachineManager.hasVariants) && !monitoringPrint
anchors.top: machineSelection.bottom
onShowTooltip: base.showTooltip(item, location, text)

View file

@ -340,6 +340,8 @@ Item
text: catalog.i18nc("@label", "Print Speed")
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
width: parseInt(UM.Theme.getSize("sidebar").width * 0.35)
elide: Text.ElideRight
}
Label

View file

@ -25,9 +25,12 @@ Rectangle
property int allItemsWidth: 0;
function updateMarginsAndSizes() {
if (UM.Preferences.getValue("cura/sidebar_collapse")) {
if (UM.Preferences.getValue("cura/sidebar_collapsed"))
{
rightMargin = UM.Theme.getSize("default_margin").width;
} else {
}
else
{
rightMargin = UM.Theme.getSize("sidebar").width + UM.Theme.getSize("default_margin").width;
}
allItemsWidth = (