Remove old references to buildplate.

CURA-6867
This commit is contained in:
Joey de l'Arago 2023-01-10 10:31:08 +01:00
parent 99d47fe772
commit 55531ab04b
6 changed files with 4 additions and 119 deletions

View file

@ -1,71 +0,0 @@
// Copyright (c) 2019 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2
import QtQuick.Controls 2.0
import UM 1.5 as UM
/**
* This component comprises a buildplate icon and the buildplate name. It is
* used by the MonitorPrinterConfiguration component along with two instances
* of MonitorExtruderConfiguration.
*
* NOTE: For most labels, a fixed height with vertical alignment is used to make
* layouts more deterministic (like the fixed-size textboxes used in original
* mock-ups). This is also a stand-in for CSS's 'line-height' property. Denoted
* with '// FIXED-LINE-HEIGHT:'.
*/
Item
{
// The buildplate name
property var buildplate: null
// Height is one 18px label/icon
height: 18 * screenScaleFactor // TODO: Theme!
width: childrenRect.width
Row
{
height: parent.height
spacing: UM.Theme.getSize("slider_handle").width // TODO: Theme! (Should be same as extruder spacing)
// This wrapper ensures that the buildplate icon is located centered
// below an extruder icon.
Item
{
height: parent.height
width: 32 * screenScaleFactor // Ensure the icon is centered under the extruder icon (same width)
Rectangle
{
anchors.centerIn: parent
height: parent.height
width: height
color: buildplateIcon.visible > 0 ? "transparent" : UM.Theme.getColor("monitor_skeleton_loading")
radius: Math.floor(height / 2)
}
UM.ColorImage
{
id: buildplateIcon
anchors.centerIn: parent
color: UM.Theme.getColor("monitor_icon_primary")
height: UM.Theme.getSize("medium_button_icon").width
source: UM.Theme.getIcon("Buildplate")
width: height
visible: buildplate
}
}
UM.Label
{
id: buildplateLabel
elide: Text.ElideRight
text: buildplate ? buildplate : ""
visible: text !== ""
// FIXED-LINE-HEIGHT:
height: 18 * screenScaleFactor // TODO: Theme!
}
}
}

View file

@ -102,9 +102,6 @@ UM.Dialog
case "print_core_change":
text = catalog.i18nc("@label", "Change print core %1 from %2 to %3.").arg(change.index + 1).arg(change.originName).arg(change.targetName)
break
case "buildplate_change":
text = catalog.i18nc("@label", "Change build plate to %1 (This cannot be overridden).").arg(formatBuildPlateType(change.target_name))
break
default:
text = "unknown"
}
@ -143,19 +140,4 @@ UM.Dialog
}
return true
}
function formatBuildPlateType(buildPlateType)
{
var translationText = ""
switch (buildPlateType) {
case "glass":
translationText = catalog.i18nc("@label", "Glass")
break
case "aluminum":
translationText = catalog.i18nc("@label", "Aluminum")
break
default:
translationText = null
}
return translationText
}
}

View file

@ -10,7 +10,7 @@ import Cura 1.6 as Cura
/**
* This component comprises a colored extruder icon, the material name, and the
* print core name. It is used by the MonitorPrinterConfiguration component with
* a sibling instance as well as a MonitorBuildplateConfiguration instance.
* a sibling instance.
*
* NOTE: For most labels, a fixed height with vertical alignment is used to make
* layouts more deterministic (like the fixed-size textboxes used in original

View file

@ -172,14 +172,6 @@ Item
{
id: printerConfiguration
anchors.verticalCenter: parent.verticalCenter
buildplate: {
switch (printJob.assignedPrinter.buildplate) {
case "glass":
return catalog.i18nc("@label", "Glass");
default:
return null
}
}
configurations: base.printJob ? base.printJob.configuration.extruderConfigurations : null
height: Math.round(72 * screenScaleFactor) // TODO: Theme!
}

View file

@ -175,14 +175,7 @@ Item
{
id: printerConfiguration
anchors.verticalCenter: parent.verticalCenter
buildplate: {
switch (printer.buildplate) {
case "glass":
return catalog.i18nc("@label", "Glass");
default:
return null
}
}
configurations:
{
var configs = []

View file

@ -7,17 +7,13 @@ import UM 1.3 as UM
/**
* The MonitorPrinterConfiguration accepts 2 configuration objects as input and
* applies them to a MonitorBuildplateConfiguration instance and two instances
* of MonitorExtruderConfiguration. It's used in both the MonitorPrintJobCard
* component as well as the MonitorPrinterCard component.
* applies them to two instances of MonitorExtruderConfiguration.
* It's used in both the MonitorPrintJobCard component as well as the MonitorPrinterCard component.
*/
Item
{
id: base
// Extracted buildplate configuration
property alias buildplate: buildplateConfig.buildplate
// Array of extracted extruder configurations
property var configurations: [null,null]
@ -48,11 +44,4 @@ Item
}
}
MonitorBuildplateConfiguration
{
id: buildplateConfig
anchors.bottom: parent.bottom
buildplate: null
}
}