mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 23:05:01 -06:00
Merge branch 'master' into feature_model_check
This commit is contained in:
commit
9848c07a0e
75 changed files with 1478 additions and 615 deletions
|
@ -6,7 +6,7 @@
|
|||
"visible": true,
|
||||
"manufacturer": "BQ",
|
||||
"author": "BQ",
|
||||
"file_formats": "text/x-code",
|
||||
"file_formats": "text/x-gcode",
|
||||
"platform": "bq_hephestos_platform.stl",
|
||||
"platform_offset": [ 0, -82, 0]
|
||||
},
|
||||
|
|
|
@ -38,16 +38,16 @@
|
|||
"machine_max_feedrate_z": {
|
||||
"default_value": 400
|
||||
},
|
||||
"steps_per_mm_x": {
|
||||
"machine_steps_per_mm_x": {
|
||||
"default_value": 93
|
||||
},
|
||||
"steps_per_mm_y": {
|
||||
"machine_steps_per_mm_y": {
|
||||
"default_value": 93
|
||||
},
|
||||
"steps_per_mm_z": {
|
||||
"machine_steps_per_mm_z": {
|
||||
"default_value": 1600
|
||||
},
|
||||
"steps_per_mm_e": {
|
||||
"machine_steps_per_mm_e": {
|
||||
"default_value": 92
|
||||
},
|
||||
"gantry_height": {
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
"machine_nozzle_size": { "default_value": 0.5 },
|
||||
"machine_shape": { "default_value": "elliptic" },
|
||||
"machine_width": { "default_value": 290 },
|
||||
"material_diameter": { "default_value": 1.75 },
|
||||
"relative_extrusion": { "default_value": false },
|
||||
"retraction_amount": { "default_value": 3.2 },
|
||||
"retraction_combing": { "default_value": "off" },
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
"machine_nozzle_size": { "default_value": 0.5 },
|
||||
"machine_shape": { "default_value": "elliptic" },
|
||||
"machine_width": { "default_value": 265 },
|
||||
"material_diameter": { "default_value": 1.75 },
|
||||
"relative_extrusion": { "default_value": false },
|
||||
"retraction_amount": { "default_value": 3.2 },
|
||||
"retraction_combing": { "default_value": "off" },
|
||||
|
|
|
@ -110,9 +110,9 @@
|
|||
"material_bed_temperature": { "maximum_value": "115" },
|
||||
"material_bed_temperature_layer_0": { "maximum_value": "115" },
|
||||
"material_standby_temperature": { "value": "100" },
|
||||
"meshfix_maximum_resolution": { "value": "0.04" },
|
||||
"meshfix_maximum_resolution": { "value": "0.04" },
|
||||
"multiple_mesh_overlap": { "value": "0" },
|
||||
"optimize_wall_printing_order": { "value": "True" },
|
||||
"optimize_wall_printing_order": { "value": "True" },
|
||||
"prime_tower_enable": { "default_value": true },
|
||||
"raft_airgap": { "value": "0" },
|
||||
"raft_base_thickness": { "value": "0.3" },
|
||||
|
|
|
@ -217,6 +217,7 @@ UM.MainWindow
|
|||
text: catalog.i18nc("@action:inmenu", "Disable Extruder")
|
||||
onTriggered: Cura.MachineManager.setExtruderEnabled(model.index, false)
|
||||
visible: Cura.MachineManager.getExtruder(model.index).isEnabled
|
||||
enabled: Cura.MachineManager.numberExtrudersEnabled > 1
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ ToolButton
|
|||
PrinterStatusIcon
|
||||
{
|
||||
id: printerStatusIcon
|
||||
visible: printerConnected
|
||||
visible: printerConnected || isNetworkPrinter
|
||||
status: printerStatus
|
||||
anchors
|
||||
{
|
||||
|
@ -71,8 +71,8 @@ ToolButton
|
|||
color: UM.Theme.getColor("sidebar_header_text_active")
|
||||
text: control.text;
|
||||
elide: Text.ElideRight;
|
||||
anchors.left: isNetworkPrinter ? printerStatusIcon.right : parent.left;
|
||||
anchors.leftMargin: isNetworkPrinter ? UM.Theme.getSize("sidebar_lining").width : UM.Theme.getSize("sidebar_margin").width
|
||||
anchors.left: printerStatusIcon.visible ? printerStatusIcon.right : parent.left;
|
||||
anchors.leftMargin: printerStatusIcon.visible ? UM.Theme.getSize("sidebar_lining").width : UM.Theme.getSize("sidebar_margin").width
|
||||
anchors.right: downArrow.left;
|
||||
anchors.rightMargin: control.rightMargin;
|
||||
anchors.verticalCenter: parent.verticalCenter;
|
||||
|
|
|
@ -68,7 +68,8 @@ Button
|
|||
color: UM.Theme.getColor("text_emphasis")
|
||||
source: UM.Theme.getIcon("arrow_bottom")
|
||||
}
|
||||
UM.RecolorImage {
|
||||
UM.RecolorImage
|
||||
{
|
||||
id: sidebarComboBoxLabel
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
|
@ -86,17 +87,15 @@ Button
|
|||
label: Label {}
|
||||
}
|
||||
|
||||
Connections {
|
||||
Connections
|
||||
{
|
||||
target: outputDevice
|
||||
onUniqueConfigurationsChanged: {
|
||||
updateOnSync()
|
||||
}
|
||||
onUniqueConfigurationsChanged: updateOnSync()
|
||||
}
|
||||
|
||||
Connections {
|
||||
Connections
|
||||
{
|
||||
target: Cura.MachineManager
|
||||
onCurrentConfigurationChanged: {
|
||||
updateOnSync()
|
||||
}
|
||||
onCurrentConfigurationChanged: updateOnSync()
|
||||
}
|
||||
}
|
|
@ -31,7 +31,7 @@ Menu
|
|||
MenuItem {
|
||||
text: "%1: %2 - %3".arg(model.name).arg(model.material).arg(model.variant)
|
||||
visible: base.shouldShowExtruders
|
||||
enabled: UM.Selection.hasSelection
|
||||
enabled: UM.Selection.hasSelection && model.enabled
|
||||
checkable: true
|
||||
checked: Cura.ExtruderManager.selectedObjectExtruders.indexOf(model.id) != -1
|
||||
onTriggered: CuraActions.setExtruderForSelection(model.id)
|
||||
|
|
|
@ -32,7 +32,7 @@ Menu
|
|||
}
|
||||
exclusiveGroup: group
|
||||
onTriggered: {
|
||||
Cura.MachineManager.setVariantGroup(menu.extruderIndex, model.container_node);
|
||||
Cura.MachineManager.setVariant(menu.extruderIndex, model.container_node);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 1.4
|
||||
|
||||
import UM 1.2 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
@ -12,44 +12,23 @@ Menu
|
|||
id: menu
|
||||
title: catalog.i18nc("@action:inmenu", "Visible Settings")
|
||||
|
||||
property bool showingSearchResults
|
||||
property bool showingAllSettings
|
||||
property QtObject settingVisibilityPresetsModel: CuraApplication.getSettingVisibilityPresetsModel()
|
||||
|
||||
signal showAllSettings()
|
||||
signal showSettingVisibilityProfile()
|
||||
|
||||
MenuItem
|
||||
{
|
||||
text: catalog.i18nc("@action:inmenu", "Custom selection")
|
||||
checkable: true
|
||||
checked: !showingSearchResults && !showingAllSettings && Cura.SettingVisibilityPresetsModel.activePreset == "custom"
|
||||
exclusiveGroup: group
|
||||
onTriggered:
|
||||
{
|
||||
Cura.SettingVisibilityPresetsModel.setActivePreset("custom");
|
||||
// Restore custom set from preference
|
||||
UM.Preferences.setValue("general/visible_settings", UM.Preferences.getValue("cura/custom_visible_settings"));
|
||||
showSettingVisibilityProfile();
|
||||
}
|
||||
}
|
||||
MenuSeparator { }
|
||||
|
||||
Instantiator
|
||||
{
|
||||
model: Cura.SettingVisibilityPresetsModel
|
||||
model: settingVisibilityPresetsModel
|
||||
|
||||
MenuItem
|
||||
{
|
||||
text: model.name
|
||||
checkable: true
|
||||
checked: model.id == Cura.SettingVisibilityPresetsModel.activePreset
|
||||
checked: model.id == settingVisibilityPresetsModel.activePreset
|
||||
exclusiveGroup: group
|
||||
onTriggered:
|
||||
{
|
||||
Cura.SettingVisibilityPresetsModel.setActivePreset(model.id);
|
||||
|
||||
UM.Preferences.setValue("general/visible_settings", model.settings.join(";"));
|
||||
|
||||
settingVisibilityPresetsModel.setActivePreset(model.id);
|
||||
showSettingVisibilityProfile();
|
||||
}
|
||||
}
|
||||
|
@ -61,9 +40,8 @@ Menu
|
|||
MenuSeparator {}
|
||||
MenuItem
|
||||
{
|
||||
text: catalog.i18nc("@action:inmenu", "All Settings")
|
||||
checkable: true
|
||||
checked: showingAllSettings
|
||||
text: catalog.i18nc("@action:inmenu", "Show All Settings")
|
||||
checkable: false
|
||||
exclusiveGroup: group
|
||||
onTriggered:
|
||||
{
|
||||
|
|
|
@ -36,8 +36,8 @@ TabView
|
|||
if (!base.containerId || !base.editingEnabled) {
|
||||
return ""
|
||||
}
|
||||
var linkedMaterials = Cura.ContainerManager.getLinkedMaterials(base.currentMaterialNode);
|
||||
if (linkedMaterials.length <= 1) {
|
||||
var linkedMaterials = Cura.ContainerManager.getLinkedMaterials(base.currentMaterialNode, true);
|
||||
if (linkedMaterials.length == 0) {
|
||||
return ""
|
||||
}
|
||||
return linkedMaterials.join(", ");
|
||||
|
@ -99,6 +99,7 @@ TabView
|
|||
property var new_diameter_value: null;
|
||||
property var old_diameter_value: null;
|
||||
property var old_approximate_diameter_value: null;
|
||||
property bool keyPressed: false
|
||||
|
||||
onYes:
|
||||
{
|
||||
|
@ -112,6 +113,16 @@ TabView
|
|||
properties.diameter = old_diameter_value;
|
||||
diameterSpinBox.value = properties.diameter;
|
||||
}
|
||||
|
||||
onVisibilityChanged:
|
||||
{
|
||||
if (!visible && !keyPressed)
|
||||
{
|
||||
// If the user closes this dialog without clicking on any button, it's the same as clicking "No".
|
||||
no();
|
||||
}
|
||||
keyPressed = false;
|
||||
}
|
||||
}
|
||||
|
||||
Label { width: scrollView.columnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Display Name") }
|
||||
|
@ -222,7 +233,7 @@ TabView
|
|||
var old_diameter = Cura.ContainerManager.getContainerProperty(base.containerId, "material_diameter", "value").toString();
|
||||
var old_approximate_diameter = Cura.ContainerManager.getContainerMetaDataEntry(base.containerId, "approximate_diameter");
|
||||
var new_approximate_diameter = getApproximateDiameter(value);
|
||||
if (Cura.MachineManager.filterMaterialsByMachine && new_approximate_diameter != Cura.ExtruderManager.getActiveExtruderStack().approximateMaterialDiameter)
|
||||
if (new_approximate_diameter != Cura.ExtruderManager.getActiveExtruderStack().approximateMaterialDiameter)
|
||||
{
|
||||
confirmDiameterChangeDialog.old_diameter_value = old_diameter;
|
||||
confirmDiameterChangeDialog.new_diameter_value = value;
|
||||
|
|
|
@ -364,6 +364,7 @@ Item
|
|||
}
|
||||
|
||||
width: true ? (parent.width * 0.4) | 0 : parent.width
|
||||
frameVisible: true
|
||||
|
||||
ListView
|
||||
{
|
||||
|
|
|
@ -369,6 +369,7 @@ Item
|
|||
}
|
||||
|
||||
width: true ? (parent.width * 0.4) | 0 : parent.width
|
||||
frameVisible: true
|
||||
|
||||
ListView
|
||||
{
|
||||
|
|
|
@ -34,6 +34,8 @@ Item
|
|||
anchors.fill: parent
|
||||
|
||||
onEditingFinished: base.editingFinished()
|
||||
Keys.onEnterPressed: base.editingFinished()
|
||||
Keys.onReturnPressed: base.editingFinished()
|
||||
}
|
||||
|
||||
Label
|
||||
|
|
|
@ -29,6 +29,8 @@ Item
|
|||
anchors.fill: parent
|
||||
|
||||
onEditingFinished: base.editingFinished()
|
||||
Keys.onEnterPressed: base.editingFinished()
|
||||
Keys.onReturnPressed: base.editingFinished()
|
||||
}
|
||||
|
||||
Label
|
||||
|
|
|
@ -13,6 +13,8 @@ UM.PreferencesPage
|
|||
{
|
||||
title: catalog.i18nc("@title:tab", "Setting Visibility");
|
||||
|
||||
property QtObject settingVisibilityPresetsModel: CuraApplication.getSettingVisibilityPresetsModel()
|
||||
|
||||
property int scrollToIndex: 0
|
||||
|
||||
signal scrollToSection( string key )
|
||||
|
@ -27,8 +29,7 @@ UM.PreferencesPage
|
|||
|
||||
// After calling this function update Setting visibility preset combobox.
|
||||
// Reset should set default setting preset ("Basic")
|
||||
visibilityPreset.setDefaultPreset()
|
||||
|
||||
visibilityPreset.currentIndex = 1
|
||||
}
|
||||
resetEnabled: true;
|
||||
|
||||
|
@ -37,8 +38,6 @@ UM.PreferencesPage
|
|||
id: base;
|
||||
anchors.fill: parent;
|
||||
|
||||
property bool inhibitSwitchToCustom: false
|
||||
|
||||
CheckBox
|
||||
{
|
||||
id: toggleVisibleSettings
|
||||
|
@ -73,11 +72,11 @@ UM.PreferencesPage
|
|||
{
|
||||
if(parent.checkedState == Qt.Unchecked || parent.checkedState == Qt.PartiallyChecked)
|
||||
{
|
||||
definitionsModel.setAllVisible(true)
|
||||
definitionsModel.setAllExpandedVisible(true)
|
||||
}
|
||||
else
|
||||
{
|
||||
definitionsModel.setAllVisible(false)
|
||||
definitionsModel.setAllExpandedVisible(false)
|
||||
}
|
||||
|
||||
// After change set "Custom" option
|
||||
|
@ -112,11 +111,6 @@ UM.PreferencesPage
|
|||
|
||||
ComboBox
|
||||
{
|
||||
function setDefaultPreset()
|
||||
{
|
||||
visibilityPreset.currentIndex = 0
|
||||
}
|
||||
|
||||
id: visibilityPreset
|
||||
width: 150 * screenScaleFactor
|
||||
anchors
|
||||
|
@ -125,51 +119,25 @@ UM.PreferencesPage
|
|||
right: parent.right
|
||||
}
|
||||
|
||||
model: ListModel
|
||||
{
|
||||
id: visibilityPresetsModel
|
||||
Component.onCompleted:
|
||||
{
|
||||
visibilityPresetsModel.append({text: catalog.i18nc("@action:inmenu", "Custom selection"), id: "custom"});
|
||||
|
||||
var presets = Cura.SettingVisibilityPresetsModel;
|
||||
for(var i = 0; i < presets.rowCount(); i++)
|
||||
{
|
||||
visibilityPresetsModel.append({text: presets.getItem(i)["name"], id: presets.getItem(i)["id"]});
|
||||
}
|
||||
}
|
||||
}
|
||||
model: settingVisibilityPresetsModel
|
||||
textRole: "name"
|
||||
|
||||
currentIndex:
|
||||
{
|
||||
// Load previously selected preset.
|
||||
var index = Cura.SettingVisibilityPresetsModel.find("id", Cura.SettingVisibilityPresetsModel.activePreset);
|
||||
if(index == -1)
|
||||
var index = settingVisibilityPresetsModel.find("id", settingVisibilityPresetsModel.activePreset)
|
||||
if (index == -1)
|
||||
{
|
||||
return 0;
|
||||
return 0
|
||||
}
|
||||
|
||||
return index + 1; // "Custom selection" entry is added in front, so index is off by 1
|
||||
return index
|
||||
}
|
||||
|
||||
onActivated:
|
||||
{
|
||||
base.inhibitSwitchToCustom = true;
|
||||
var preset_id = visibilityPresetsModel.get(index).id;
|
||||
Cura.SettingVisibilityPresetsModel.setActivePreset(preset_id);
|
||||
|
||||
UM.Preferences.setValue("cura/active_setting_visibility_preset", preset_id);
|
||||
if (preset_id != "custom")
|
||||
{
|
||||
UM.Preferences.setValue("general/visible_settings", Cura.SettingVisibilityPresetsModel.getItem(index - 1).settings.join(";"));
|
||||
// "Custom selection" entry is added in front, so index is off by 1
|
||||
}
|
||||
else
|
||||
{
|
||||
// Restore custom set from preference
|
||||
UM.Preferences.setValue("general/visible_settings", UM.Preferences.getValue("cura/custom_visible_settings"));
|
||||
}
|
||||
base.inhibitSwitchToCustom = false;
|
||||
var preset_id = settingVisibilityPresetsModel.getItem(index).id;
|
||||
settingVisibilityPresetsModel.setActivePreset(preset_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -199,16 +167,7 @@ UM.PreferencesPage
|
|||
exclude: ["machine_settings", "command_line_settings"]
|
||||
showAncestors: true
|
||||
expanded: ["*"]
|
||||
visibilityHandler: UM.SettingPreferenceVisibilityHandler
|
||||
{
|
||||
onVisibilityChanged:
|
||||
{
|
||||
if(Cura.SettingVisibilityPresetsModel.activePreset != "" && !base.inhibitSwitchToCustom)
|
||||
{
|
||||
Cura.SettingVisibilityPresetsModel.setActivePreset("custom");
|
||||
}
|
||||
}
|
||||
}
|
||||
visibilityHandler: UM.SettingPreferenceVisibilityHandler {}
|
||||
}
|
||||
|
||||
delegate: Loader
|
||||
|
|
|
@ -12,9 +12,20 @@ Item
|
|||
property alias color: background.color
|
||||
property var extruderModel
|
||||
property var position: index
|
||||
//width: index == machineExtruderCount.properties.value - 1 && index % 2 == 0 ? extrudersGrid.width : Math.floor(extrudersGrid.width / 2 - UM.Theme.getSize("sidebar_lining_thin").width / 2)
|
||||
implicitWidth: parent.width
|
||||
implicitHeight: UM.Theme.getSize("sidebar_extruder_box").height
|
||||
|
||||
UM.SettingPropertyProvider
|
||||
{
|
||||
id: extruderTemperature
|
||||
containerStackId: Cura.ExtruderManager.extruderIds[position]
|
||||
key: "material_print_temperature"
|
||||
watchedProperties: ["value", "minimum_value", "maximum_value", "resolve"]
|
||||
storeIndex: 0
|
||||
|
||||
property var resolve: Cura.MachineManager.activeStackId != Cura.MachineManager.activeMachineId ? properties.resolve : "None"
|
||||
}
|
||||
|
||||
Rectangle
|
||||
{
|
||||
id: background
|
||||
|
@ -34,12 +45,11 @@ Item
|
|||
{
|
||||
id: extruderTargetTemperature
|
||||
text: Math.round(extruderModel.targetHotendTemperature) + "°C"
|
||||
//text: (connectedPrinter != null && connectedPrinter.hotendIds[index] != null && connectedPrinter.targetHotendTemperatures[index] != null) ? Math.round(connectedPrinter.targetHotendTemperatures[index]) + "°C" : ""
|
||||
font: UM.Theme.getFont("small")
|
||||
color: UM.Theme.getColor("text_inactive")
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
anchors.bottom: extruderTemperature.bottom
|
||||
anchors.bottom: extruderCurrentTemperature.bottom
|
||||
|
||||
MouseArea //For tooltip.
|
||||
{
|
||||
|
@ -52,7 +62,7 @@ Item
|
|||
{
|
||||
base.showTooltip(
|
||||
base,
|
||||
{x: 0, y: extruderTargetTemperature.mapToItem(base, 0, -parent.height / 4).y},
|
||||
{x: 0, y: extruderTargetTemperature.mapToItem(base, 0, Math.floor(-parent.height / 4)).y},
|
||||
catalog.i18nc("@tooltip", "The target temperature of the hotend. The hotend will heat up or cool down towards this temperature. If this is 0, the hotend heating is turned off.")
|
||||
);
|
||||
}
|
||||
|
@ -65,9 +75,8 @@ Item
|
|||
}
|
||||
Label //Temperature indication.
|
||||
{
|
||||
id: extruderTemperature
|
||||
id: extruderCurrentTemperature
|
||||
text: Math.round(extruderModel.hotendTemperature) + "°C"
|
||||
//text: (connectedPrinter != null && connectedPrinter.hotendIds[index] != null && connectedPrinter.hotendTemperatures[index] != null) ? Math.round(connectedPrinter.hotendTemperatures[index]) + "°C" : ""
|
||||
color: UM.Theme.getColor("text")
|
||||
font: UM.Theme.getFont("large")
|
||||
anchors.right: extruderTargetTemperature.left
|
||||
|
@ -76,7 +85,7 @@ Item
|
|||
|
||||
MouseArea //For tooltip.
|
||||
{
|
||||
id: extruderTemperatureTooltipArea
|
||||
id: extruderCurrentTemperatureTooltipArea
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
onHoveredChanged:
|
||||
|
@ -85,8 +94,8 @@ Item
|
|||
{
|
||||
base.showTooltip(
|
||||
base,
|
||||
{x: 0, y: parent.mapToItem(base, 0, -parent.height / 4).y},
|
||||
catalog.i18nc("@tooltip", "The current temperature of this extruder.")
|
||||
{x: 0, y: parent.mapToItem(base, 0, Math.floor(-parent.height / 4)).y},
|
||||
catalog.i18nc("@tooltip", "The current temperature of this hotend.")
|
||||
);
|
||||
}
|
||||
else
|
||||
|
@ -97,6 +106,272 @@ Item
|
|||
}
|
||||
}
|
||||
|
||||
Rectangle //Input field for pre-heat temperature.
|
||||
{
|
||||
id: preheatTemperatureControl
|
||||
color: !enabled ? UM.Theme.getColor("setting_control_disabled") : showError ? UM.Theme.getColor("setting_validation_error_background") : UM.Theme.getColor("setting_validation_ok")
|
||||
property var showError:
|
||||
{
|
||||
if(extruderTemperature.properties.maximum_value != "None" && extruderTemperature.properties.maximum_value < Math.floor(preheatTemperatureInput.text))
|
||||
{
|
||||
return true;
|
||||
} else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
enabled:
|
||||
{
|
||||
if (extruderModel == null)
|
||||
{
|
||||
return false; //Can't preheat if not connected.
|
||||
}
|
||||
if (!connectedPrinter.acceptsCommands)
|
||||
{
|
||||
return false; //Not allowed to do anything.
|
||||
}
|
||||
if (connectedPrinter.activePrinter && connectedPrinter.activePrinter.activePrintJob)
|
||||
{
|
||||
if((["printing", "pre_print", "resuming", "pausing", "paused", "error", "offline"]).indexOf(connectedPrinter.activePrinter.activePrintJob.state) != -1)
|
||||
{
|
||||
return false; //Printer is in a state where it can't react to pre-heating.
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
border.color: !enabled ? UM.Theme.getColor("setting_control_disabled_border") : preheatTemperatureInputMouseArea.containsMouse ? UM.Theme.getColor("setting_control_border_highlight") : UM.Theme.getColor("setting_control_border")
|
||||
anchors.right: preheatButton.left
|
||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: UM.Theme.getSize("default_margin").height
|
||||
width: UM.Theme.getSize("monitor_preheat_temperature_control").width
|
||||
height: UM.Theme.getSize("monitor_preheat_temperature_control").height
|
||||
visible: extruderModel != null ? enabled && extruderModel.canPreHeatHotends && !extruderModel.isPreheating : true
|
||||
Rectangle //Highlight of input field.
|
||||
{
|
||||
anchors.fill: parent
|
||||
anchors.margins: UM.Theme.getSize("default_lining").width
|
||||
color: UM.Theme.getColor("setting_control_highlight")
|
||||
opacity: preheatTemperatureControl.hovered ? 1.0 : 0
|
||||
}
|
||||
MouseArea //Change cursor on hovering.
|
||||
{
|
||||
id: preheatTemperatureInputMouseArea
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.IBeamCursor
|
||||
|
||||
onHoveredChanged:
|
||||
{
|
||||
if (containsMouse)
|
||||
{
|
||||
base.showTooltip(
|
||||
base,
|
||||
{x: 0, y: preheatTemperatureInputMouseArea.mapToItem(base, 0, 0).y},
|
||||
catalog.i18nc("@tooltip of temperature input", "The temperature to pre-heat the hotend to.")
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
base.hideTooltip();
|
||||
}
|
||||
}
|
||||
}
|
||||
Label
|
||||
{
|
||||
id: unit
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: UM.Theme.getSize("setting_unit_margin").width
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
text: "°C";
|
||||
color: UM.Theme.getColor("setting_unit")
|
||||
font: UM.Theme.getFont("default")
|
||||
}
|
||||
TextInput
|
||||
{
|
||||
id: preheatTemperatureInput
|
||||
font: UM.Theme.getFont("default")
|
||||
color: !enabled ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text")
|
||||
selectByMouse: true
|
||||
maximumLength: 5
|
||||
enabled: parent.enabled
|
||||
validator: RegExpValidator { regExp: /^-?[0-9]{0,9}[.,]?[0-9]{0,10}$/ } //Floating point regex.
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("setting_unit_margin").width
|
||||
anchors.right: unit.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
renderType: Text.NativeRendering
|
||||
|
||||
Component.onCompleted:
|
||||
{
|
||||
if (!extruderTemperature.properties.value)
|
||||
{
|
||||
text = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
text = extruderTemperature.properties.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Button //The pre-heat button.
|
||||
{
|
||||
id: preheatButton
|
||||
height: UM.Theme.getSize("setting_control").height
|
||||
visible: extruderModel != null ? extruderModel.canPreHeatHotends: true
|
||||
enabled:
|
||||
{
|
||||
if (!preheatTemperatureControl.enabled)
|
||||
{
|
||||
return false; //Not connected, not authenticated or printer is busy.
|
||||
}
|
||||
if (extruderModel.isPreheating)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (extruderTemperature.properties.minimum_value != "None" && Math.floor(preheatTemperatureInput.text) < Math.floor(extruderTemperature.properties.minimum_value))
|
||||
{
|
||||
return false; //Target temperature too low.
|
||||
}
|
||||
if (extruderTemperature.properties.maximum_value != "None" && Math.floor(preheatTemperatureInput.text) > Math.floor(extruderTemperature.properties.maximum_value))
|
||||
{
|
||||
return false; //Target temperature too high.
|
||||
}
|
||||
if (Math.floor(preheatTemperatureInput.text) == 0)
|
||||
{
|
||||
return false; //Setting the temperature to 0 is not allowed (since that cancels the pre-heating).
|
||||
}
|
||||
return true; //Preconditions are met.
|
||||
}
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||
style: ButtonStyle {
|
||||
background: Rectangle
|
||||
{
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
implicitWidth: actualLabel.contentWidth + (UM.Theme.getSize("default_margin").width * 2)
|
||||
border.color:
|
||||
{
|
||||
if(!control.enabled)
|
||||
{
|
||||
return UM.Theme.getColor("action_button_disabled_border");
|
||||
}
|
||||
else if(control.pressed)
|
||||
{
|
||||
return UM.Theme.getColor("action_button_active_border");
|
||||
}
|
||||
else if(control.hovered)
|
||||
{
|
||||
return UM.Theme.getColor("action_button_hovered_border");
|
||||
}
|
||||
else
|
||||
{
|
||||
return UM.Theme.getColor("action_button_border");
|
||||
}
|
||||
}
|
||||
color:
|
||||
{
|
||||
if(!control.enabled)
|
||||
{
|
||||
return UM.Theme.getColor("action_button_disabled");
|
||||
}
|
||||
else if(control.pressed)
|
||||
{
|
||||
return UM.Theme.getColor("action_button_active");
|
||||
}
|
||||
else if(control.hovered)
|
||||
{
|
||||
return UM.Theme.getColor("action_button_hovered");
|
||||
}
|
||||
else
|
||||
{
|
||||
return UM.Theme.getColor("action_button");
|
||||
}
|
||||
}
|
||||
Behavior on color
|
||||
{
|
||||
ColorAnimation
|
||||
{
|
||||
duration: 50
|
||||
}
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
id: actualLabel
|
||||
anchors.centerIn: parent
|
||||
color:
|
||||
{
|
||||
if(!control.enabled)
|
||||
{
|
||||
return UM.Theme.getColor("action_button_disabled_text");
|
||||
}
|
||||
else if(control.pressed)
|
||||
{
|
||||
return UM.Theme.getColor("action_button_active_text");
|
||||
}
|
||||
else if(control.hovered)
|
||||
{
|
||||
return UM.Theme.getColor("action_button_hovered_text");
|
||||
}
|
||||
else
|
||||
{
|
||||
return UM.Theme.getColor("action_button_text");
|
||||
}
|
||||
}
|
||||
font: UM.Theme.getFont("action_button")
|
||||
text:
|
||||
{
|
||||
if(extruderModel == null)
|
||||
{
|
||||
return ""
|
||||
}
|
||||
if(extruderModel.isPreheating )
|
||||
{
|
||||
return catalog.i18nc("@button Cancel pre-heating", "Cancel")
|
||||
} else
|
||||
{
|
||||
return catalog.i18nc("@button", "Pre-heat")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onClicked:
|
||||
{
|
||||
if (!extruderModel.isPreheating)
|
||||
{
|
||||
extruderModel.preheatHotend(preheatTemperatureInput.text, 900);
|
||||
}
|
||||
else
|
||||
{
|
||||
extruderModel.cancelPreheatHotend();
|
||||
}
|
||||
}
|
||||
|
||||
onHoveredChanged:
|
||||
{
|
||||
if (hovered)
|
||||
{
|
||||
base.showTooltip(
|
||||
base,
|
||||
{x: 0, y: preheatButton.mapToItem(base, 0, 0).y},
|
||||
catalog.i18nc("@tooltip of pre-heat", "Heat the hotend in advance before printing. You can continue adjusting your print while it is heating, and you won't have to wait for the hotend to heat up when you're ready to print.")
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
base.hideTooltip();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle //Material colour indication.
|
||||
{
|
||||
id: materialColor
|
||||
|
|
|
@ -114,21 +114,24 @@ Item
|
|||
{
|
||||
return false; //Not allowed to do anything.
|
||||
}
|
||||
if (connectedPrinter.jobState == "printing" || connectedPrinter.jobState == "pre_print" || connectedPrinter.jobState == "resuming" || connectedPrinter.jobState == "pausing" || connectedPrinter.jobState == "paused" || connectedPrinter.jobState == "error" || connectedPrinter.jobState == "offline")
|
||||
if (connectedPrinter.activePrinter && connectedPrinter.activePrinter.activePrintJob)
|
||||
{
|
||||
return false; //Printer is in a state where it can't react to pre-heating.
|
||||
if((["printing", "pre_print", "resuming", "pausing", "paused", "error", "offline"]).indexOf(connectedPrinter.activePrinter.activePrintJob.state) != -1)
|
||||
{
|
||||
return false; //Printer is in a state where it can't react to pre-heating.
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
border.color: !enabled ? UM.Theme.getColor("setting_control_disabled_border") : preheatTemperatureInputMouseArea.containsMouse ? UM.Theme.getColor("setting_control_border_highlight") : UM.Theme.getColor("setting_control_border")
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
anchors.right: preheatButton.left
|
||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: UM.Theme.getSize("default_margin").height
|
||||
width: UM.Theme.getSize("setting_control").width
|
||||
height: UM.Theme.getSize("setting_control").height
|
||||
visible: printerModel != null ? printerModel.canPreHeatBed: true
|
||||
width: UM.Theme.getSize("monitor_preheat_temperature_control").width
|
||||
height: UM.Theme.getSize("monitor_preheat_temperature_control").height
|
||||
visible: printerModel != null ? enabled && printerModel.canPreHeatBed && !printerModel.isPreheating : true
|
||||
Rectangle //Highlight of input field.
|
||||
{
|
||||
anchors.fill: parent
|
||||
|
@ -159,18 +162,29 @@ Item
|
|||
}
|
||||
}
|
||||
}
|
||||
Label
|
||||
{
|
||||
id: unit
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: UM.Theme.getSize("setting_unit_margin").width
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
text: "°C";
|
||||
color: UM.Theme.getColor("setting_unit")
|
||||
font: UM.Theme.getFont("default")
|
||||
}
|
||||
TextInput
|
||||
{
|
||||
id: preheatTemperatureInput
|
||||
font: UM.Theme.getFont("default")
|
||||
color: !enabled ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text")
|
||||
selectByMouse: true
|
||||
maximumLength: 10
|
||||
maximumLength: 5
|
||||
enabled: parent.enabled
|
||||
validator: RegExpValidator { regExp: /^-?[0-9]{0,9}[.,]?[0-9]{0,10}$/ } //Floating point regex.
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("setting_unit_margin").width
|
||||
anchors.right: parent.right
|
||||
anchors.right: unit.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
renderType: Text.NativeRendering
|
||||
|
||||
|
|
|
@ -215,7 +215,8 @@ SettingItem
|
|||
{
|
||||
text: model.name
|
||||
renderType: Text.NativeRendering
|
||||
color: {
|
||||
color:
|
||||
{
|
||||
if (model.enabled) {
|
||||
UM.Theme.getColor("setting_control_text")
|
||||
} else {
|
||||
|
|
|
@ -27,8 +27,19 @@ SettingItem
|
|||
|
||||
onActivated:
|
||||
{
|
||||
forceActiveFocus();
|
||||
propertyProvider.setPropertyValue("value", model.getItem(index).index);
|
||||
if (model.getItem(index).enabled)
|
||||
{
|
||||
forceActiveFocus();
|
||||
propertyProvider.setPropertyValue("value", model.getItem(index).index);
|
||||
} else
|
||||
{
|
||||
if (propertyProvider.properties.value == -1)
|
||||
{
|
||||
control.currentIndex = model.rowCount() - 1; // we know the last item is "Not overriden"
|
||||
} else {
|
||||
control.currentIndex = propertyProvider.properties.value; // revert to the old value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onActiveFocusChanged:
|
||||
|
@ -192,7 +203,14 @@ SettingItem
|
|||
{
|
||||
text: model.name
|
||||
renderType: Text.NativeRendering
|
||||
color: UM.Theme.getColor("setting_control_text")
|
||||
color:
|
||||
{
|
||||
if (model.enabled) {
|
||||
UM.Theme.getColor("setting_control_text")
|
||||
} else {
|
||||
UM.Theme.getColor("action_button_disabled_text");
|
||||
}
|
||||
}
|
||||
font: UM.Theme.getFont("default")
|
||||
elide: Text.ElideRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
|
|
@ -13,11 +13,17 @@ SettingItem
|
|||
|
||||
property string textBeforeEdit
|
||||
property bool textHasChanged
|
||||
property bool focusGainedByClick: false
|
||||
onFocusReceived:
|
||||
{
|
||||
textHasChanged = false;
|
||||
textBeforeEdit = focusItem.text;
|
||||
focusItem.selectAll();
|
||||
|
||||
if(!focusGainedByClick)
|
||||
{
|
||||
// select all text when tabbing through fields (but not when selecting a field with the mouse)
|
||||
focusItem.selectAll();
|
||||
}
|
||||
}
|
||||
|
||||
contents: Rectangle
|
||||
|
@ -93,14 +99,6 @@ SettingItem
|
|||
font: UM.Theme.getFont("default")
|
||||
}
|
||||
|
||||
MouseArea
|
||||
{
|
||||
id: mouseArea
|
||||
anchors.fill: parent;
|
||||
//hoverEnabled: true;
|
||||
cursorShape: Qt.IBeamCursor
|
||||
}
|
||||
|
||||
TextInput
|
||||
{
|
||||
id: input
|
||||
|
@ -142,6 +140,7 @@ SettingItem
|
|||
{
|
||||
base.focusReceived();
|
||||
}
|
||||
base.focusGainedByClick = false;
|
||||
}
|
||||
|
||||
color: !enabled ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text")
|
||||
|
@ -178,6 +177,22 @@ SettingItem
|
|||
}
|
||||
when: !input.activeFocus
|
||||
}
|
||||
|
||||
MouseArea
|
||||
{
|
||||
id: mouseArea
|
||||
anchors.fill: parent;
|
||||
|
||||
cursorShape: Qt.IBeamCursor
|
||||
|
||||
onPressed: {
|
||||
if(!input.activeFocus) {
|
||||
base.focusGainedByClick = true;
|
||||
input.forceActiveFocus();
|
||||
}
|
||||
mouse.accepted = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,9 +15,9 @@ Item
|
|||
{
|
||||
id: base;
|
||||
|
||||
property QtObject settingVisibilityPresetsModel: CuraApplication.getSettingVisibilityPresetsModel()
|
||||
property Action configureSettings
|
||||
property bool findingSettings
|
||||
property bool showingAllSettings
|
||||
signal showTooltip(Item item, point location, string text)
|
||||
signal hideTooltip()
|
||||
|
||||
|
@ -139,21 +139,9 @@ Item
|
|||
}
|
||||
menu: SettingVisibilityPresetsMenu
|
||||
{
|
||||
showingSearchResults: findingSettings
|
||||
showingAllSettings: showingAllSettings
|
||||
|
||||
onShowAllSettings:
|
||||
{
|
||||
base.showingAllSettings = true;
|
||||
base.findingSettings = false;
|
||||
filter.text = "";
|
||||
filter.updateDefinitionModel();
|
||||
}
|
||||
onShowSettingVisibilityProfile:
|
||||
{
|
||||
base.showingAllSettings = false;
|
||||
base.findingSettings = false;
|
||||
filter.text = "";
|
||||
definitionsModel.setAllVisible(true);
|
||||
filter.updateDefinitionModel();
|
||||
}
|
||||
}
|
||||
|
@ -218,10 +206,6 @@ Item
|
|||
findingSettings = (text.length > 0);
|
||||
if(findingSettings != lastFindingSettings)
|
||||
{
|
||||
if(findingSettings)
|
||||
{
|
||||
showingAllSettings = false;
|
||||
}
|
||||
updateDefinitionModel();
|
||||
lastFindingSettings = findingSettings;
|
||||
}
|
||||
|
@ -234,7 +218,7 @@ Item
|
|||
|
||||
function updateDefinitionModel()
|
||||
{
|
||||
if(findingSettings || showingAllSettings)
|
||||
if(findingSettings)
|
||||
{
|
||||
expandedCategories = definitionsModel.expanded.slice();
|
||||
definitionsModel.expanded = [""]; // keep categories closed while to prevent render while making settings visible one by one
|
||||
|
@ -439,6 +423,7 @@ Item
|
|||
key: model.key ? model.key : ""
|
||||
watchedProperties: [ "value", "enabled", "state", "validationState", "settable_per_extruder", "resolve" ]
|
||||
storeIndex: 0
|
||||
removeUnusedValue: model.resolve == undefined
|
||||
}
|
||||
|
||||
Connections
|
||||
|
@ -556,15 +541,15 @@ Item
|
|||
MenuItem
|
||||
{
|
||||
//: Settings context menu action
|
||||
visible: !(findingSettings || showingAllSettings);
|
||||
visible: !findingSettings
|
||||
text: catalog.i18nc("@action:menu", "Hide this setting");
|
||||
onTriggered:
|
||||
{
|
||||
definitionsModel.hide(contextMenu.key);
|
||||
// visible settings have changed, so we're no longer showing a preset
|
||||
if (Cura.SettingVisibilityPresetsModel.activePreset != "" && !showingAllSettings)
|
||||
if (settingVisibilityPresetsModel.activePreset != "")
|
||||
{
|
||||
Cura.SettingVisibilityPresetsModel.setActivePreset("custom");
|
||||
settingVisibilityPresetsModel.setActivePreset("custom");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -582,7 +567,7 @@ Item
|
|||
return catalog.i18nc("@action:menu", "Keep this setting visible");
|
||||
}
|
||||
}
|
||||
visible: (findingSettings || showingAllSettings);
|
||||
visible: findingSettings
|
||||
onTriggered:
|
||||
{
|
||||
if (contextMenu.settingVisible)
|
||||
|
@ -594,16 +579,16 @@ Item
|
|||
definitionsModel.show(contextMenu.key);
|
||||
}
|
||||
// visible settings have changed, so we're no longer showing a preset
|
||||
if (Cura.SettingVisibilityPresetsModel.activePreset != "" && !showingAllSettings)
|
||||
if (settingVisibilityPresetsModel.activePreset != "")
|
||||
{
|
||||
Cura.SettingVisibilityPresetsModel.setActivePreset("custom");
|
||||
settingVisibilityPresetsModel.setActivePreset("custom");
|
||||
}
|
||||
}
|
||||
}
|
||||
MenuItem
|
||||
{
|
||||
//: Settings context menu action
|
||||
text: catalog.i18nc("@action:menu", "Configure setting visiblity...");
|
||||
text: catalog.i18nc("@action:menu", "Configure setting visibility...");
|
||||
|
||||
onTriggered: Cura.Actions.configureSettingVisibility.trigger(contextMenu);
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ Rectangle
|
|||
ConfigurationSelection
|
||||
{
|
||||
id: configSelection
|
||||
visible: isNetworkPrinter
|
||||
visible: isNetworkPrinter && printerConnected
|
||||
width: visible ? Math.round(base.width * 0.15) : 0
|
||||
height: UM.Theme.getSize("sidebar_header").height
|
||||
anchors.top: base.top
|
||||
|
|
|
@ -178,6 +178,7 @@ Column
|
|||
text: catalog.i18nc("@action:inmenu", "Disable Extruder")
|
||||
onTriggered: Cura.MachineManager.setExtruderEnabled(model.index, false)
|
||||
visible: extruder_enabled
|
||||
enabled: Cura.MachineManager.numberExtrudersEnabled > 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -185,22 +186,34 @@ Column
|
|||
{
|
||||
background: Item
|
||||
{
|
||||
Rectangle
|
||||
function buttonBackgroundColor(index)
|
||||
{
|
||||
anchors.fill: parent
|
||||
border.width: control.checked ? UM.Theme.getSize("default_lining").width * 2 : UM.Theme.getSize("default_lining").width
|
||||
border.color: (control.checked || control.pressed) ? UM.Theme.getColor("action_button_active_border") :
|
||||
control.hovered ? UM.Theme.getColor("action_button_hovered_border") :
|
||||
UM.Theme.getColor("action_button_border")
|
||||
color: (control.checked || control.pressed) ? UM.Theme.getColor("action_button_active") :
|
||||
control.hovered ? UM.Theme.getColor("action_button_hovered") :
|
||||
UM.Theme.getColor("action_button")
|
||||
Behavior on color { ColorAnimation { duration: 50; } }
|
||||
var extruder = Cura.MachineManager.getExtruder(index)
|
||||
if (extruder.isEnabled) {
|
||||
return (control.checked || control.pressed) ? UM.Theme.getColor("action_button_active") :
|
||||
control.hovered ? UM.Theme.getColor("action_button_hovered") :
|
||||
UM.Theme.getColor("action_button")
|
||||
} else {
|
||||
return UM.Theme.getColor("action_button_disabled")
|
||||
}
|
||||
}
|
||||
|
||||
function buttonBorderColor(index)
|
||||
{
|
||||
var extruder = Cura.MachineManager.getExtruder(index)
|
||||
if (extruder.isEnabled) {
|
||||
return (control.checked || control.pressed) ? UM.Theme.getColor("action_button_active_border") :
|
||||
control.hovered ? UM.Theme.getColor("action_button_hovered_border") :
|
||||
UM.Theme.getColor("action_button_border")
|
||||
} else {
|
||||
return UM.Theme.getColor("action_button_disabled_border")
|
||||
}
|
||||
}
|
||||
|
||||
function buttonColor(index) {
|
||||
var extruder = Cura.MachineManager.getExtruder(index);
|
||||
if (extruder.isEnabled) {
|
||||
if (extruder.isEnabled)
|
||||
{
|
||||
return (
|
||||
control.checked || control.pressed) ? UM.Theme.getColor("action_button_active_text") :
|
||||
control.hovered ? UM.Theme.getColor("action_button_hovered_text") :
|
||||
|
@ -210,10 +223,20 @@ Column
|
|||
}
|
||||
}
|
||||
|
||||
Rectangle
|
||||
{
|
||||
anchors.fill: parent
|
||||
border.width: control.checked ? UM.Theme.getSize("default_lining").width * 2 : UM.Theme.getSize("default_lining").width
|
||||
border.color: buttonBorderColor(index)
|
||||
color: buttonBackgroundColor(index)
|
||||
Behavior on color { ColorAnimation { duration: 50; } }
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
id: extruderButtonFace
|
||||
anchors.centerIn: parent
|
||||
|
||||
width: {
|
||||
var extruderTextWidth = extruderStaticText.visible ? extruderStaticText.width : 0;
|
||||
var iconWidth = extruderIconItem.width;
|
||||
|
@ -501,6 +524,8 @@ Column
|
|||
source: UM.Theme.getIcon("warning")
|
||||
width: UM.Theme.getSize("section_icon").width
|
||||
height: UM.Theme.getSize("section_icon").height
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
color: UM.Theme.getColor("material_compatibility_warning")
|
||||
visible: !Cura.MachineManager.isCurrentSetupSupported
|
||||
}
|
||||
|
@ -522,9 +547,7 @@ Column
|
|||
hoverEnabled: true
|
||||
onClicked: {
|
||||
// open the material URL with web browser
|
||||
var version = UM.Application.version;
|
||||
var machineName = Cura.MachineManager.activeMachine.definition.id;
|
||||
var url = "https://ultimaker.com/materialcompatibility/" + version + "/" + machineName + "?utm_source=cura&utm_medium=software&utm_campaign=resources";
|
||||
var url = "https://ultimaker.com/incoming-links/cura/material-compatibilty"
|
||||
Qt.openUrlExternally(url);
|
||||
}
|
||||
onEntered: {
|
||||
|
|
|
@ -111,7 +111,6 @@ Item
|
|||
|
||||
// Set selected value
|
||||
if (Cura.MachineManager.activeQualityType == qualityItem.quality_type) {
|
||||
|
||||
// set to -1 when switching to user created profile so all ticks are clickable
|
||||
if (Cura.SimpleModeSettingsManager.isProfileUserCreated) {
|
||||
qualityModel.qualitySliderActiveIndex = -1
|
||||
|
@ -474,18 +473,7 @@ Item
|
|||
onClicked:
|
||||
{
|
||||
// if the current profile is user-created, switch to a built-in quality
|
||||
if (Cura.SimpleModeSettingsManager.isProfileUserCreated)
|
||||
{
|
||||
if (Cura.QualityProfilesDropDownMenuModel.rowCount() > 0)
|
||||
{
|
||||
var item = Cura.QualityProfilesDropDownMenuModel.getItem(0);
|
||||
Cura.MachineManager.activeQualityGroup = item.quality_group;
|
||||
}
|
||||
}
|
||||
if (Cura.SimpleModeSettingsManager.isProfileCustomized)
|
||||
{
|
||||
discardOrKeepProfileChangesDialog.show()
|
||||
}
|
||||
Cura.MachineManager.resetToUseDefaultQuality()
|
||||
}
|
||||
onEntered:
|
||||
{
|
||||
|
@ -594,7 +582,9 @@ Item
|
|||
// Update value only if the Recomended mode is Active,
|
||||
// Otherwise if I change the value in the Custom mode the Recomended view will try to repeat
|
||||
// same operation
|
||||
if (UM.Preferences.getValue("cura/active_mode") == 0) {
|
||||
var active_mode = UM.Preferences.getValue("cura/active_mode")
|
||||
|
||||
if (active_mode == 0 || active_mode == "simple") {
|
||||
Cura.MachineManager.setSettingForAllExtruders("infill_sparse_density", "value", roundedSliderValue)
|
||||
}
|
||||
}
|
||||
|
|
83
resources/shaders/camera_distance.shader
Normal file
83
resources/shaders/camera_distance.shader
Normal file
|
@ -0,0 +1,83 @@
|
|||
[shaders]
|
||||
vertex =
|
||||
uniform highp mat4 u_modelMatrix;
|
||||
uniform highp mat4 u_viewProjectionMatrix;
|
||||
|
||||
attribute highp vec4 a_vertex;
|
||||
|
||||
varying highp vec3 v_vertex;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 world_space_vert = u_modelMatrix * a_vertex;
|
||||
gl_Position = u_viewProjectionMatrix * world_space_vert;
|
||||
|
||||
v_vertex = world_space_vert.xyz;
|
||||
}
|
||||
|
||||
fragment =
|
||||
uniform highp vec3 u_viewPosition;
|
||||
|
||||
varying highp vec3 v_vertex;
|
||||
|
||||
void main()
|
||||
{
|
||||
highp float distance_to_camera = distance(v_vertex, u_viewPosition) * 1000.; // distance in micron
|
||||
|
||||
vec3 encoded; // encode float into 3 8-bit channels; this gives a precision of a micron at a range of up to ~16 meter
|
||||
encoded.b = floor(distance_to_camera / 65536.0);
|
||||
encoded.g = floor((distance_to_camera - encoded.b * 65536.0) / 256.0);
|
||||
encoded.r = floor(distance_to_camera - encoded.b * 65536.0 - encoded.g * 256.0);
|
||||
|
||||
gl_FragColor.rgb = encoded / 255.;
|
||||
gl_FragColor.a = 1.0;
|
||||
}
|
||||
|
||||
vertex41core =
|
||||
#version 410
|
||||
uniform highp mat4 u_modelMatrix;
|
||||
uniform highp mat4 u_viewProjectionMatrix;
|
||||
|
||||
in highp vec4 a_vertex;
|
||||
|
||||
out highp vec3 v_vertex;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 world_space_vert = u_modelMatrix * a_vertex;
|
||||
gl_Position = u_viewProjectionMatrix * world_space_vert;
|
||||
|
||||
v_vertex = world_space_vert.xyz;
|
||||
}
|
||||
|
||||
fragment41core =
|
||||
#version 410
|
||||
uniform highp vec3 u_viewPosition;
|
||||
|
||||
in highp vec3 v_vertex;
|
||||
|
||||
out vec4 frag_color;
|
||||
|
||||
void main()
|
||||
{
|
||||
highp float distance_to_camera = distance(v_vertex, u_viewPosition) * 1000.; // distance in micron
|
||||
|
||||
vec3 encoded; // encode float into 3 8-bit channels; this gives a precision of a micron at a range of up to ~16 meter
|
||||
encoded.r = floor(distance_to_camera / 65536.0);
|
||||
encoded.g = floor((distance_to_camera - encoded.r * 65536.0) / 256.0);
|
||||
encoded.b = floor(distance_to_camera - encoded.r * 65536.0 - encoded.g * 256.0);
|
||||
|
||||
frag_color.rgb = encoded / 255.;
|
||||
frag_color.a = 1.0;
|
||||
}
|
||||
|
||||
[defaults]
|
||||
|
||||
[bindings]
|
||||
u_modelMatrix = model_matrix
|
||||
u_viewProjectionMatrix = view_projection_matrix
|
||||
u_normalMatrix = normal_matrix
|
||||
u_viewPosition = view_position
|
||||
|
||||
[attributes]
|
||||
a_vertex = vertex
|
|
@ -84,16 +84,16 @@
|
|||
"tab_background": [39, 44, 48, 255],
|
||||
|
||||
"action_button": [39, 44, 48, 255],
|
||||
"action_button_text": [255, 255, 255, 101],
|
||||
"action_button_text": [255, 255, 255, 200],
|
||||
"action_button_border": [255, 255, 255, 30],
|
||||
"action_button_hovered": [39, 44, 48, 255],
|
||||
"action_button_hovered_text": [255, 255, 255, 255],
|
||||
"action_button_hovered_border": [255, 255, 255, 30],
|
||||
"action_button_active": [39, 44, 48, 30],
|
||||
"action_button_active_text": [255, 255, 255, 255],
|
||||
"action_button_active_border": [255, 255, 255, 30],
|
||||
"action_button_active_border": [255, 255, 255, 100],
|
||||
"action_button_disabled": [39, 44, 48, 255],
|
||||
"action_button_disabled_text": [255, 255, 255, 101],
|
||||
"action_button_disabled_text": [255, 255, 255, 80],
|
||||
"action_button_disabled_border": [255, 255, 255, 30],
|
||||
|
||||
"scrollbar_background": [39, 44, 48, 0],
|
||||
|
|
|
@ -411,6 +411,8 @@
|
|||
"save_button_save_to_button": [0.3, 2.7],
|
||||
"save_button_specs_icons": [1.4, 1.4],
|
||||
|
||||
"monitor_preheat_temperature_control": [4.5, 2.0],
|
||||
|
||||
"modal_window_minimum": [60.0, 45],
|
||||
"license_window_minimum": [45, 45],
|
||||
"wizard_progress": [10.0, 0.0],
|
||||
|
|
|
@ -46,6 +46,7 @@ retraction_count_max = 25
|
|||
retraction_extrusion_window = 1
|
||||
retraction_hop = 2
|
||||
retraction_hop_only_when_collides = True
|
||||
retraction_min_travel = =line_width * 2
|
||||
skin_overlap = 5
|
||||
speed_equalize_flow_enabled = True
|
||||
speed_layer_0 = 20
|
||||
|
|
|
@ -57,7 +57,7 @@ retraction_count_max = 15
|
|||
retraction_extrusion_window = =retraction_amount
|
||||
retraction_hop = 2
|
||||
retraction_hop_only_when_collides = True
|
||||
retraction_min_travel = 5
|
||||
retraction_min_travel = =line_width * 3
|
||||
retraction_prime_speed = 15
|
||||
skin_overlap = 5
|
||||
speed_layer_0 = 20
|
||||
|
|
|
@ -46,6 +46,7 @@ retraction_count_max = 25
|
|||
retraction_extrusion_window = 1
|
||||
retraction_hop = 2
|
||||
retraction_hop_only_when_collides = True
|
||||
retraction_min_travel = =line_width * 2
|
||||
skin_overlap = 5
|
||||
speed_equalize_flow_enabled = True
|
||||
speed_layer_0 = 20
|
||||
|
|
|
@ -57,7 +57,7 @@ retraction_count_max = 15
|
|||
retraction_extrusion_window = =retraction_amount
|
||||
retraction_hop = 2
|
||||
retraction_hop_only_when_collides = True
|
||||
retraction_min_travel = 5
|
||||
retraction_min_travel = =line_width * 3
|
||||
retraction_prime_speed = 15
|
||||
skin_overlap = 5
|
||||
speed_layer_0 = 20
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue