styling of the UMO wizard pages

fixes issue CURA-64
This commit is contained in:
Tamara Hogenhout 2015-09-16 16:22:34 +02:00
parent fccf365424
commit bb961ad1b1
5 changed files with 335 additions and 178 deletions

View file

@ -3,7 +3,6 @@
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 1.1 import QtQuick.Controls 1.1
import QtQuick.Layouts 1.1
import QtQuick.Window 2.1 import QtQuick.Window 2.1
import QtQuick.Controls.Styles 1.1 import QtQuick.Controls.Styles 1.1
@ -80,13 +79,7 @@ Item
section.property: "manufacturer" section.property: "manufacturer"
section.delegate: Button { section.delegate: Button {
text: { text: section + " "
if (base,activeManufacturer == section)
return section + " ▼"
else
return section + " ►"
}
style: ButtonStyle { style: ButtonStyle {
background: Rectangle { background: Rectangle {
id: manufacturerBackground id: manufacturerBackground
@ -100,6 +93,17 @@ Item
text: control.text text: control.text
color: palette.windowText color: palette.windowText
font.bold: true font.bold: true
UM.RecolorImage {
id: downArrow
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.right
width: UM.Theme.sizes.standard_arrow.width
height: UM.Theme.sizes.standard_arrow.height
sourceSize.width: width
sourceSize.height: width
color: palette.windowText
source: base,activeManufacturer == section ? UM.Theme.icons.arrow_bottom : UM.Theme.icons.arrow_right
}
} }
} }
@ -136,9 +140,6 @@ Item
Label Label
{ {
id: author id: author
// visible: model.author != "Ultimaker" ? true : false
//: Printer profile caption meaning: this profile is supported by the community
// text: qsTr("community supported profile");
text: model.author; text: model.author;
anchors.left: machineButton.right anchors.left: machineButton.right
anchors.leftMargin: UM.Theme.sizes.standard_list_lineheight.height/2 anchors.leftMargin: UM.Theme.sizes.standard_list_lineheight.height/2

View file

@ -8,7 +8,7 @@ import QtQuick.Window 2.1
import UM 1.1 as UM import UM 1.1 as UM
Column Item
{ {
id: wizardPage id: wizardPage
property int leveling_state: 0 property int leveling_state: 0
@ -22,48 +22,72 @@ Column
Label Label
{ {
id: pageTitle
width: parent.width
text: catalog.i18nc("@title", "Bed Leveling") text: catalog.i18nc("@title", "Bed Leveling")
wrapMode: Text.WordWrap
font.pointSize: 18; font.pointSize: 18;
} }
Label Label
{ {
id: pageDescription id: pageDescription
anchors.top: pageTitle.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
width: parent.width width: parent.width
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
text: catalog.i18nc("@label","To make sure your prints will come out great, you can now adjust your buildplate. When you click 'Move to Next Position' the nozzle will move to the different positions that can be adjusted.") text: catalog.i18nc("@label","To make sure your prints will come out great, you can now adjust your buildplate. When you click 'Move to Next Position' the nozzle will move to the different positions that can be adjusted.")
} }
Label Label
{ {
id: bedelevelingText
anchors.top: pageDescription.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
width: parent.width width: parent.width
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
text: catalog.i18nc("@label", "For every postition; insert a piece of paper under the nozzle and adjust the print bed height. The print bed height is right when the paper is slightly gripped by the tip of the nozzle.") text: catalog.i18nc("@label", "For every postition; insert a piece of paper under the nozzle and adjust the print bed height. The print bed height is right when the paper is slightly gripped by the tip of the nozzle.")
} }
Button
{ Item{
text: catalog.i18nc("@action:button","Move to Next Position"); anchors.top: bedelevelingText.bottom
onClicked: anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.horizontalCenter: parent.horizontalCenter
width: bedelevelingButton.width + skipBedlevelingButton.width + UM.Theme.sizes.default_margin.height < wizardPage.width ? bedelevelingButton.width + skipBedlevelingButton.width + UM.Theme.sizes.default_margin.height : wizardPage.width
Button
{ {
if(wizardPage.leveling_state == 0) id: bedelevelingButton
anchors.top: parent.top
anchors.left: parent.left
text: catalog.i18nc("@action:button","Move to Next Position");
onClicked:
{ {
printer_connection.moveHead(platform_width /2 , platform_height,0) if(wizardPage.leveling_state == 0)
} {
if(wizardPage.leveling_state == 1) printer_connection.moveHead(platform_width /2 , platform_height,0)
{ }
printer_connection.moveHead(platform_width , 0,0) if(wizardPage.leveling_state == 1)
} {
if(wizardPage.leveling_state == 2) printer_connection.moveHead(platform_width , 0,0)
{ }
printer_connection.moveHead(0, 0 ,0) if(wizardPage.leveling_state == 2)
} {
wizardPage.leveling_state++ printer_connection.moveHead(0, 0 ,0)
}
wizardPage.leveling_state++
}
} }
}
Button Button
{ {
text: catalog.i18nc("@action:button","Skip Bedleveling"); id: skipBedlevelingButton
anchors.top: parent.width < wizardPage.width ? parent.top : bedelevelingButton.bottom
anchors.topMargin: parent.width < wizardPage.width ? 0 : UM.Theme.sizes.default_margin.height/2
anchors.left: parent.width < wizardPage.width ? bedelevelingButton.right : parent.left
anchors.leftMargin: parent.width < wizardPage.width ? UM.Theme.sizes.default_margin.width : 0
text: catalog.i18nc("@action:button","Skip Bedleveling");
onClicked: base.visible = false;
}
} }
function threePointLeveling(width, height) function threePointLeveling(width, height)

View file

@ -3,7 +3,6 @@
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 1.1 import QtQuick.Controls 1.1
import QtQuick.Layouts 1.1
import QtQuick.Window 2.1 import QtQuick.Window 2.1
import UM 1.1 as UM import UM 1.1 as UM
@ -15,61 +14,63 @@ Item
SystemPalette{id: palette} SystemPalette{id: palette}
UM.I18nCatalog { id: catalog; name:"cura"} UM.I18nCatalog { id: catalog; name:"cura"}
ScrollView Label
{ {
height: parent.height id: pageTitle
width: parent.width width: parent.width
Column text: catalog.i18nc("@title", "Select Upgraded Parts")
wrapMode: Text.WordWrap
font.pointSize: 18
}
Label
{
id: pageDescription
anchors.top: pageTitle.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
width: parent.width
wrapMode: Text.WordWrap
text: catalog.i18nc("@label","To assist you in having better default settings for your Ultimaker. Cura would like to know which upgrades you have in your machine:")
}
Item
{
id: pageCheckboxes
height: childrenRect.height
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.default_margin.width
anchors.top: pageDescription.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
width: parent.width - UM.Theme.sizes.default_margin.width
CheckBox
{ {
width: wizardPage.width id: checkBox
Label text: catalog.i18nc("@option:check","Extruder driver ugrades")
{ checked: true
id: pageTitle
width: parent.width
text: catalog.i18nc("@title", "Select Upgraded Parts")
wrapMode: Text.WordWrap
font.pointSize: 18
}
Label
{
id: pageDescription
//: Add UM Original wizard page description
width: parent.width
wrapMode: Text.WordWrap
text: catalog.i18nc("@label","To assist you in having better default settings for your Ultimaker. Cura would like to know which upgrades you have in your machine:")
}
Column
{
id: pageCheckboxes
width: parent.width
CheckBox
{
text: catalog.i18nc("@option:check","Extruder driver ugrades")
checked: true
}
CheckBox
{
text: catalog.i18nc("@option:check","Heated printer bed (standard kit)")
}
CheckBox
{
text: catalog.i18nc("@option:check","Heated printer bed (self built)")
}
CheckBox
{
text: catalog.i18nc("@option:check","Dual extrusion (experimental)")
}
}
Label
{
width: parent.width
wrapMode: Text.WordWrap
text: catalog.i18nc("@label","If you bought your Ultimaker after october 2012 you will have the Extruder drive upgrade. If you do not have this upgrade, it is highly recommended to improve reliability. This upgrade can be bought from the Ultimaker webshop or found on thingiverse as thing:26094");
}
} }
CheckBox
{
text: catalog.i18nc("@option:check","Heated printer bed (standard kit)")
y: checkBox.height * 1
}
CheckBox
{
text: catalog.i18nc("@option:check","Heated printer bed (self built)")
y: checkBox.height * 2
}
CheckBox
{
text: catalog.i18nc("@option:check","Dual extrusion (experimental)")
y: checkBox.height * 3
}
}
Label
{
width: parent.width
anchors.top: pageCheckboxes.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
wrapMode: Text.WordWrap
text: catalog.i18nc("@label","If you bought your Ultimaker after october 2012 you will have the Extruder drive upgrade. If you do not have this upgrade, it is highly recommended to improve reliability. This upgrade can be bought from the Ultimaker webshop or found on thingiverse as thing:26094");
} }
ExclusiveGroup { id: printerGroup; } ExclusiveGroup { id: printerGroup; }

View file

@ -3,15 +3,16 @@
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 1.1 import QtQuick.Controls 1.1
import QtQuick.Layouts 1.1
import QtQuick.Window 2.1 import QtQuick.Window 2.1
import UM 1.1 as UM import UM 1.1 as UM
Column Item
{ {
id: wizardPage id: wizardPage
property string title property string title
property int leftRow: wizardPage.width*0.40
property int rightRow: wizardPage.width*0.60
anchors.fill: parent; anchors.fill: parent;
property bool x_min_pressed: false property bool x_min_pressed: false
property bool y_min_pressed: false property bool y_min_pressed: false
@ -34,133 +35,249 @@ Column
} }
Label Label
{ {
id: pageTitle
width: parent.width
text: catalog.i18nc("@title", "Check Printer") text: catalog.i18nc("@title", "Check Printer")
wrapMode: Text.WordWrap
font.pointSize: 18; font.pointSize: 18;
} }
Label Label
{ {
//: Add Printer wizard page description id: pageDescription
anchors.top: pageTitle.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
width: parent.width
wrapMode: Text.WordWrap
text: catalog.i18nc("@label","It's a good idea to do a few sanity checks on your Ultimaker. You can skip this step if you know your machine is functional"); text: catalog.i18nc("@label","It's a good idea to do a few sanity checks on your Ultimaker. You can skip this step if you know your machine is functional");
} }
Button Item{
{ id: startStopButtons
text: catalog.i18nc("@action:button","Start Printer Check"); anchors.top: pageDescription.bottom
enabled: manager.progress >= 100; anchors.topMargin: UM.Theme.sizes.default_margin.height
onClicked: base.visible = false; anchors.horizontalCenter: parent.horizontalCenter
height: childrenRect.height
width: startCheckButton.width + skipCheckButton.width + UM.Theme.sizes.default_margin.height < wizardPage.width ? startCheckButton.width + skipCheckButton.width + UM.Theme.sizes.default_margin.height : wizardPage.width
Button
{
id: startCheckButton
anchors.top: parent.top
anchors.left: parent.left
text: catalog.i18nc("@action:button","Start Printer Check");
enabled: manager.progress >= 100;
onClicked: {
checkupContent.visible = true
startCheckButton.enabled = false
}
}
Button
{
id: skipCheckButton
anchors.top: parent.width < wizardPage.width ? parent.top : startCheckButton.bottom
anchors.topMargin: parent.width < wizardPage.width ? 0 : UM.Theme.sizes.default_margin.height/2
anchors.left: parent.width < wizardPage.width ? startCheckButton.right : parent.left
anchors.leftMargin: parent.width < wizardPage.width ? UM.Theme.sizes.default_margin.width : 0
text: catalog.i18nc("@action:button","Skip Printer Check");
enabled: manager.progress >= 100;
onClicked: {
base.currentPage += 1
}
}
} }
Button Item{
{ id: checkupContent
text: catalog.i18nc("@action:button","Skip Printer Check"); anchors.top: startStopButtons.bottom
enabled: manager.progress >= 100; anchors.topMargin: UM.Theme.sizes.default_margin.height
onClicked: base.visible = false; visible: false
} //////////////////////////////////////////////////////////
Row
{
Label Label
{ {
id: connectionLabel
width: wizardPage.leftRow
anchors.left: parent.left
anchors.top: parent.top
wrapMode: Text.WordWrap
text: catalog.i18nc("@label","Connection: ") text: catalog.i18nc("@label","Connection: ")
} }
Label Label
{ {
id: connectionStatus
width: wizardPage.rightRow
anchors.left: connectionLabel.right
anchors.top: parent.top
wrapMode: Text.WordWrap
text: UM.USBPrinterManager.connectedPrinterList.count ? catalog.i18nc("@info:status","Done"):catalog.i18nc("@info:status","Incomplete") text: UM.USBPrinterManager.connectedPrinterList.count ? catalog.i18nc("@info:status","Done"):catalog.i18nc("@info:status","Incomplete")
} }
} //////////////////////////////////////////////////////////
Row
{
Label Label
{ {
id: endstopXLabel
width: wizardPage.leftRow
anchors.left: parent.left
anchors.top: connectionLabel.bottom
wrapMode: Text.WordWrap
text: catalog.i18nc("@label","Min endstop X: ") text: catalog.i18nc("@label","Min endstop X: ")
} }
Label Label
{ {
id: endstopXStatus
width: wizardPage.rightRow
anchors.left: endstopXLabel.right
anchors.top: connectionLabel.bottom
wrapMode: Text.WordWrap
text: x_min_pressed ? catalog.i18nc("@info:status","Works") : catalog.i18nc("@info:status","Not checked") text: x_min_pressed ? catalog.i18nc("@info:status","Works") : catalog.i18nc("@info:status","Not checked")
} }
} //////////////////////////////////////////////////////////////
Row
{
Label Label
{ {
id: endstopYLabel
width: wizardPage.leftRow
anchors.left: parent.left
anchors.top: endstopXLabel.bottom
wrapMode: Text.WordWrap
text: catalog.i18nc("@label","Min endstop Y: ") text: catalog.i18nc("@label","Min endstop Y: ")
} }
Label Label
{ {
id: endstopYStatus
width: wizardPage.rightRow
anchors.left: endstopYLabel.right
anchors.top: endstopXLabel.bottom
wrapMode: Text.WordWrap
text: y_min_pressed ? catalog.i18nc("@info:status","Works") : catalog.i18nc("@info:status","Not checked") text: y_min_pressed ? catalog.i18nc("@info:status","Works") : catalog.i18nc("@info:status","Not checked")
} }
} /////////////////////////////////////////////////////////////////////
Row
{
Label Label
{ {
id: endstopZLabel
width: wizardPage.leftRow
anchors.left: parent.left
anchors.top: endstopYLabel.bottom
wrapMode: Text.WordWrap
text: catalog.i18nc("@label","Min endstop Z: ") text: catalog.i18nc("@label","Min endstop Z: ")
} }
Label Label
{ {
id: endstopZStatus
width: wizardPage.rightRow
anchors.left: endstopZLabel.right
anchors.top: endstopYLabel.bottom
wrapMode: Text.WordWrap
text: z_min_pressed ? catalog.i18nc("@info:status","Works") : catalog.i18nc("@info:status","Not checked") text: z_min_pressed ? catalog.i18nc("@info:status","Works") : catalog.i18nc("@info:status","Not checked")
} }
} ////////////////////////////////////////////////////////////
Row
{
Label Label
{ {
id: nozzleTempLabel
width: wizardPage.leftRow
anchors.left: parent.left
anchors.top: endstopZLabel.bottom
wrapMode: Text.WordWrap
text: catalog.i18nc("@label","Nozzle temperature check: ") text: catalog.i18nc("@label","Nozzle temperature check: ")
} }
Label Label
{ {
text: printer_connection != null ? printer_connection.extruderTemperature : "0" id: nozzleTempStatus
width: wizardPage.rightRow * 0.4
anchors.top: nozzleTempLabel.top
anchors.left: nozzleTempLabel.right
wrapMode: Text.WordWrap
text: catalog.i18nc("@info:status","Not checked")
} }
Button Item
{ {
text: catalog.i18nc("@action:button","Start Heating") id: nozzleTempButton
onClicked: width: wizardPage.rightRow * 0.3
height: nozzleTemp.height
anchors.top: nozzleTempLabel.top
anchors.left: bedTempStatus.right
anchors.leftMargin: UM.Theme.sizes.default_margin.width/2
Button
{ {
if(printer_connection != null) height: nozzleTemp.height - 2
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
text: catalog.i18nc("@action:button","Start Heating")
onClicked:
{ {
heater_status_label.text = catalog.i18nc("@info:progress","Checking") if(printer_connection != null)
printer_connection.heatupNozzle(190) {
wizardPage.extruder_target_temp = 190 heater_status_label.text = catalog.i18nc("@info:progress","Checking")
printer_connection.heatupNozzle(190)
wizardPage.extruder_target_temp = 190
}
} }
} }
} }
Label Label
{ {
id: heater_status_label id: nozzleTemp
text: catalog.i18nc("@info:status","Not checked") anchors.top: nozzleTempLabel.top
anchors.left: nozzleTempButton.right
anchors.leftMargin: UM.Theme.sizes.default_margin.width
width: wizardPage.rightRow * 0.2
wrapMode: Text.WordWrap
text: printer_connection != null ? printer_connection.extruderTemperature + "°C" : "0°C"
font.bold: true
} }
} /////////////////////////////////////////////////////////////////////////////
Row
{
Label Label
{ {
id: bedTempLabel
width: wizardPage.leftRow
anchors.left: parent.left
anchors.top: nozzleTempLabel.bottom
wrapMode: Text.WordWrap
text: catalog.i18nc("@label","bed temperature check:") text: catalog.i18nc("@label","bed temperature check:")
} }
Label Label
{ {
text: printer_connection != null ? printer_connection.bedTemperature : "0" id: bedTempStatus
width: wizardPage.rightRow * 0.4
anchors.top: bedTempLabel.top
anchors.left: bedTempLabel.right
wrapMode: Text.WordWrap
text: catalog.i18nc("@info:status","Not checked")
} }
Button Item
{ {
text: catalog.i18nc("@action:button","Start Heating") id: bedTempButton
onClicked: width: wizardPage.rightRow * 0.3
height: bedTemp.height
anchors.top: bedTempLabel.top
anchors.left: bedTempStatus.right
anchors.leftMargin: UM.Theme.sizes.default_margin.width/2
Button
{ {
if(printer_connection != null) height: bedTemp.height - 2
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
text: catalog.i18nc("@action:button","Start Heating")
onClicked:
{ {
bed_status_label.text = catalog.i18nc("@info:progress","Checking") if(printer_connection != null)
printer_connection.printer.heatupBed(60) {
wizardPage.bed_target_temp = 60 bedTempStatus.text = catalog.i18nc("@info:progress","Checking")
printer_connection.printer.heatupBed(60)
wizardPage.bed_target_temp = 60
}
} }
} }
} }
Label Label
{ {
id: bed_status_label id: bedTemp
text: catalog.i18nc("@info:status","Not checked") width: wizardPage.rightRow * 0.2
anchors.top: bedTempLabel.top
anchors.left: bedTempButton.right
anchors.leftMargin: UM.Theme.sizes.default_margin.width
wrapMode: Text.WordWrap
text: printer_connection != null ? printer_connection.bedTemperature + "°C": "0°C"
font.bold: true
} }
} }

View file

@ -3,7 +3,6 @@
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 1.1 import QtQuick.Controls 1.1
import QtQuick.Layouts 1.1
import QtQuick.Window 2.1 import QtQuick.Window 2.1
import UM 1.1 as UM import UM 1.1 as UM
@ -15,50 +14,65 @@ Item
SystemPalette{id: palette} SystemPalette{id: palette}
UM.I18nCatalog { id: catalog; name:"cura"} UM.I18nCatalog { id: catalog; name:"cura"}
ScrollView Label
{ {
height: parent.height id: pageTitle
width: parent.width width: parent.width
Column text: catalog.i18nc("@title", "Upgrade Firmware")
{ wrapMode: Text.WordWrap
width: wizardPage.width font.pointSize: 18
Label }
{ Label
id: pageTitle {
width: parent.width id: pageDescription
text: catalog.i18nc("@title", "Upgrade Firmware") anchors.top: pageTitle.bottom
wrapMode: Text.WordWrap anchors.topMargin: UM.Theme.sizes.default_margin.height
font.pointSize: 18 width: parent.width
} wrapMode: Text.WordWrap
Label text: catalog.i18nc("@label","Firmware is the piece of software running directly on your 3D printer. This firmware controls the step motors, regulates the temperature and ultimately makes your printer work.")
{ }
id: pageDescription
width: parent.width
wrapMode: Text.WordWrap
text: catalog.i18nc("@label","Firmware is the piece of software running directly on your 3D printer. This firmware controls the step motors, regulates the temperature and ultimately makes your printer work.")
}
Label Label
{ {
width: parent.width id: upgradeText1
wrapMode: Text.WordWrap anchors.top: pageDescription.bottom
text: catalog.i18nc("@label","The firmware shipping with new Ultimakers works, but upgrades have been made to make better prints, and make calibration easier."); anchors.topMargin: UM.Theme.sizes.default_margin.height
} width: parent.width
wrapMode: Text.WordWrap
text: catalog.i18nc("@label","The firmware shipping with new Ultimakers works, but upgrades have been made to make better prints, and make calibration easier.");
}
Label Label
{ {
width: parent.width id: upgradeText2
wrapMode: Text.WordWrap anchors.top: upgradeText1.bottom
text: catalog.i18nc("@label","Cura requires these new features and thus your firmware will most likely need to be upgraded. You can do so now."); anchors.topMargin: UM.Theme.sizes.default_margin.height
} width: parent.width
Button { wrapMode: Text.WordWrap
text: catalog.i18nc("@action:button","Upgrade to Marlin Firmware"); text: catalog.i18nc("@label","Cura requires these new features and thus your firmware will most likely need to be upgraded. You can do so now.");
} }
Button { Item{
text: catalog.i18nc("@action:button","Skip Upgrade"); anchors.top: upgradeText2.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.horizontalCenter: parent.horizontalCenter
width: upgradeButton.width + skipUpgradeButton.width + UM.Theme.sizes.default_margin.height < wizardPage.width ? upgradeButton.width + skipUpgradeButton.width + UM.Theme.sizes.default_margin.height : wizardPage.width
Button {
id: upgradeButton
anchors.top: parent.top
anchors.left: parent.left
text: catalog.i18nc("@action:button","Upgrade to Marlin Firmware");
}
Button {
id: skipUpgradeButton
anchors.top: parent.width < wizardPage.width ? parent.top : upgradeButton.bottom
anchors.topMargin: parent.width < wizardPage.width ? 0 : UM.Theme.sizes.default_margin.height/2
anchors.left: parent.width < wizardPage.width ? upgradeButton.right : parent.left
anchors.leftMargin: parent.width < wizardPage.width ? UM.Theme.sizes.default_margin.width : 0
text: catalog.i18nc("@action:button","Skip Upgrade");
onClicked: {
base.currentPage += 1
} }
} }
} }
ExclusiveGroup { id: printerGroup; } ExclusiveGroup { id: printerGroup; }
} }