This commit is contained in:
Tamara Hogenhout 2015-07-30 19:36:05 +02:00
parent 8596c08a80
commit b4a8973975
2 changed files with 2 additions and 127 deletions

View file

@ -8,130 +8,9 @@ import QtQuick.Window 2.1
import UM 1.0 as UM
<<<<<<< Updated upstream
UM.Dialog
{
=======
UM.Wizard{
>>>>>>> Stashed changes
id: base
property bool printer: true
file: "ultimaker2.json"
firstRun: printer ? false : true
//: Add Printer dialog title
title: qsTr("Add Printer");
<<<<<<< Updated upstream
ColumnLayout
{
anchors.fill: parent;
Label
{
//: Add Printer wizard page title
text: qsTr("Add Printer");
font.pointSize: 18;
}
Label
{
//: Add Printer wizard page description
text: qsTr("Please select the type of printer:");
}
ScrollView
{
Layout.fillWidth: true;
ListView
{
id: machineList;
model: UM.Models.availableMachinesModel
delegate: RadioButton
{
id:machine_button
exclusiveGroup: printerGroup;
text: model.name;
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
{
//: Add Printer wizard field label
text: qsTr("Printer Name:");
}
TextField { id: machineName; Layout.fillWidth: true; text: machineList.model.getItem(machineList.currentIndex).variations.getItem(variations_list.currentIndex).name }
Item { Layout.fillWidth: true; Layout.fillHeight: true; }
ExclusiveGroup { id: printerGroup; }
ExclusiveGroup { id: variationGroup; }
}
rightButtons: [
Button
{
//: Add Printer wizarad button
text: qsTr("Next");
onClicked:
{
if(machineList.currentIndex != -1)
{
UM.Models.availableMachinesModel.createMachine(machineList.currentIndex, variations_list.currentIndex, machineName.text)
base.visible = false
}
}
},
Button
{
//: Add Printer wizarad button
text: qsTr("Cancel");
onClicked: base.visible = false;
}
]
=======
>>>>>>> Stashed changes
}

View file

@ -1,13 +1,9 @@
{
"visible": false,
<<<<<<< Updated upstream
"manufacturer": "other",
=======
"add_pages": [
{"page": "AddMachine", "title": "Add new printer"}
],
>>>>>>> Stashed changes
"add_pages": [{"page": "AddMachine", "title": "Add new printer"}],
"machine_settings": {
"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"