From 93b04190f803b16e8409ac94f843f2605a347ed8 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Thu, 18 Oct 2018 17:13:15 +0200 Subject: [PATCH] Change name of some components to make them more indicative of what they do. Contributes to CURA-5772. --- plugins/PrepareStage/PrepareMenu.qml | 23 +++++++-- ...or.qml => CustomConfigurationSelector.qml} | 0 .../qml/MachineAndConfigurationSelector.qml | 47 ------------------- ...chineSelection.qml => MachineSelector.qml} | 0 ...ion.qml => QuickConfigurationSelector.qml} | 0 ...ngComponent.qml => PrintSetupSelector.qml} | 0 resources/qml/qmldir | 7 +-- 7 files changed, 23 insertions(+), 54 deletions(-) rename resources/qml/{MaterialAndVariantSelector.qml => CustomConfigurationSelector.qml} (100%) delete mode 100644 resources/qml/MachineAndConfigurationSelector.qml rename resources/qml/{MachineSelection.qml => MachineSelector.qml} (100%) rename resources/qml/Menus/ConfigurationMenu/{ConfigurationSelection.qml => QuickConfigurationSelector.qml} (100%) rename resources/qml/{ProfileAndSettingComponent.qml => PrintSetupSelector.qml} (100%) diff --git a/plugins/PrepareStage/PrepareMenu.qml b/plugins/PrepareStage/PrepareMenu.qml index 10ff0b2310..8d0f03ec2f 100644 --- a/plugins/PrepareStage/PrepareMenu.qml +++ b/plugins/PrepareStage/PrepareMenu.qml @@ -13,6 +13,9 @@ Item signal showTooltip(Item item, point location, string text) signal hideTooltip() + property bool isNetworkPrinter: Cura.MachineManager.activeMachineNetworkKey != "" + property bool printerConnected: Cura.MachineManager.printerConnected + UM.I18nCatalog { id: catalog @@ -37,19 +40,31 @@ Item { id: spacing width: UM.Theme.getSize("default_margin").width - height: parent.height + height: prepareMenu.height } - Cura.MachineAndConfigurationSelector + Cura.MachineSelector { + id: machineSelection + width: UM.Theme.getSize("sidebar").width + height: prepareMenu.height } - Cura.MaterialAndVariantSelector + Cura.QuickConfigurationSelector + { + id: configSelection + visible: isNetworkPrinter && printerConnected + width: visible ? Math.round(machineSelection.width * 0.15) : 0 + panelWidth: machineSelection.width + height: prepareMenu.height + } + + Cura.CustomConfigurationSelector { width: UM.Theme.getSize("sidebar").width } - Cura.ProfileAndSettingComponent + Cura.PrintSetupSelector { width: UM.Theme.getSize("sidebar").width onShowTooltip: prepareMenu.showTooltip(item, location, text) diff --git a/resources/qml/MaterialAndVariantSelector.qml b/resources/qml/CustomConfigurationSelector.qml similarity index 100% rename from resources/qml/MaterialAndVariantSelector.qml rename to resources/qml/CustomConfigurationSelector.qml diff --git a/resources/qml/MachineAndConfigurationSelector.qml b/resources/qml/MachineAndConfigurationSelector.qml deleted file mode 100644 index 15b9ca6dd6..0000000000 --- a/resources/qml/MachineAndConfigurationSelector.qml +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2017 Ultimaker B.V. -// Cura is released under the terms of the LGPLv3 or higher. - -import QtQuick 2.7 - -import UM 1.2 as UM -import Cura 1.0 as Cura -import "Menus" -import "Menus/ConfigurationMenu" - -Rectangle -{ - color: UM.Theme.getColor("sidebar_lining_thin") - - implicitHeight: UM.Theme.getSize("sidebar_header").height - implicitWidth: UM.Theme.getSize("sidebar").width - - property bool isNetworkPrinter: Cura.MachineManager.activeMachineNetworkKey != "" - property bool printerConnected: Cura.MachineManager.printerConnected - - MachineSelection - { - id: machineSelection - anchors - { - left: parent.left - right: configSelection.left - rightMargin: UM.Theme.getSize("sidebar_lining_thin").height / 2 - top: parent.top - bottom: parent.bottom - } - } - - ConfigurationSelection - { - id: configSelection - visible: isNetworkPrinter && printerConnected - width: visible ? Math.round(parent.width * 0.15) : 0 - panelWidth: parent.width - anchors - { - right: parent.right - top: parent.top - bottom: parent.bottom - } - } -} \ No newline at end of file diff --git a/resources/qml/MachineSelection.qml b/resources/qml/MachineSelector.qml similarity index 100% rename from resources/qml/MachineSelection.qml rename to resources/qml/MachineSelector.qml diff --git a/resources/qml/Menus/ConfigurationMenu/ConfigurationSelection.qml b/resources/qml/Menus/ConfigurationMenu/QuickConfigurationSelector.qml similarity index 100% rename from resources/qml/Menus/ConfigurationMenu/ConfigurationSelection.qml rename to resources/qml/Menus/ConfigurationMenu/QuickConfigurationSelector.qml diff --git a/resources/qml/ProfileAndSettingComponent.qml b/resources/qml/PrintSetupSelector.qml similarity index 100% rename from resources/qml/ProfileAndSettingComponent.qml rename to resources/qml/PrintSetupSelector.qml diff --git a/resources/qml/qmldir b/resources/qml/qmldir index b9306b14bc..10e103d9ef 100644 --- a/resources/qml/qmldir +++ b/resources/qml/qmldir @@ -1,6 +1,7 @@ module Cura -MachineAndConfigurationSelector 1.0 MachineAndConfigurationSelector.qml -MaterialAndVariantSelector 1.0 MaterialAndVariantSelector.qml -ProfileAndSettingComponent 1.0 ProfileAndSettingComponent.qml +MachineSelector 1.0 MachineSelector.qml +QuickConfigurationSelector 1.0 QuickConfigurationSelector.qml +CustomConfigurationSelector 1.0 CustomConfigurationSelector.qml +PrintSetupSelector 1.0 PrintSetupSelector.qml ActionButton 1.0 ActionButton.qml \ No newline at end of file