Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorc.lamboo <casperlamboo@gmail.com>2022-06-14 17:19:56 +0300
committerc.lamboo <casperlamboo@gmail.com>2022-06-14 17:19:56 +0300
commita315171d7c442bb66664096d1b4765e9f03d84f6 (patch)
tree7a44c6cba8257d867e469e44f3ddab81a92b442e /plugins/DigitalLibrary/resources/qml/SaveProjectFilesPage.qml
parent90bb02acaea4a12307488c6e29760b580e95996b (diff)
Replace checkboxes in save project to DL dialog with a combobox
CURA-8555
Diffstat (limited to 'plugins/DigitalLibrary/resources/qml/SaveProjectFilesPage.qml')
-rw-r--r--plugins/DigitalLibrary/resources/qml/SaveProjectFilesPage.qml55
1 files changed, 17 insertions, 38 deletions
diff --git a/plugins/DigitalLibrary/resources/qml/SaveProjectFilesPage.qml b/plugins/DigitalLibrary/resources/qml/SaveProjectFilesPage.qml
index 90b9bd8b05..a8e672ffa2 100644
--- a/plugins/DigitalLibrary/resources/qml/SaveProjectFilesPage.qml
+++ b/plugins/DigitalLibrary/resources/qml/SaveProjectFilesPage.qml
@@ -14,6 +14,9 @@ import DigitalFactory 1.0 as DF
Item
{
id: base
+
+ property variant catalog: UM.I18nCatalog { name: "cura" }
+
width: parent.width
height: parent.height
@@ -63,7 +66,7 @@ Item
anchors.topMargin: UM.Theme.getSize("thin_margin").height
validator: RegularExpressionValidator
{
- regularExpression: /^[\w\-\. ()]{0,255}$/
+// regularExpression: /^[\w\-\. ()]{0,255}$/
}
text: PrintInformation.jobName
@@ -190,53 +193,29 @@ Item
text: "Save"
enabled: (asProjectCheckbox.checked || asSlicedCheckbox.checked) && dfFilenameTextfield.text.length >= 1 && dfFilenameTextfield.state !== 'invalid'
- onClicked:
- {
- let saveAsFormats = [];
- if (asProjectCheckbox.checked)
- {
- saveAsFormats.push("3mf");
- }
- if (asSlicedCheckbox.checked)
- {
- saveAsFormats.push("ufp");
- }
- manager.saveFileToSelectedProject(dfFilenameTextfield.text, saveAsFormats);
- }
+ onClicked: manager.saveFileToSelectedProject(dfFilenameTextfield.text, asProjectComboBox.currentValue)
busy: false
}
- Row
+ Cura.ComboBox
{
+ id: asProjectComboBox
- id: saveAsFormatRow
+ width: UM.Theme.getSize("combobox_wide").width
+ height: saveButton.height
anchors.verticalCenter: saveButton.verticalCenter
anchors.right: saveButton.left
anchors.rightMargin: UM.Theme.getSize("thin_margin").height
- width: childrenRect.width
- spacing: UM.Theme.getSize("default_margin").width
-
- UM.CheckBox
- {
- id: asProjectCheckbox
- height: UM.Theme.getSize("checkbox").height
- anchors.verticalCenter: parent.verticalCenter
- checked: true
- text: "Save Cura project"
- font: UM.Theme.getFont("medium")
- }
- UM.CheckBox
- {
- id: asSlicedCheckbox
- height: UM.Theme.getSize("checkbox").height
- anchors.verticalCenter: parent.verticalCenter
+ enabled: UM.Backend.state == UM.Backend.Done
+ currentIndex: UM.Backend.state == UM.Backend.Done ? 0 : 1
+ textRole: "text"
+ valueRole: "value"
- enabled: UM.Backend.state == UM.Backend.Done
- checked: UM.Backend.state == UM.Backend.Done
- text: "Save print file"
- font: UM.Theme.getFont("medium")
- }
+ model: [
+ { text: catalog.i18nc("@option", "Save Cura project and print file"), key: "3mf_ufp", value: ["3mf", "ufp"] },
+ { text: catalog.i18nc("@option", "Save Cura project"), key: "3mf", value: ["3mf"] },
+ ]
}
Component.onCompleted: