Merge branch 'master' into PyQt6_upgrade

Conflicts:
	cura/PlatformPhysics.py -> Removed shapely on master, while QTimer import got updated to Qt6.
	plugins/Toolbox -> Entire folder is deleted in master, but it was updated to Qt6 here. This can all be removed.
This commit is contained in:
Ghostkeeper 2022-02-21 11:52:28 +01:00
commit c7d7dd11d1
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A
415 changed files with 43396 additions and 36375 deletions

View file

@ -1,4 +1,4 @@
// Copyright (c) 2020 Ultimaker B.V.
// Copyright (c) 2022 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.10
@ -8,7 +8,7 @@ import QtQuick.Controls.Styles 1.1
import QtQuick.Controls 2.3 as NewControls
import UM 1.1 as UM
import UM 1.5 as UM
import Cura 1.1 as Cura
UM.PreferencesPage
@ -17,6 +17,8 @@ UM.PreferencesPage
title: catalog.i18nc("@title:tab", "General")
id: generalPreferencesPage
width: parent.width
function setDefaultLanguage(languageCode)
{
//loops through the languageList and sets the language using the languageCode
@ -128,14 +130,14 @@ UM.PreferencesPage
ScrollView
{
id: preferencesScrollView
width: parent.width
height: parent.height
Column
{
//: Language selection label
UM.I18nCatalog{id: catalog; name: "cura"}
width: preferencesScrollView.viewport.width
Label
{
@ -162,16 +164,14 @@ UM.PreferencesPage
Component.onCompleted:
{
append({ text: "English", code: "en_US" })
// append({ text: "Čeština", code: "cs_CZ" })
append({ text: "Čeština", code: "cs_CZ" })
append({ text: "Deutsch", code: "de_DE" })
append({ text: "Español", code: "es_ES" })
//Finnish is disabled for being incomplete: append({ text: "Suomi", code: "fi_FI" })
append({ text: "Français", code: "fr_FR" })
append({ text: "Italiano", code: "it_IT" })
append({ text: "日本語", code: "ja_JP" })
append({ text: "한국어", code: "ko_KR" })
append({ text: "Nederlands", code: "nl_NL" })
//Polish is disabled for being incomplete: 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" })
@ -184,6 +184,12 @@ UM.PreferencesPage
{
append({ text: "Pirate", code: "en_7S" })
}
// incomplete and/or abandoned
append({ text: catalog.i18nc("@heading", "-- incomplete --"), code: "" })
append({ text: "Magyar", code: "hu_HU" })
append({ text: "Suomi", code: "fi_FI" })
append({ text: "Polski", code: "pl_PL" })
}
}
@ -195,8 +201,7 @@ UM.PreferencesPage
model: languageList
Layout.fillWidth: true
currentIndex:
{
function setCurrentIndex() {
var code = UM.Preferences.getValue("general/language");
for(var i = 0; i < languageList.count; ++i)
{
@ -206,13 +211,23 @@ UM.PreferencesPage
}
}
}
onActivated: UM.Preferences.setValue("general/language", model.get(index).code)
currentIndex: setCurrentIndex()
onActivated: if (model.get(index).code != "")
{
UM.Preferences.setValue("general/language", model.get(index).code);
}
else
{
currentIndex = setCurrentIndex();
}
}
Label
{
id: currencyLabel
text: catalog.i18nc("@label","Currency:")
text: catalog.i18nc("@label", "Currency:")
}
TextField
@ -289,7 +304,7 @@ UM.PreferencesPage
text: catalog.i18nc("@info:tooltip", "Slice automatically when changing settings.")
CheckBox
UM.CheckBox
{
id: autoSliceCheckbox
checked: boolCheck(UM.Preferences.getValue("general/auto_slice"))
@ -319,7 +334,7 @@ UM.PreferencesPage
text: catalog.i18nc("@info:tooltip", "Highlight unsupported areas of the model in red. Without support these areas will not print properly.")
CheckBox
UM.CheckBox
{
id: showOverhangCheckbox
@ -338,7 +353,7 @@ UM.PreferencesPage
text: catalog.i18nc("@info:tooltip", "Highlight missing or extraneous surfaces of the model using warning signs. The toolpaths will often be missing parts of the intended geometry.")
CheckBox
UM.CheckBox
{
id: showXrayErrorCheckbox
@ -355,7 +370,7 @@ UM.PreferencesPage
height: childrenRect.height;
text: catalog.i18nc("@info:tooltip", "Moves the camera so the model is in the center of the view when a model is selected")
CheckBox
UM.CheckBox
{
id: centerOnSelectCheckbox
text: catalog.i18nc("@action:button","Center camera when item is selected");
@ -370,7 +385,7 @@ UM.PreferencesPage
height: childrenRect.height;
text: catalog.i18nc("@info:tooltip", "Should the default zoom behavior of cura be inverted?")
CheckBox
UM.CheckBox
{
id: invertZoomCheckbox
text: catalog.i18nc("@action:button", "Invert the direction of camera zoom.");
@ -391,7 +406,7 @@ UM.PreferencesPage
height: childrenRect.height;
text: zoomToMouseCheckbox.enabled ? catalog.i18nc("@info:tooltip", "Should zooming move in the direction of the mouse?") : catalog.i18nc("@info:tooltip", "Zooming towards the mouse is not supported in the orthographic perspective.")
CheckBox
UM.CheckBox
{
id: zoomToMouseCheckbox
text: catalog.i18nc("@action:button", "Zoom toward mouse direction")
@ -422,7 +437,7 @@ UM.PreferencesPage
height: childrenRect.height
text: catalog.i18nc("@info:tooltip", "Should models on the platform be moved so that they no longer intersect?")
CheckBox
UM.CheckBox
{
id: pushFreeCheckbox
text: catalog.i18nc("@option:check", "Ensure models are kept apart")
@ -436,7 +451,7 @@ UM.PreferencesPage
height: childrenRect.height
text: catalog.i18nc("@info:tooltip", "Should models on the platform be moved down to touch the build plate?")
CheckBox
UM.CheckBox
{
id: dropDownCheckbox
text: catalog.i18nc("@option:check", "Automatically drop models to the build plate")
@ -453,7 +468,7 @@ UM.PreferencesPage
text: catalog.i18nc("@info:tooltip","Show caution message in g-code reader.")
CheckBox
UM.CheckBox
{
id: gcodeShowCautionCheckbox
@ -470,7 +485,7 @@ UM.PreferencesPage
height: childrenRect.height
text: catalog.i18nc("@info:tooltip", "Should layer be forced into compatibility mode?")
CheckBox
UM.CheckBox
{
id: forceLayerViewCompatibilityModeCheckbox
text: catalog.i18nc("@option:check", "Force layer view compatibility mode (restart required)")
@ -485,7 +500,7 @@ UM.PreferencesPage
height: childrenRect.height
text: catalog.i18nc("@info:tooltip", "Should Cura open at the location it was closed?")
CheckBox
UM.CheckBox
{
id: restoreWindowPositionCheckbox
text: catalog.i18nc("@option:check", "Restore window position on start")
@ -560,7 +575,7 @@ UM.PreferencesPage
height: childrenRect.height
text: catalog.i18nc("@info:tooltip","Should opening files from the desktop or external applications open in the same instance of Cura?")
CheckBox
UM.CheckBox
{
id: singleInstanceCheckbox
text: catalog.i18nc("@option:check","Use a single instance of Cura")
@ -576,7 +591,7 @@ UM.PreferencesPage
text: catalog.i18nc("@info:tooltip","Should the build plate be cleared before loading a new model in the single instance of Cura?")
enabled: singleInstanceCheckbox.checked
CheckBox
UM.CheckBox
{
id: singleInstanceClearBeforeLoadCheckbox
text: catalog.i18nc("@option:check","Clear buildplate before loading model into the single instance")
@ -591,7 +606,7 @@ UM.PreferencesPage
height: childrenRect.height
text: catalog.i18nc("@info:tooltip","Should models be scaled to the build volume if they are too large?")
CheckBox
UM.CheckBox
{
id: scaleToFitCheckbox
text: catalog.i18nc("@option:check","Scale large models")
@ -606,7 +621,7 @@ UM.PreferencesPage
height: childrenRect.height
text: catalog.i18nc("@info:tooltip","An model may appear extremely small if its unit is for example in meters rather than millimeters. Should these models be scaled up?")
CheckBox
UM.CheckBox
{
id: scaleTinyCheckbox
text: catalog.i18nc("@option:check","Scale extremely small models")
@ -621,7 +636,7 @@ UM.PreferencesPage
height: childrenRect.height
text: catalog.i18nc("@info:tooltip","Should models be selected after they are loaded?")
CheckBox
UM.CheckBox
{
id: selectModelsOnLoadCheckbox
text: catalog.i18nc("@option:check","Select models when loaded")
@ -636,7 +651,7 @@ UM.PreferencesPage
height: childrenRect.height
text: catalog.i18nc("@info:tooltip", "Should a prefix based on the printer name be added to the print job name automatically?")
CheckBox
UM.CheckBox
{
id: prefixJobNameCheckbox
text: catalog.i18nc("@option:check", "Add machine prefix to job name")
@ -651,7 +666,7 @@ UM.PreferencesPage
height: childrenRect.height
text: catalog.i18nc("@info:tooltip", "Should a summary be shown when saving a project file?")
CheckBox
UM.CheckBox
{
text: catalog.i18nc("@option:check", "Show summary dialog when saving project")
checked: boolCheck(UM.Preferences.getValue("cura/dialog_on_project_save"))
@ -796,7 +811,7 @@ UM.PreferencesPage
height: visible ? childrenRect.height : 0
text: catalog.i18nc("@info:tooltip", "Should anonymous data about your print be sent to Ultimaker? Note, no models, IP addresses or other personally identifiable information is sent or stored.")
CheckBox
UM.CheckBox
{
id: sendDataCheckbox
text: catalog.i18nc("@option:check","Send (anonymous) print information")
@ -835,7 +850,7 @@ UM.PreferencesPage
height: visible ? childrenRect.height : 0
text: catalog.i18nc("@info:tooltip", "Should Cura check for updates when the program is started?")
CheckBox
UM.CheckBox
{
id: checkUpdatesCheckbox
text: catalog.i18nc("@option:check","Check for updates on start")
@ -883,7 +898,7 @@ UM.PreferencesPage
height: visible ? childrenRect.height : 0
text: catalog.i18nc("@info:tooltip", "Should an automatic check for new plugins be done every time Cura is started? It is highly recommended that you do not disable this!")
CheckBox
UM.CheckBox
{
id: pluginNotificationsUpdateCheckbox
text: catalog.i18nc("@option:check", "Get notifications for plugin updates")

View file

@ -7,7 +7,7 @@ import QtQuick.Controls.Styles 1.1
import QtQuick.Controls 2.3 as NewControls
import UM 1.2 as UM
import UM 1.5 as UM
import Cura 1.0 as Cura
@ -36,7 +36,7 @@ UM.PreferencesPage
id: base;
anchors.fill: parent;
CheckBox
UM.CheckBox
{
id: toggleVisibleSettings
anchors
@ -46,7 +46,7 @@ UM.PreferencesPage
leftMargin: UM.Theme.getSize("default_margin").width
}
text: catalog.i18nc("@label:textbox", "Check all")
checkedState:
checkState:
{
if(definitionsModel.visibleCount == definitionsModel.categoryCount)
{
@ -61,14 +61,13 @@ UM.PreferencesPage
return Qt.PartiallyChecked
}
}
partiallyCheckedEnabled: true
MouseArea
{
anchors.fill: parent;
onClicked:
{
if(parent.checkedState == Qt.Unchecked || parent.checkedState == Qt.PartiallyChecked)
if(parent.checkState == Qt.Unchecked || parent.checkState == Qt.PartiallyChecked)
{
definitionsModel.setAllExpandedVisible(true)
}