mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-17 11:47:50 -06:00
Updated how machine selection works; Id now identifies a type of machine so multiple variations of the same machine are possible without cluttering your selection
This commit is contained in:
parent
5188fcc44d
commit
7c2617133e
12 changed files with 63 additions and 15 deletions
|
@ -42,23 +42,65 @@ UM.Dialog
|
||||||
model: UM.Models.availableMachinesModel
|
model: UM.Models.availableMachinesModel
|
||||||
delegate: RadioButton
|
delegate: RadioButton
|
||||||
{
|
{
|
||||||
|
id:machine_button
|
||||||
exclusiveGroup: printerGroup;
|
exclusiveGroup: printerGroup;
|
||||||
text: model.name;
|
text: model.name;
|
||||||
onClicked: ListView.view.currentIndex = index;
|
onClicked: ListView.view.currentIndex = index;
|
||||||
|
Component.onCompleted:
|
||||||
|
{
|
||||||
|
if(index == 0)
|
||||||
|
{
|
||||||
|
machine_button.checked = true
|
||||||
|
ListView.view.currentIndex = index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Variation:");
|
||||||
|
}
|
||||||
|
|
||||||
|
ScrollView
|
||||||
|
{
|
||||||
|
width: 50
|
||||||
|
height:150
|
||||||
|
|
||||||
|
ListView
|
||||||
|
{
|
||||||
|
Component.onCompleted:console.log(model)
|
||||||
|
id: variations_list
|
||||||
|
model: machineList.model.getItem(machineList.currentIndex).variations
|
||||||
|
delegate: RadioButton
|
||||||
|
{
|
||||||
|
id: variation_radio_button
|
||||||
|
exclusiveGroup: variationGroup;
|
||||||
|
text: model.name;
|
||||||
|
onClicked: ListView.view.currentIndex = index;
|
||||||
|
Component.onCompleted:
|
||||||
|
{
|
||||||
|
if(index == 0)
|
||||||
|
{
|
||||||
|
variation_radio_button.checked = true
|
||||||
|
ListView.view.currentIndex = index;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
}
|
||||||
|
Label
|
||||||
|
{
|
||||||
//: Add Printer wizard field label
|
//: Add Printer wizard field label
|
||||||
text: qsTr("Printer Name:");
|
text: qsTr("Printer Name:");
|
||||||
}
|
}
|
||||||
|
TextField { id: machineName; Layout.fillWidth: true; text: machineList.model.getItem(machineList.currentIndex).variations.getItem(variations_list.currentIndex).name }
|
||||||
TextField { id: machineName; Layout.fillWidth: true; text: machineList.model.getItem(machineList.currentIndex).name }
|
|
||||||
|
|
||||||
Item { Layout.fillWidth: true; Layout.fillHeight: true; }
|
Item { Layout.fillWidth: true; Layout.fillHeight: true; }
|
||||||
|
|
||||||
ExclusiveGroup { id: printerGroup; }
|
ExclusiveGroup { id: printerGroup; }
|
||||||
|
ExclusiveGroup { id: variationGroup; }
|
||||||
}
|
}
|
||||||
|
|
||||||
rightButtons: [
|
rightButtons: [
|
||||||
|
@ -70,7 +112,7 @@ UM.Dialog
|
||||||
{
|
{
|
||||||
if(machineList.currentIndex != -1)
|
if(machineList.currentIndex != -1)
|
||||||
{
|
{
|
||||||
UM.Models.availableMachinesModel.createMachine(machineList.currentIndex, machineName.text)
|
UM.Models.availableMachinesModel.createMachine(machineList.currentIndex, variations_list.currentIndex, machineName.text)
|
||||||
base.visible = false
|
base.visible = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"visible": false,
|
"visible": false,
|
||||||
|
"manufacturer": "other",
|
||||||
"machine_settings": {
|
"machine_settings": {
|
||||||
"machine_start_gcode": {
|
"machine_start_gcode": {
|
||||||
"default": "G28 ; Home\nG1 Z15.0 F6000 ;move the platform down 15mm\n;Prime the extruder\nG92 E0\nG1 F200 E3\nG92 E0"
|
"default": "G28 ; Home\nG1 Z15.0 F6000 ;move the platform down 15mm\n;Prime the extruder\nG92 E0\nG1 F200 E3\nG92 E0"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"id": "GRRneo",
|
"id": "German RepRap Neo",
|
||||||
"name": "German RepRap Neo",
|
"name": "German RepRap Neo",
|
||||||
"icon": "icon_ultimaker.png",
|
"icon": "icon_ultimaker.png",
|
||||||
"platform": "grr_neo_platform.stl",
|
"platform": "grr_neo_platform.stl",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"id": "hephestos",
|
"id": "BQ Prusa i3 Hephestos",
|
||||||
"name": "BQ Prusa i3 Hephestos",
|
"name": "BQ Prusa i3 Hephestos",
|
||||||
"platform": "hephestos_platform.stl",
|
"platform": "hephestos_platform.stl",
|
||||||
"inherits": "fdmprinter.json",
|
"inherits": "fdmprinter.json",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"id": "hephestos_XL",
|
"id": "BQ Prusa i3 Hephestos XL",
|
||||||
"name": "BQ Prusa i3 Hephestos XL",
|
"name": "BQ Prusa i3 Hephestos XL",
|
||||||
"platform": "hephestos_platform.stl",
|
"platform": "hephestos_platform.stl",
|
||||||
"inherits": "fdmprinter.json",
|
"inherits": "fdmprinter.json",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "prusa_i3",
|
"id": "Prusa i3",
|
||||||
|
"manufacturer": "ultimaker",
|
||||||
"icon": "icon_ultimaker2.png",
|
"icon": "icon_ultimaker2.png",
|
||||||
"name": "Prusa i3",
|
"name": "Prusa i3",
|
||||||
"platform": "prusai3_platform.stl",
|
"platform": "prusai3_platform.stl",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "ultimaker2",
|
"id": "Ultimaker 2",
|
||||||
|
"manufacturer": "ultimaker",
|
||||||
"name": "Ultimaker 2",
|
"name": "Ultimaker 2",
|
||||||
"icon": "icon_ultimaker2.png",
|
"icon": "icon_ultimaker2.png",
|
||||||
"platform": "ultimaker2_platform.obj",
|
"platform": "ultimaker2_platform.obj",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "ultimaker2extended",
|
"id": "Ultimaker 2 Extended",
|
||||||
|
"manufacturer": "ultimaker",
|
||||||
"name": "Ultimaker 2 Extended",
|
"name": "Ultimaker 2 Extended",
|
||||||
"icon": "icon_ultimaker2.png",
|
"icon": "icon_ultimaker2.png",
|
||||||
"platform": "ultimaker2_platform.obj",
|
"platform": "ultimaker2_platform.obj",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "ultimaker2go",
|
"id": "Ultimaker 2 Go",
|
||||||
|
"manufacturer": "ultimaker",
|
||||||
"name": "Ultimaker 2 Go",
|
"name": "Ultimaker 2 Go",
|
||||||
"icon": "icon_ultimaker2.png",
|
"icon": "icon_ultimaker2.png",
|
||||||
"platform": "ultimaker2go_platform.obj",
|
"platform": "ultimaker2go_platform.obj",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "ultimaker_original",
|
"id": "Ultimaker Original",
|
||||||
|
"manufacturer": "ultimaker",
|
||||||
"name": "Ultimaker Original",
|
"name": "Ultimaker Original",
|
||||||
"icon": "icon_ultimaker.png",
|
"icon": "icon_ultimaker.png",
|
||||||
"platform": "ultimaker_platform.stl",
|
"platform": "ultimaker_platform.stl",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"id": "ultimaker_original_plus",
|
"id": "Ultimaker Original",
|
||||||
"name": "Ultimaker Original+",
|
"name": "Ultimaker Original+",
|
||||||
"icon": "icon_ultimaker.png",
|
"icon": "icon_ultimaker.png",
|
||||||
"platform": "ultimaker2_platform.obj",
|
"platform": "ultimaker2_platform.obj",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"id": "witbox",
|
"id": "BQ Witbox",
|
||||||
"name": "BQ Witbox",
|
"name": "BQ Witbox",
|
||||||
"platform": "witbox_platform.stl",
|
"platform": "witbox_platform.stl",
|
||||||
"inherits": "fdmprinter.json",
|
"inherits": "fdmprinter.json",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue