mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 15:13:56 -06:00
Updated code styling addmachine wizard
This commit is contained in:
parent
5897237710
commit
3175788dd3
1 changed files with 26 additions and 11 deletions
|
@ -8,33 +8,44 @@ import QtQuick.Window 2.1
|
||||||
|
|
||||||
import UM 1.0 as UM
|
import UM 1.0 as UM
|
||||||
|
|
||||||
UM.Dialog {
|
UM.Dialog
|
||||||
|
{
|
||||||
id: base
|
id: base
|
||||||
|
|
||||||
//: Add Printer dialog title
|
//: Add Printer dialog title
|
||||||
title: qsTr("Add Printer");
|
title: qsTr("Add Printer");
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout
|
||||||
|
{
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
|
|
||||||
Label {
|
Label
|
||||||
|
{
|
||||||
//: Add Printer wizard page title
|
//: Add Printer wizard page title
|
||||||
text: qsTr("Add Printer");
|
text: qsTr("Add Printer");
|
||||||
font.pointSize: 18;
|
font.pointSize: 18;
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label
|
||||||
|
{
|
||||||
//: Add Printer wizard page description
|
//: Add Printer wizard page description
|
||||||
text: qsTr("Please select the type of printer:");
|
text: qsTr("Please select the type of printer:");
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollView {
|
ScrollView
|
||||||
|
{
|
||||||
Layout.fillWidth: true;
|
Layout.fillWidth: true;
|
||||||
|
|
||||||
ListView {
|
ListView
|
||||||
|
{
|
||||||
id: machineList;
|
id: machineList;
|
||||||
model: UM.Models.availableMachinesModel
|
model: UM.Models.availableMachinesModel
|
||||||
delegate: RadioButton { exclusiveGroup: printerGroup; text: model.name; onClicked: ListView.view.currentIndex = index; }
|
delegate: RadioButton
|
||||||
|
{
|
||||||
|
exclusiveGroup: printerGroup;
|
||||||
|
text: model.name;
|
||||||
|
onClicked: ListView.view.currentIndex = index;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,17 +62,21 @@ UM.Dialog {
|
||||||
}
|
}
|
||||||
|
|
||||||
rightButtons: [
|
rightButtons: [
|
||||||
Button {
|
Button
|
||||||
|
{
|
||||||
//: Add Printer wizarad button
|
//: Add Printer wizarad button
|
||||||
text: qsTr("Next");
|
text: qsTr("Next");
|
||||||
onClicked: {
|
onClicked:
|
||||||
if(machineList.currentIndex != -1) {
|
{
|
||||||
|
if(machineList.currentIndex != -1)
|
||||||
|
{
|
||||||
UM.Models.availableMachinesModel.createMachine(machineList.currentIndex, machineName.text)
|
UM.Models.availableMachinesModel.createMachine(machineList.currentIndex, machineName.text)
|
||||||
base.visible = false
|
base.visible = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Button {
|
Button
|
||||||
|
{
|
||||||
//: Add Printer wizarad button
|
//: Add Printer wizarad button
|
||||||
text: qsTr("Cancel");
|
text: qsTr("Cancel");
|
||||||
onClicked: base.visible = false;
|
onClicked: base.visible = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue