mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 05:53:59 -06:00
Merge branch 'settings_rework'
Contributes to CURA-1278 * settings_rework: (224 commits) Improve slice trigger documentation Import Cura in materials preferences page so we can use the active definition id Add layer height to high quality profile so we have something that changes Update example XML material to use the right product names Filter available materials by the machine definition Show the add machine dialog when we do not have an active machine Create machine-specific material containers for machine specific overrides in XML material files When creating a new container stack, add empty containers for things where we cannot find containers Add preferred variant, material and quality to UM2+ definition Account for global container stack being None in the backend plugin Use the global stack instance variable and account for it potentially being None Store the global container stack as an instance property Added wildcard to filtering Per object settings filter now uses correct bool types (instead of strings) Removed stray = sign. Fix creating print job name Disable asynchronous loading of SettingItem when Qt Version < 5.5 Document QTbug Properly serialise all settings to g-code file Document GCodeWriter class ...
This commit is contained in:
commit
386aec32a8
125 changed files with 7651 additions and 2131 deletions
|
@ -7,7 +7,10 @@ import QtQuick.Controls.Styles 1.1
|
|||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Dialogs 1.1
|
||||
|
||||
import UM 1.1 as UM
|
||||
import UM 1.2 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
||||
import "."
|
||||
|
||||
UM.MainWindow
|
||||
{
|
||||
|
@ -53,7 +56,7 @@ UM.MainWindow
|
|||
title: catalog.i18nc("@title:menu menubar:toplevel","&File");
|
||||
|
||||
MenuItem {
|
||||
action: actions.open;
|
||||
action: Actions.open;
|
||||
}
|
||||
|
||||
Menu
|
||||
|
@ -115,11 +118,11 @@ UM.MainWindow
|
|||
}
|
||||
}
|
||||
|
||||
MenuItem { action: actions.reloadAll; }
|
||||
MenuItem { action: Actions.reloadAll; }
|
||||
|
||||
MenuSeparator { }
|
||||
|
||||
MenuItem { action: actions.quit; }
|
||||
MenuItem { action: Actions.quit; }
|
||||
}
|
||||
|
||||
Menu
|
||||
|
@ -127,17 +130,17 @@ UM.MainWindow
|
|||
//: Edit menu
|
||||
title: catalog.i18nc("@title:menu menubar:toplevel","&Edit");
|
||||
|
||||
MenuItem { action: actions.undo; }
|
||||
MenuItem { action: actions.redo; }
|
||||
MenuItem { action: Actions.undo; }
|
||||
MenuItem { action: Actions.redo; }
|
||||
MenuSeparator { }
|
||||
MenuItem { action: actions.deleteSelection; }
|
||||
MenuItem { action: actions.deleteAll; }
|
||||
MenuItem { action: actions.resetAllTranslation; }
|
||||
MenuItem { action: actions.resetAll; }
|
||||
MenuItem { action: Actions.deleteSelection; }
|
||||
MenuItem { action: Actions.deleteAll; }
|
||||
MenuItem { action: Actions.resetAllTranslation; }
|
||||
MenuItem { action: Actions.resetAll; }
|
||||
MenuSeparator { }
|
||||
MenuItem { action: actions.groupObjects;}
|
||||
MenuItem { action: actions.mergeObjects;}
|
||||
MenuItem { action: actions.unGroupObjects;}
|
||||
MenuItem { action: Actions.groupObjects;}
|
||||
MenuItem { action: Actions.mergeObjects;}
|
||||
MenuItem { action: Actions.unGroupObjects;}
|
||||
}
|
||||
|
||||
Menu
|
||||
|
@ -168,14 +171,17 @@ UM.MainWindow
|
|||
|
||||
Instantiator
|
||||
{
|
||||
model: UM.MachineInstancesModel { }
|
||||
model: UM.ContainerStacksModel
|
||||
{
|
||||
filter: {"type": "machine"}
|
||||
}
|
||||
MenuItem
|
||||
{
|
||||
text: model.name;
|
||||
checkable: true;
|
||||
checked: model.active;
|
||||
exclusiveGroup: machineMenuGroup;
|
||||
onTriggered: UM.MachineManager.setActiveMachineInstance(model.name)
|
||||
checked: Cura.MachineManager.activeMachineId == model.id
|
||||
exclusiveGroup: machineSelectionMenuGroup;
|
||||
onTriggered: Cura.MachineManager.setActiveMachine(model.id);
|
||||
}
|
||||
onObjectAdded: machineMenu.insertItem(index, object)
|
||||
onObjectRemoved: machineMenu.removeItem(object)
|
||||
|
@ -187,13 +193,20 @@ UM.MainWindow
|
|||
|
||||
Instantiator
|
||||
{
|
||||
model: UM.MachineVariantsModel { }
|
||||
model: UM.InstanceContainersModel
|
||||
{
|
||||
filter:
|
||||
{
|
||||
"type": "variant",
|
||||
"definition": Cura.MachineManager.activeDefinitionId //Only show variants of this machine
|
||||
}
|
||||
}
|
||||
MenuItem {
|
||||
text: model.name;
|
||||
checkable: true;
|
||||
checked: model.active;
|
||||
checked: model.id == Cura.MachineManager.activeVariantId;
|
||||
exclusiveGroup: machineVariantsGroup;
|
||||
onTriggered: UM.MachineManager.setActiveMachineVariant(model.name)
|
||||
onTriggered: Cura.MachineManager.setActiveVariant(model.id)
|
||||
}
|
||||
onObjectAdded: machineMenu.insertItem(index, object)
|
||||
onObjectRemoved: machineMenu.removeItem(object)
|
||||
|
@ -201,10 +214,10 @@ UM.MainWindow
|
|||
|
||||
ExclusiveGroup { id: machineVariantsGroup; }
|
||||
|
||||
MenuSeparator { visible: UM.MachineManager.hasVariants; }
|
||||
MenuSeparator { visible: Cura.MachineManager.hasVariants; }
|
||||
|
||||
MenuItem { action: actions.addMachine; }
|
||||
MenuItem { action: actions.configureMachines; }
|
||||
MenuItem { action: Actions.addMachine; }
|
||||
MenuItem { action: Actions.configureMachines; }
|
||||
}
|
||||
|
||||
Menu
|
||||
|
@ -215,7 +228,7 @@ UM.MainWindow
|
|||
Instantiator
|
||||
{
|
||||
id: profileMenuInstantiator
|
||||
model: UM.ProfilesModel {}
|
||||
// model: UM.ProfilesModel {}
|
||||
property int separatorIndex: -1
|
||||
|
||||
Loader {
|
||||
|
@ -277,11 +290,11 @@ UM.MainWindow
|
|||
|
||||
MenuSeparator { id: profileMenuSeparator }
|
||||
|
||||
MenuItem { action: actions.updateProfile; }
|
||||
MenuItem { action: actions.resetProfile; }
|
||||
MenuItem { action: actions.addProfile; }
|
||||
MenuItem { action: Actions.updateProfile; }
|
||||
MenuItem { action: Actions.resetProfile; }
|
||||
MenuItem { action: Actions.addProfile; }
|
||||
MenuSeparator { }
|
||||
MenuItem { action: actions.manageProfiles; }
|
||||
MenuItem { action: Actions.manageProfiles; }
|
||||
}
|
||||
|
||||
Menu
|
||||
|
@ -292,7 +305,7 @@ UM.MainWindow
|
|||
|
||||
Instantiator
|
||||
{
|
||||
model: UM.Models.extensionModel
|
||||
model: UM.ExtensionModel { }
|
||||
|
||||
Menu
|
||||
{
|
||||
|
@ -323,7 +336,7 @@ UM.MainWindow
|
|||
//: Settings menu
|
||||
title: catalog.i18nc("@title:menu menubar:toplevel","&Settings");
|
||||
|
||||
MenuItem { action: actions.preferences; }
|
||||
MenuItem { action: Actions.preferences; }
|
||||
}
|
||||
|
||||
Menu
|
||||
|
@ -331,11 +344,11 @@ UM.MainWindow
|
|||
//: Help menu
|
||||
title: catalog.i18nc("@title:menu menubar:toplevel","&Help");
|
||||
|
||||
MenuItem { action: actions.showEngineLog; }
|
||||
MenuItem { action: actions.documentation; }
|
||||
MenuItem { action: actions.reportBug; }
|
||||
MenuItem { action: Actions.showEngineLog; }
|
||||
MenuItem { action: Actions.documentation; }
|
||||
MenuItem { action: Actions.reportBug; }
|
||||
MenuSeparator { }
|
||||
MenuItem { action: actions.about; }
|
||||
MenuItem { action: Actions.about; }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -425,7 +438,7 @@ UM.MainWindow
|
|||
left: parent.left;
|
||||
//leftMargin: UM.Theme.getSize("loadfile_margin").width
|
||||
}
|
||||
action: actions.open;
|
||||
action: Actions.open;
|
||||
}
|
||||
|
||||
Image
|
||||
|
@ -513,22 +526,12 @@ UM.MainWindow
|
|||
|
||||
width: UM.Theme.getSize("sidebar").width;
|
||||
|
||||
addMachineAction: actions.addMachine;
|
||||
configureMachinesAction: actions.configureMachines;
|
||||
addProfileAction: actions.addProfile;
|
||||
updateProfileAction: actions.updateProfile;
|
||||
resetProfileAction: actions.resetProfile;
|
||||
manageProfilesAction: actions.manageProfiles;
|
||||
|
||||
configureSettingsAction: Action
|
||||
{
|
||||
onTriggered:
|
||||
{
|
||||
preferences.visible = true;
|
||||
preferences.setPage(2);
|
||||
preferences.getCurrentItem().scrollToSection(source.key);
|
||||
}
|
||||
}
|
||||
addMachineAction: Actions.addMachine;
|
||||
configureMachinesAction: Actions.configureMachines;
|
||||
addProfileAction: Actions.addProfile;
|
||||
updateProfileAction: Actions.updateProfile;
|
||||
resetProfileAction: Actions.resetProfile;
|
||||
manageProfilesAction: Actions.manageProfiles;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -546,6 +549,12 @@ UM.MainWindow
|
|||
//: View preferences page title
|
||||
insertPage(1, catalog.i18nc("@title:tab","View"), Qt.resolvedUrl("ViewPage.qml"));
|
||||
|
||||
insertPage(3, catalog.i18nc("@title:tab", "Printers"), Qt.resolvedUrl("MachinesPage.qml"));
|
||||
|
||||
insertPage(4, catalog.i18nc("@title:tab", "Materials"), Qt.resolvedUrl("Preferences/MaterialsPage.qml"));
|
||||
|
||||
insertPage(5, catalog.i18nc("@title:tab", "Profiles"), Qt.resolvedUrl("Preferences/ProfilesPage.qml"));
|
||||
|
||||
//Force refresh
|
||||
setPage(0);
|
||||
}
|
||||
|
@ -561,73 +570,16 @@ UM.MainWindow
|
|||
}
|
||||
}
|
||||
|
||||
Actions
|
||||
Connections
|
||||
{
|
||||
id: actions;
|
||||
target: Actions.preferences
|
||||
onTriggered: preferences.visible = true
|
||||
}
|
||||
|
||||
open.onTriggered: openDialog.open();
|
||||
|
||||
quit.onTriggered: base.visible = false;
|
||||
|
||||
undo.onTriggered: UM.OperationStack.undo();
|
||||
undo.enabled: UM.OperationStack.canUndo;
|
||||
redo.onTriggered: UM.OperationStack.redo();
|
||||
redo.enabled: UM.OperationStack.canRedo;
|
||||
|
||||
deleteSelection.onTriggered:
|
||||
{
|
||||
Printer.deleteSelection();
|
||||
}
|
||||
|
||||
deleteObject.onTriggered:
|
||||
{
|
||||
if(objectContextMenu.objectId != 0)
|
||||
{
|
||||
Printer.deleteObject(objectContextMenu.objectId);
|
||||
objectContextMenu.objectId = 0;
|
||||
}
|
||||
}
|
||||
|
||||
multiplyObject.onTriggered:
|
||||
{
|
||||
if(objectContextMenu.objectId != 0)
|
||||
{
|
||||
Printer.multiplyObject(objectContextMenu.objectId, 1);
|
||||
objectContextMenu.objectId = 0;
|
||||
}
|
||||
}
|
||||
|
||||
centerObject.onTriggered:
|
||||
{
|
||||
if(objectContextMenu.objectId != 0)
|
||||
{
|
||||
Printer.centerObject(objectContextMenu.objectId);
|
||||
objectContextMenu.objectId = 0;
|
||||
}
|
||||
}
|
||||
|
||||
groupObjects.onTriggered:
|
||||
{
|
||||
Printer.groupSelected();
|
||||
}
|
||||
|
||||
unGroupObjects.onTriggered:
|
||||
{
|
||||
Printer.ungroupSelected();
|
||||
}
|
||||
|
||||
mergeObjects.onTriggered:
|
||||
{
|
||||
Printer.mergeSelected();
|
||||
}
|
||||
|
||||
deleteAll.onTriggered: Printer.deleteAll();
|
||||
resetAllTranslation.onTriggered: Printer.resetAllTranslation();
|
||||
resetAll.onTriggered: Printer.resetAll();
|
||||
reloadAll.onTriggered: Printer.reloadAll();
|
||||
|
||||
addMachine.onTriggered: addMachineWizard.visible = true;
|
||||
addProfile.onTriggered:
|
||||
Connections
|
||||
{
|
||||
target: Actions.addProfile
|
||||
onTriggered:
|
||||
{
|
||||
UM.MachineManager.createProfile();
|
||||
preferences.setPage(4);
|
||||
|
@ -636,26 +588,37 @@ UM.MainWindow
|
|||
// Show the renameDialog after a very short delay so the preference page has time to initiate
|
||||
showProfileNameDialogTimer.start();
|
||||
}
|
||||
updateProfile.onTriggered: UM.ActiveProfile.updateProfile();
|
||||
resetProfile.onTriggered: UM.ActiveProfile.discardChanges();
|
||||
}
|
||||
|
||||
preferences.onTriggered: preferences.visible = true;
|
||||
configureMachines.onTriggered:
|
||||
Connections
|
||||
{
|
||||
target: Actions.configureMachines
|
||||
onTriggered:
|
||||
{
|
||||
preferences.visible = true;
|
||||
preferences.setPage(3);
|
||||
}
|
||||
manageProfiles.onTriggered:
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: Actions.manageProfiles
|
||||
onTriggered:
|
||||
{
|
||||
preferences.visible = true;
|
||||
preferences.setPage(4);
|
||||
}
|
||||
}
|
||||
|
||||
documentation.onTriggered: CuraActions.openDocumentation();
|
||||
reportBug.onTriggered: CuraActions.openBugReportPage();
|
||||
showEngineLog.onTriggered: engineLog.visible = true;
|
||||
about.onTriggered: aboutDialog.visible = true;
|
||||
toggleFullScreen.onTriggered: base.toggleFullscreen();
|
||||
Connections
|
||||
{
|
||||
target: Actions.configureSettingVisibility
|
||||
onTriggered:
|
||||
{
|
||||
preferences.visible = true;
|
||||
preferences.setPage(2);
|
||||
preferences.getCurrentItem().scrollToSection(source.key);
|
||||
}
|
||||
}
|
||||
|
||||
Timer
|
||||
|
@ -672,31 +635,70 @@ UM.MainWindow
|
|||
id: objectContextMenu;
|
||||
|
||||
property variant objectId: -1;
|
||||
MenuItem { action: actions.centerObject; }
|
||||
MenuItem { action: actions.deleteObject; }
|
||||
MenuItem { action: actions.multiplyObject; }
|
||||
MenuItem { action: Actions.centerObject; }
|
||||
MenuItem { action: Actions.deleteObject; }
|
||||
MenuItem { action: Actions.multiplyObject; }
|
||||
MenuSeparator { }
|
||||
MenuItem { action: actions.deleteAll; }
|
||||
MenuItem { action: actions.reloadAll; }
|
||||
MenuItem { action: actions.resetAllTranslation; }
|
||||
MenuItem { action: actions.resetAll; }
|
||||
MenuItem { action: Actions.deleteAll; }
|
||||
MenuItem { action: Actions.reloadAll; }
|
||||
MenuItem { action: Actions.resetAllTranslation; }
|
||||
MenuItem { action: Actions.resetAll; }
|
||||
MenuSeparator { }
|
||||
MenuItem { action: actions.groupObjects; }
|
||||
MenuItem { action: actions.mergeObjects; }
|
||||
MenuItem { action: actions.unGroupObjects; }
|
||||
MenuItem { action: Actions.groupObjects; }
|
||||
MenuItem { action: Actions.mergeObjects; }
|
||||
MenuItem { action: Actions.unGroupObjects; }
|
||||
|
||||
Connections
|
||||
{
|
||||
target: Actions.deleteObject
|
||||
onTriggered:
|
||||
{
|
||||
if(objectContextMenu.objectId != 0)
|
||||
{
|
||||
Printer.deleteObject(objectContextMenu.objectId);
|
||||
objectContextMenu.objectId = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: Actions.multiplyObject
|
||||
onTriggered:
|
||||
{
|
||||
if(objectContextMenu.objectId != 0)
|
||||
{
|
||||
Printer.multiplyObject(objectContextMenu.objectId, 1);
|
||||
objectContextMenu.objectId = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: Actions.centerObject
|
||||
onTriggered:
|
||||
{
|
||||
if(objectContextMenu.objectId != 0)
|
||||
{
|
||||
Printer.centerObject(objectContextMenu.objectId);
|
||||
objectContextMenu.objectId = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Menu
|
||||
{
|
||||
id: contextMenu;
|
||||
MenuItem { action: actions.deleteAll; }
|
||||
MenuItem { action: actions.reloadAll; }
|
||||
MenuItem { action: actions.resetAllTranslation; }
|
||||
MenuItem { action: actions.resetAll; }
|
||||
MenuItem { action: Actions.deleteAll; }
|
||||
MenuItem { action: Actions.reloadAll; }
|
||||
MenuItem { action: Actions.resetAllTranslation; }
|
||||
MenuItem { action: Actions.resetAll; }
|
||||
MenuSeparator { }
|
||||
MenuItem { action: actions.groupObjects; }
|
||||
MenuItem { action: actions.mergeObjects; }
|
||||
MenuItem { action: actions.unGroupObjects; }
|
||||
MenuItem { action: Actions.groupObjects; }
|
||||
MenuItem { action: Actions.mergeObjects; }
|
||||
MenuItem { action: Actions.unGroupObjects; }
|
||||
}
|
||||
|
||||
Connections
|
||||
|
@ -715,6 +717,18 @@ UM.MainWindow
|
|||
}
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: Actions.quit
|
||||
onTriggered: base.visible = false;
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: Actions.toggleFullScreen
|
||||
onTriggered: base.toggleFullscreen();
|
||||
}
|
||||
|
||||
FileDialog
|
||||
{
|
||||
id: openDialog;
|
||||
|
@ -739,14 +753,32 @@ UM.MainWindow
|
|||
}
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: Actions.open
|
||||
onTriggered: openDialog.open()
|
||||
}
|
||||
|
||||
EngineLog
|
||||
{
|
||||
id: engineLog;
|
||||
}
|
||||
|
||||
AddMachineWizard
|
||||
Connections
|
||||
{
|
||||
id: addMachineWizard
|
||||
target: Actions.showEngineLog
|
||||
onTriggered: engineLog.visible = true;
|
||||
}
|
||||
|
||||
AddMachineDialog
|
||||
{
|
||||
id: addMachineDialog
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: Actions.addMachine
|
||||
onTriggered: addMachineDialog.visible = true;
|
||||
}
|
||||
|
||||
AboutDialog
|
||||
|
@ -754,13 +786,19 @@ UM.MainWindow
|
|||
id: aboutDialog
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: Actions.about
|
||||
onTriggered: aboutDialog.visible = true;
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: Printer
|
||||
onRequestAddPrinter:
|
||||
{
|
||||
addMachineWizard.visible = true
|
||||
addMachineWizard.firstRun = false
|
||||
addMachineDialog.visible = true
|
||||
addMachineDialog.firstRun = false
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -777,10 +815,9 @@ UM.MainWindow
|
|||
base.visible = true;
|
||||
restart();
|
||||
}
|
||||
else if(UM.MachineManager.activeMachineInstance == "")
|
||||
else if(Cura.MachineManager.activeMachineId == null || Cura.MachineManager.activeMachineId == "")
|
||||
{
|
||||
addMachineWizard.firstRun = true;
|
||||
addMachineWizard.open();
|
||||
addMachineDialog.open();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue