mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 05:53:59 -06:00
Merge branch 'master' into feature_setting_visibility_profiles
This commit is contained in:
commit
3f11b8a756
699 changed files with 62717 additions and 19296 deletions
|
@ -7,7 +7,7 @@ import QtQuick.Dialogs 1.2
|
|||
import QtQuick.Window 2.1
|
||||
|
||||
import UM 1.2 as UM
|
||||
import Cura 1.0 as Cura
|
||||
import Cura 1.2 as Cura
|
||||
|
||||
Menu
|
||||
{
|
||||
|
@ -31,7 +31,7 @@ Menu
|
|||
visible: base.shouldShowExtruders
|
||||
enabled: UM.Selection.hasSelection
|
||||
checkable: true
|
||||
checked: ExtruderManager.selectedObjectExtruders.indexOf(model.id) != -1
|
||||
checked: Cura.ExtruderManager.selectedObjectExtruders.indexOf(model.id) != -1
|
||||
onTriggered: CuraActions.setExtruderForSelection(model.id)
|
||||
shortcut: "Ctrl+" + (model.index + 1)
|
||||
}
|
||||
|
@ -39,6 +39,35 @@ Menu
|
|||
onObjectRemoved: base.removeItem(object)
|
||||
}
|
||||
|
||||
MenuSeparator {
|
||||
visible: UM.Preferences.getValue("cura/use_multi_build_plate")
|
||||
}
|
||||
|
||||
Instantiator
|
||||
{
|
||||
model: Cura.BuildPlateModel
|
||||
MenuItem {
|
||||
text: Cura.BuildPlateModel.getItem(index).name;
|
||||
onTriggered: CuraActions.setBuildPlateForSelection(Cura.BuildPlateModel.getItem(index).buildPlateNumber);
|
||||
checkable: true
|
||||
checked: Cura.BuildPlateModel.selectionBuildPlates.indexOf(Cura.BuildPlateModel.getItem(index).buildPlateNumber) != -1;
|
||||
visible: UM.Preferences.getValue("cura/use_multi_build_plate")
|
||||
}
|
||||
onObjectAdded: base.insertItem(index, object);
|
||||
onObjectRemoved: base.removeItem(object);
|
||||
}
|
||||
|
||||
MenuItem {
|
||||
text: "New build plate";
|
||||
onTriggered: {
|
||||
CuraActions.setBuildPlateForSelection(Cura.BuildPlateModel.maxBuildPlate + 1);
|
||||
checked = false;
|
||||
}
|
||||
checkable: true
|
||||
checked: false
|
||||
visible: UM.Preferences.getValue("cura/use_multi_build_plate")
|
||||
}
|
||||
|
||||
// Global actions
|
||||
MenuSeparator {}
|
||||
MenuItem { action: Cura.Actions.selectAll; }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2016 Ultimaker B.V.
|
||||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
|
@ -16,20 +16,27 @@ Menu
|
|||
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
|
||||
property bool isClusterPrinter:
|
||||
{
|
||||
var clusterSize = Cura.MachineManager.printerOutputDevices[0].clusterSize
|
||||
// This is a non cluster printer or the cluster it is just one printer
|
||||
if (clusterSize == undefined || clusterSize == 1)
|
||||
return false
|
||||
return true
|
||||
if(Cura.MachineManager.printerOutputDevices.length == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var clusterSize = Cura.MachineManager.printerOutputDevices[0].clusterSize;
|
||||
// This is not a cluster printer or the cluster it is just one printer
|
||||
if(clusterSize == undefined || clusterSize == 1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
UM.SettingPropertyProvider
|
||||
{
|
||||
id: materialDiameterProvider
|
||||
|
||||
containerStackId: Cura.MachineManager.activeMachineId
|
||||
containerStackId: Cura.ExtruderManager.activeExtruderStackId
|
||||
key: "material_diameter"
|
||||
watchedProperties: [ "value" ]
|
||||
storeIndex: 5
|
||||
}
|
||||
|
||||
MenuItem
|
||||
|
@ -72,16 +79,16 @@ Menu
|
|||
{
|
||||
text: model.name
|
||||
checkable: true
|
||||
checked: model.id == Cura.MachineManager.allActiveMaterialIds[ExtruderManager.extruderIds[extruderIndex]]
|
||||
checked: model.id == Cura.MachineManager.allActiveMaterialIds[Cura.ExtruderManager.extruderIds[extruderIndex]]
|
||||
exclusiveGroup: group
|
||||
onTriggered:
|
||||
{
|
||||
// This workaround is done because of the application menus for materials and variants for multiextrusion printers.
|
||||
// The extruder menu would always act on the correspoding extruder only, instead of acting on the extruder selected in the UI.
|
||||
var activeExtruderIndex = ExtruderManager.activeExtruderIndex;
|
||||
ExtruderManager.setActiveExtruderIndex(extruderIndex);
|
||||
var activeExtruderIndex = Cura.ExtruderManager.activeExtruderIndex;
|
||||
Cura.ExtruderManager.setActiveExtruderIndex(extruderIndex);
|
||||
Cura.MachineManager.setActiveMaterial(model.id);
|
||||
ExtruderManager.setActiveExtruderIndex(activeExtruderIndex);
|
||||
Cura.ExtruderManager.setActiveExtruderIndex(activeExtruderIndex);
|
||||
}
|
||||
}
|
||||
onObjectAdded: menu.insertItem(index, object)
|
||||
|
@ -115,16 +122,16 @@ Menu
|
|||
{
|
||||
text: model.name
|
||||
checkable: true
|
||||
checked: model.id == Cura.MachineManager.allActiveMaterialIds[ExtruderManager.extruderIds[extruderIndex]]
|
||||
checked: model.id == Cura.MachineManager.allActiveMaterialIds[Cura.ExtruderManager.extruderIds[extruderIndex]]
|
||||
exclusiveGroup: group
|
||||
onTriggered:
|
||||
{
|
||||
// This workaround is done because of the application menus for materials and variants for multiextrusion printers.
|
||||
// The extruder menu would always act on the correspoding extruder only, instead of acting on the extruder selected in the UI.
|
||||
var activeExtruderIndex = ExtruderManager.activeExtruderIndex;
|
||||
ExtruderManager.setActiveExtruderIndex(extruderIndex);
|
||||
var activeExtruderIndex = Cura.ExtruderManager.activeExtruderIndex;
|
||||
Cura.ExtruderManager.setActiveExtruderIndex(extruderIndex);
|
||||
Cura.MachineManager.setActiveMaterial(model.id);
|
||||
ExtruderManager.setActiveExtruderIndex(activeExtruderIndex);
|
||||
Cura.ExtruderManager.setActiveExtruderIndex(activeExtruderIndex);
|
||||
}
|
||||
}
|
||||
onObjectAdded: brandMaterialsMenu.insertItem(index, object)
|
||||
|
@ -151,7 +158,7 @@ Menu
|
|||
}
|
||||
|
||||
//: Model used to populate the brandModel
|
||||
UM.InstanceContainersModel
|
||||
Cura.MaterialsModel
|
||||
{
|
||||
id: materialsModel
|
||||
filter: materialFilter()
|
||||
|
@ -201,8 +208,8 @@ Menu
|
|||
// Add to top section
|
||||
var materialId = items[i].id;
|
||||
genericMaterialsModel.append({
|
||||
id:materialId,
|
||||
name:items[i].name
|
||||
id: materialId,
|
||||
name: items[i].name
|
||||
});
|
||||
}
|
||||
else
|
||||
|
|
|
@ -16,11 +16,17 @@ Menu
|
|||
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
|
||||
property bool isClusterPrinter:
|
||||
{
|
||||
var clusterSize = Cura.MachineManager.printerOutputDevices[0].clusterSize
|
||||
// This is a non cluster printer or the cluster it is just one printer
|
||||
if (clusterSize == undefined || clusterSize == 1)
|
||||
return false
|
||||
return true
|
||||
if(Cura.MachineManager.printerOutputDevices.length == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var clusterSize = Cura.MachineManager.printerOutputDevices[0].clusterSize;
|
||||
// This is not a cluster printer or the cluster it is just one printer
|
||||
if(clusterSize == undefined || clusterSize == 1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
MenuItem
|
||||
|
@ -38,15 +44,15 @@ Menu
|
|||
visible: printerConnected && Cura.MachineManager.printerOutputDevices[0].hotendIds.length > extruderIndex && !isClusterPrinter
|
||||
onTriggered:
|
||||
{
|
||||
var activeExtruderIndex = ExtruderManager.activeExtruderIndex;
|
||||
ExtruderManager.setActiveExtruderIndex(extruderIndex);
|
||||
var activeExtruderIndex = Cura.ExtruderManager.activeExtruderIndex;
|
||||
Cura.ExtruderManager.setActiveExtruderIndex(extruderIndex);
|
||||
var hotendId = Cura.MachineManager.printerOutputDevices[0].hotendIds[extruderIndex];
|
||||
var itemIndex = nozzleInstantiator.model.find("name", hotendId);
|
||||
if(itemIndex > -1)
|
||||
{
|
||||
Cura.MachineManager.setActiveVariant(nozzleInstantiator.model.getItem(itemIndex).id);
|
||||
}
|
||||
ExtruderManager.setActiveExtruderIndex(activeExtruderIndex);
|
||||
Cura.ExtruderManager.setActiveExtruderIndex(activeExtruderIndex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,14 +75,14 @@ Menu
|
|||
MenuItem {
|
||||
text: model.name
|
||||
checkable: true
|
||||
checked: model.id == Cura.MachineManager.allActiveVariantIds[ExtruderManager.extruderIds[extruderIndex]]
|
||||
checked: model.id == Cura.MachineManager.allActiveVariantIds[Cura.ExtruderManager.extruderIds[extruderIndex]]
|
||||
exclusiveGroup: group
|
||||
onTriggered:
|
||||
{
|
||||
var activeExtruderIndex = ExtruderManager.activeExtruderIndex;
|
||||
ExtruderManager.setActiveExtruderIndex(extruderIndex);
|
||||
var activeExtruderIndex = Cura.ExtruderManager.activeExtruderIndex;
|
||||
Cura.ExtruderManager.setActiveExtruderIndex(extruderIndex);
|
||||
Cura.MachineManager.setActiveVariant(model.id);
|
||||
ExtruderManager.setActiveExtruderIndex(activeExtruderIndex);
|
||||
Cura.ExtruderManager.setActiveExtruderIndex(activeExtruderIndex);
|
||||
}
|
||||
}
|
||||
onObjectAdded: menu.insertItem(index, object)
|
||||
|
|
|
@ -17,9 +17,9 @@ Menu
|
|||
|
||||
MenuItem
|
||||
{
|
||||
text: model.name + " - " + model.layer_height
|
||||
text: (model.layer_height != "") ? model.name + " - " + model.layer_height : model.name
|
||||
checkable: true
|
||||
checked: Cura.MachineManager.activeQualityChangesId == "" && Cura.MachineManager.activeQualityType == model.metadata.quality_type
|
||||
checked: Cura.MachineManager.activeQualityId == model.id
|
||||
exclusiveGroup: group
|
||||
onTriggered: Cura.MachineManager.setActiveQuality(model.id)
|
||||
visible: model.available
|
||||
|
@ -41,7 +41,7 @@ Menu
|
|||
|
||||
MenuItem
|
||||
{
|
||||
text: model.name + " - " + model.layer_height
|
||||
text: model.name
|
||||
checkable: true
|
||||
checked: Cura.MachineManager.activeQualityChangesId == model.id
|
||||
exclusiveGroup: group
|
||||
|
|
|
@ -5,29 +5,69 @@ import QtQuick 2.2
|
|||
import QtQuick.Controls 1.1
|
||||
|
||||
import UM 1.2 as UM
|
||||
import Cura 1.0 as Cura
|
||||
import Cura 1.2 as Cura
|
||||
|
||||
Menu
|
||||
{
|
||||
title: catalog.i18nc("@title:menu menubar:toplevel", "&View");
|
||||
id: menu
|
||||
id: base
|
||||
enabled: !PrintInformation.preSliced
|
||||
|
||||
// main views
|
||||
Instantiator
|
||||
{
|
||||
model: UM.ViewModel { }
|
||||
model: UM.ViewModel{}
|
||||
MenuItem
|
||||
{
|
||||
text: model.name;
|
||||
checkable: true;
|
||||
checked: model.active;
|
||||
exclusiveGroup: group;
|
||||
onTriggered: UM.Controller.setActiveView(model.id);
|
||||
text: model.name
|
||||
checkable: true
|
||||
checked: model.active
|
||||
exclusiveGroup: group
|
||||
onTriggered: UM.Controller.setActiveView(model.id)
|
||||
}
|
||||
onObjectAdded: menu.insertItem(index, object)
|
||||
onObjectRemoved: menu.removeItem(object)
|
||||
onObjectAdded: base.insertItem(index, object)
|
||||
onObjectRemoved: base.removeItem(object)
|
||||
}
|
||||
ExclusiveGroup { id: group; }
|
||||
ExclusiveGroup { id: group }
|
||||
|
||||
MenuSeparator {}
|
||||
MenuItem { action: Cura.Actions.homeCamera; }
|
||||
|
||||
Menu
|
||||
{
|
||||
title: catalog.i18nc("@action:inmenu menubar:view","&Camera position");
|
||||
MenuItem { action: Cura.Actions.view3DCamera; }
|
||||
MenuItem { action: Cura.Actions.viewFrontCamera; }
|
||||
MenuItem { action: Cura.Actions.viewTopCamera; }
|
||||
MenuItem { action: Cura.Actions.viewLeftSideCamera; }
|
||||
MenuItem { action: Cura.Actions.viewRightSideCamera; }
|
||||
}
|
||||
|
||||
MenuSeparator {
|
||||
visible: UM.Preferences.getValue("cura/use_multi_build_plate")
|
||||
}
|
||||
|
||||
Menu
|
||||
{
|
||||
id: buildPlateMenu;
|
||||
title: catalog.i18nc("@action:inmenu menubar:view","&Build plate");
|
||||
Instantiator
|
||||
{
|
||||
model: Cura.BuildPlateModel
|
||||
MenuItem {
|
||||
text: Cura.BuildPlateModel.getItem(index).name;
|
||||
onTriggered: Cura.SceneController.setActiveBuildPlate(Cura.BuildPlateModel.getItem(index).buildPlateNumber);
|
||||
checkable: true;
|
||||
checked: Cura.BuildPlateModel.getItem(index).buildPlateNumber == Cura.BuildPlateModel.activeBuildPlate;
|
||||
exclusiveGroup: buildPlateGroup;
|
||||
visible: UM.Preferences.getValue("cura/use_multi_build_plate")
|
||||
}
|
||||
onObjectAdded: buildPlateMenu.insertItem(index, object);
|
||||
onObjectRemoved: buildPlateMenu.removeItem(object)
|
||||
}
|
||||
ExclusiveGroup { id: buildPlateGroup; }
|
||||
}
|
||||
|
||||
MenuSeparator {}
|
||||
|
||||
MenuItem { action: Cura.Actions.expandSidebar; }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue