Merge branch 'feature_add_printer_layout' of https://github.com/fieldOfView/Cura

This commit is contained in:
Jaime van Kessel 2018-10-31 14:23:42 +01:00
commit 6256e3f24b
37 changed files with 112 additions and 60 deletions

View File

@ -7,7 +7,6 @@
"author": "3Dator GmbH", "author": "3Dator GmbH",
"manufacturer": "3Dator GmbH", "manufacturer": "3Dator GmbH",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "icon_ultimaker2",
"supports_usb_connection": true, "supports_usb_connection": true,
"platform": "3dator_platform.stl", "platform": "3dator_platform.stl",
"machine_extruder_trains": "machine_extruder_trains":

View File

@ -8,7 +8,6 @@
"author": "TheTobby", "author": "TheTobby",
"manufacturer": "Anycubic", "manufacturer": "Anycubic",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "icon_ultimaker2",
"platform": "anycubic_i3_mega_platform.stl", "platform": "anycubic_i3_mega_platform.stl",
"has_materials": false, "has_materials": false,
"has_machine_quality": true, "has_machine_quality": true,

View File

@ -8,7 +8,6 @@
"manufacturer": "Deltacomb 3D", "manufacturer": "Deltacomb 3D",
"category": "Other", "category": "Other",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "icon_ultimaker2",
"platform": "deltacomb.stl", "platform": "deltacomb.stl",
"has_machine_quality": true, "has_machine_quality": true,
"machine_extruder_trains": "machine_extruder_trains":

View File

@ -9,7 +9,6 @@
"category": "Other", "category": "Other",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"platform": "fabtotum_platform.stl", "platform": "fabtotum_platform.stl",
"icon": "fabtotum_platform.png",
"has_machine_quality": true, "has_machine_quality": true,
"has_variants": true, "has_variants": true,
"variants_name": "Head", "variants_name": "Head",

View File

@ -7,7 +7,6 @@
"author": "Simon Cor", "author": "Simon Cor",
"manufacturer": "German RepRap", "manufacturer": "German RepRap",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "icon_ultimaker.png",
"platform": "grr_neo_platform.stl", "platform": "grr_neo_platform.stl",
"machine_extruder_trains": "machine_extruder_trains":
{ {

View File

@ -7,7 +7,6 @@
"author": "Claudio Sampaio (Patola)", "author": "Claudio Sampaio (Patola)",
"manufacturer": "Other", "manufacturer": "Other",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "icon_ultimaker2",
"platform": "kossel_platform.stl", "platform": "kossel_platform.stl",
"platform_offset": [0, -0.25, 0], "platform_offset": [0, -0.25, 0],
"machine_extruder_trains": "machine_extruder_trains":

View File

@ -7,7 +7,6 @@
"author": "Chris Petersen", "author": "Chris Petersen",
"manufacturer": "OpenBeam", "manufacturer": "OpenBeam",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "icon_ultimaker2",
"platform": "kossel_pro_build_platform.stl", "platform": "kossel_pro_build_platform.stl",
"platform_offset": [0, -0.25, 0], "platform_offset": [0, -0.25, 0],
"machine_extruder_trains": "machine_extruder_trains":

View File

@ -7,7 +7,6 @@
"author": "makeR", "author": "makeR",
"manufacturer": "makeR", "manufacturer": "makeR",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "icon_ultimaker2",
"platform": "makeR_pegasus_platform.stl", "platform": "makeR_pegasus_platform.stl",
"platform_offset": [-200, -10, 200], "platform_offset": [-200, -10, 200],
"machine_extruder_trains": "machine_extruder_trains":

View File

@ -7,7 +7,6 @@
"author": "makeR", "author": "makeR",
"manufacturer": "makeR", "manufacturer": "makeR",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "icon_ultimaker2",
"platform": "makeR_prusa_tairona_i3_platform.stl", "platform": "makeR_prusa_tairona_i3_platform.stl",
"platform_offset": [-2, 0, 0], "platform_offset": [-2, 0, 0],
"machine_extruder_trains": "machine_extruder_trains":

View File

@ -7,7 +7,6 @@
"author": "tvlgiao", "author": "tvlgiao",
"manufacturer": "3DMaker", "manufacturer": "3DMaker",
"file_formats": "text/x-gcode;application/x-stl-ascii;application/x-stl-binary;application/x-wavefront-obj", "file_formats": "text/x-gcode;application/x-stl-ascii;application/x-stl-binary;application/x-wavefront-obj",
"icon": "icon_ultimaker2.png",
"platform": "makerstarter_platform.stl", "platform": "makerstarter_platform.stl",
"preferred_quality_type": "draft", "preferred_quality_type": "draft",
"machine_extruder_trains": "machine_extruder_trains":

View File

@ -7,7 +7,6 @@
"author": "Quillford", "author": "Quillford",
"manufacturer": "Prusajr", "manufacturer": "Prusajr",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "icon_ultimaker2",
"platform": "prusai3_platform.stl", "platform": "prusai3_platform.stl",
"machine_extruder_trains": "machine_extruder_trains":
{ {

View File

@ -7,7 +7,6 @@
"author": "Apsu, Nounours2099", "author": "Apsu, Nounours2099",
"manufacturer": "Prusa Research", "manufacturer": "Prusa Research",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "icon_ultimaker2",
"platform": "prusai3_platform.stl", "platform": "prusai3_platform.stl",
"has_materials": true, "has_materials": true,
"machine_extruder_trains": "machine_extruder_trains":

View File

@ -7,7 +7,6 @@
"author": "guigashm", "author": "guigashm",
"manufacturer": "Prusajr", "manufacturer": "Prusajr",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "icon_ultimaker2.png",
"platform": "prusai3_xl_platform.stl", "platform": "prusai3_xl_platform.stl",
"machine_extruder_trains": "machine_extruder_trains":
{ {

View File

@ -7,7 +7,6 @@
"author": "PouncingIguana, JJ", "author": "PouncingIguana, JJ",
"manufacturer": "SeeMeCNC", "manufacturer": "SeeMeCNC",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "icon_ultimaker2",
"platform": "artemis_platform.stl", "platform": "artemis_platform.stl",
"has_materials": true, "has_materials": true,
"machine_extruder_trains": "machine_extruder_trains":

View File

@ -7,7 +7,6 @@
"author": "PouncingIguana, JJ", "author": "PouncingIguana, JJ",
"manufacturer": "SeeMeCNC", "manufacturer": "SeeMeCNC",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "icon_ultimaker2",
"platform": "rostock_platform.stl", "platform": "rostock_platform.stl",
"has_materials": true, "has_materials": true,
"machine_extruder_trains": "machine_extruder_trains":

View File

@ -7,7 +7,6 @@
"author": "TheTobby", "author": "TheTobby",
"manufacturer": "Tevo", "manufacturer": "Tevo",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "icon_ultimaker2",
"has_materials": false, "has_materials": false,
"has_machine_quality": true, "has_machine_quality": true,
"platform": "tevo_blackwidow.stl", "platform": "tevo_blackwidow.stl",

View File

@ -8,7 +8,6 @@
"author": "TheAssassin", "author": "TheAssassin",
"manufacturer": "Tevo", "manufacturer": "Tevo",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "icon_ultimaker2",
"platform": "prusai3_platform.stl", "platform": "prusai3_platform.stl",
"machine_extruder_trains": "machine_extruder_trains":
{ {

View File

@ -7,7 +7,6 @@
"author": "nean", "author": "nean",
"manufacturer": "Tevo", "manufacturer": "Tevo",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "icon_ultimaker2.png",
"has_materials": true, "has_materials": true,
"machine_extruder_trains": { "machine_extruder_trains": {
"0": "tevo_tornado_extruder_0" "0": "tevo_tornado_extruder_0"

View File

@ -9,7 +9,6 @@
"manufacturer": "uBuild-3D", "manufacturer": "uBuild-3D",
"category": "Other", "category": "Other",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "icon_uBuild-3D",
"platform": "mr_bot_280_platform.stl", "platform": "mr_bot_280_platform.stl",
"has_materials": true, "has_materials": true,
"preferred_quality_type": "draft", "preferred_quality_type": "draft",

View File

@ -8,7 +8,6 @@
"manufacturer": "Ultimaker B.V.", "manufacturer": "Ultimaker B.V.",
"weight": 3, "weight": 3,
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "icon_ultimaker2.png",
"platform": "ultimaker2_platform.obj", "platform": "ultimaker2_platform.obj",
"platform_texture": "Ultimaker2backplate.png", "platform_texture": "Ultimaker2backplate.png",
"platform_offset": [9, 0, 0], "platform_offset": [9, 0, 0],

View File

@ -8,7 +8,6 @@
"quality_definition": "ultimaker2", "quality_definition": "ultimaker2",
"weight": 3, "weight": 3,
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "icon_ultimaker2.png",
"platform": "ultimaker2_platform.obj", "platform": "ultimaker2_platform.obj",
"platform_texture": "Ultimaker2Extendedbackplate.png", "platform_texture": "Ultimaker2Extendedbackplate.png",
"machine_extruder_trains": "machine_extruder_trains":

View File

@ -8,7 +8,6 @@
"quality_definition": "ultimaker2", "quality_definition": "ultimaker2",
"weight": 3, "weight": 3,
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "icon_ultimaker2.png",
"platform": "ultimaker2go_platform.obj", "platform": "ultimaker2go_platform.obj",
"platform_texture": "Ultimaker2Gobackplate.png", "platform_texture": "Ultimaker2Gobackplate.png",
"platform_offset": [0, 0, 0], "platform_offset": [0, 0, 0],

View File

@ -8,7 +8,6 @@
"manufacturer": "Ultimaker B.V.", "manufacturer": "Ultimaker B.V.",
"weight": 4, "weight": 4,
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "icon_ultimaker.png",
"platform": "ultimaker_platform.stl", "platform": "ultimaker_platform.stl",
"has_materials": true, "has_materials": true,
"has_machine_quality": true, "has_machine_quality": true,

View File

@ -8,7 +8,6 @@
"manufacturer": "Ultimaker B.V.", "manufacturer": "Ultimaker B.V.",
"weight": 4, "weight": 4,
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "icon_ultimaker.png",
"platform": "ultimaker_platform.stl", "platform": "ultimaker_platform.stl",
"has_materials": true, "has_materials": true,
"has_machine_quality": true, "has_machine_quality": true,

View File

@ -7,7 +7,6 @@
"manufacturer": "Ultimaker B.V.", "manufacturer": "Ultimaker B.V.",
"weight": 4, "weight": 4,
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "icon_ultimaker.png",
"platform": "ultimaker2_platform.obj", "platform": "ultimaker2_platform.obj",
"platform_texture": "UltimakerPlusbackplate.png", "platform_texture": "UltimakerPlusbackplate.png",
"quality_definition": "ultimaker_original", "quality_definition": "ultimaker_original",

View File

@ -6,7 +6,6 @@
"author": "Unimatech", "author": "Unimatech",
"manufacturer": "Unimatech", "manufacturer": "Unimatech",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "icon_ultimaker2.png",
"machine_extruder_trains": "machine_extruder_trains":
{ {
"0": "uniqbot_one_extruder_0" "0": "uniqbot_one_extruder_0"

View File

@ -6,7 +6,6 @@
"visible": true, "visible": true,
"manufacturer": "Velleman", "manufacturer": "Velleman",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "icon_ultimaker2",
"platform": "Vertex_build_panel.stl", "platform": "Vertex_build_panel.stl",
"platform_offset": [0, -3, 0], "platform_offset": [0, -3, 0],
"supports_usb_connection": true, "supports_usb_connection": true,

View File

@ -6,7 +6,6 @@
"visible": true, "visible": true,
"manufacturer": "Velleman", "manufacturer": "Velleman",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "icon_ultimaker2",
"platform": "Vertex_build_panel.stl", "platform": "Vertex_build_panel.stl",
"platform_offset": [0, -3, 0], "platform_offset": [0, -3, 0],
"machine_extruder_trains": { "machine_extruder_trains": {

View File

@ -7,7 +7,6 @@
"author": "Ricardo Snoek", "author": "Ricardo Snoek",
"manufacturer": "Wanhao", "manufacturer": "Wanhao",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "wanhao-icon.png",
"has_materials": true, "has_materials": true,
"platform": "wanhao_225_145_platform.obj", "platform": "wanhao_225_145_platform.obj",
"platform_texture": "Wanhaobackplate.png", "platform_texture": "Wanhaobackplate.png",

View File

@ -7,7 +7,6 @@
"author": "Ricardo Snoek", "author": "Ricardo Snoek",
"manufacturer": "Wanhao", "manufacturer": "Wanhao",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "wanhao-icon.png",
"has_materials": true, "has_materials": true,
"platform": "wanhao_200_200_platform.obj", "platform": "wanhao_200_200_platform.obj",
"platform_texture": "Wanhaobackplate.png", "platform_texture": "Wanhaobackplate.png",

View File

@ -7,7 +7,6 @@
"author": "Ricardo Snoek", "author": "Ricardo Snoek",
"manufacturer": "Wanhao", "manufacturer": "Wanhao",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "wanhao-icon.png",
"has_materials": true, "has_materials": true,
"platform": "wanhao_200_200_platform.obj", "platform": "wanhao_200_200_platform.obj",
"platform_texture": "Wanhaobackplate.png", "platform_texture": "Wanhaobackplate.png",

View File

@ -7,7 +7,6 @@
"author": "Ricardo Snoek", "author": "Ricardo Snoek",
"manufacturer": "Wanhao", "manufacturer": "Wanhao",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "wanhao-icon.png",
"has_materials": true, "has_materials": true,
"platform": "wanhao_300_200_platform.obj", "platform": "wanhao_300_200_platform.obj",
"platform_texture": "Wanhaobackplate.png", "platform_texture": "Wanhaobackplate.png",

View File

@ -7,7 +7,6 @@
"author": "Ricardo Snoek", "author": "Ricardo Snoek",
"manufacturer": "Wanhao", "manufacturer": "Wanhao",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "wanhao-icon.png",
"has_materials": true, "has_materials": true,
"platform": "wanhao_300_200_platform.obj", "platform": "wanhao_300_200_platform.obj",
"platform_texture": "Wanhaobackplate.png", "platform_texture": "Wanhaobackplate.png",

View File

@ -7,7 +7,6 @@
"author": "Ricardo Snoek", "author": "Ricardo Snoek",
"manufacturer": "Wanhao", "manufacturer": "Wanhao",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "wanhao-icon.png",
"has_materials": true, "has_materials": true,
"platform": "wanhao_200_200_platform.obj", "platform": "wanhao_200_200_platform.obj",
"platform_texture": "Wanhaobackplate.png", "platform_texture": "Wanhaobackplate.png",

View File

@ -7,7 +7,6 @@
"author": "Ricardo Snoek", "author": "Ricardo Snoek",
"manufacturer": "Wanhao", "manufacturer": "Wanhao",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "wanhao-icon.png",
"has_materials": true, "has_materials": true,
"platform": "wanhao_110_110_platform.obj", "platform": "wanhao_110_110_platform.obj",
"platform_texture": "Wanhaobackplate.png", "platform_texture": "Wanhaobackplate.png",

View File

@ -7,7 +7,6 @@
"author": "Ricardo Snoek", "author": "Ricardo Snoek",
"manufacturer": "Wanhao", "manufacturer": "Wanhao",
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",
"icon": "wanhao-icon.png",
"has_materials": true, "has_materials": true,
"platform": "wanhao_200_200_platform.obj", "platform": "wanhao_200_200_platform.obj",
"platform_texture": "Wanhaobackplate.png", "platform_texture": "Wanhaobackplate.png",

View File

@ -45,10 +45,46 @@ UM.Dialog
} }
signal machineAdded(string id) signal machineAdded(string id)
function getMachineName() function getMachineName()
{ {
var name = machineList.model.getItem(machineList.currentIndex) != undefined ? machineList.model.getItem(machineList.currentIndex).name : "" return machineList.model.getItem(machineList.currentIndex) != undefined ? machineList.model.getItem(machineList.currentIndex).name : "";
return name }
function getMachineMetaDataEntry(key)
{
var metadata = machineList.model.getItem(machineList.currentIndex) != undefined ? machineList.model.getItem(machineList.currentIndex).metadata : undefined;
if (metadata)
{
return metadata[key];
}
return undefined;
}
Label {
id: titleLabel
anchors {
top: parent.top
left: parent.left
topMargin: UM.Theme.getSize("default_margin")
}
text: catalog.i18nc("@title:tab", "Add a printer to Cura")
font.pointSize: 18
}
Label
{
id: captionLabel
anchors
{
left: parent.left
top: titleLabel.bottom
topMargin: UM.Theme.getSize("default_margin").height
}
text: catalog.i18nc("@title:tab", "Select the printer you want to use from the list below.\n\nIf your printer is not in the list, use the \"Custom FFF Printer\" from the \"Custom\" category and match adjust the settings to match your printer in the next dialog.")
width: parent.width
wrapMode: Text.WordWrap
} }
ScrollView ScrollView
@ -57,13 +93,21 @@ UM.Dialog
anchors anchors
{ {
left: parent.left; top: captionLabel.visible ? captionLabel.bottom : parent.top;
top: parent.top; topMargin: captionLabel.visible ? UM.Theme.getSize("default_margin").height : 0;
right: parent.right; bottom: addPrinterButton.top;
bottom: machineNameRow.top;
bottomMargin: UM.Theme.getSize("default_margin").height bottomMargin: UM.Theme.getSize("default_margin").height
} }
width: Math.round(parent.width * 0.45)
frameVisible: true;
Rectangle {
parent: viewport
anchors.fill: parent
color: palette.light
}
ListView ListView
{ {
id: machineList id: machineList
@ -184,32 +228,76 @@ UM.Dialog
} }
} }
Row Column
{ {
id: machineNameRow anchors
anchors.bottom:parent.bottom
spacing: UM.Theme.getSize("default_margin").width
Label
{ {
text: catalog.i18nc("@label", "Printer Name:") top: machinesHolder.top
anchors.verticalCenter: machineName.verticalCenter left: machinesHolder.right
right: parent.right
leftMargin: UM.Theme.getSize("default_margin").width
} }
TextField spacing: UM.Theme.getSize("default_margin").height
Label
{ {
id: machineName width: parent.width
wrapMode: Text.WordWrap
text: getMachineName() text: getMachineName()
implicitWidth: UM.Theme.getSize("standard_list_input").width font.pointSize: 16
maximumLength: 40 elide: Text.ElideRight
//validator: Cura.MachineNameValidator { } //TODO: Gives a segfault in PyQt5.6. For now, we must use a signal on text changed. }
validator: RegExpValidator Grid
{
width: parent.width
columns: 2
rowSpacing: UM.Theme.getSize("default_lining").height
columnSpacing: UM.Theme.getSize("default_margin").width
verticalItemAlignment: Grid.AlignVCenter
Label
{ {
regExp: { wrapMode: Text.WordWrap
machineName.machine_name_validator.machineNameRegex text: catalog.i18nc("@label", "Manufacturer")
} }
Label
{
width: Math.floor(parent.width * 0.65)
wrapMode: Text.WordWrap
text: getMachineMetaDataEntry("manufacturer")
}
Label
{
wrapMode: Text.WordWrap
text: catalog.i18nc("@label", "Author")
}
Label
{
width: Math.floor(parent.width * 0.75)
wrapMode: Text.WordWrap
text: getMachineMetaDataEntry("author")
}
Label
{
wrapMode: Text.WordWrap
text: catalog.i18nc("@label", "Printer Name")
}
TextField
{
id: machineName
text: getMachineName()
width: Math.floor(parent.width * 0.75)
implicitWidth: UM.Theme.getSize("standard_list_input").width
maximumLength: 40
//validator: Cura.MachineNameValidator { } //TODO: Gives a segfault in PyQt5.6. For now, we must use a signal on text changed.
validator: RegExpValidator
{
regExp: {
machineName.machine_name_validator.machineNameRegex
}
}
property var machine_name_validator: Cura.MachineNameValidator { }
} }
property var machine_name_validator: Cura.MachineNameValidator { }
} }
} }