mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 06:23:59 -06:00
Fix merge conflicts
This commit is contained in:
commit
ec0b197b6e
9 changed files with 159 additions and 102 deletions
|
@ -22,6 +22,8 @@ Item
|
|||
property bool hasSentRequest: false
|
||||
// Whether the IP address user entered can be resolved as a recognizable printer.
|
||||
property bool haveConnection: false
|
||||
// True when a request comes back, but the device hasn't responded.
|
||||
property bool deviceUnresponsive: false
|
||||
|
||||
Label
|
||||
{
|
||||
|
@ -77,12 +79,14 @@ Item
|
|||
anchors.right: addPrinterButton.left
|
||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||
font: UM.Theme.getFont("default")
|
||||
selectByMouse: true
|
||||
|
||||
validator: RegExpValidator
|
||||
{
|
||||
regExp: /[a-fA-F0-9\.\:]*/
|
||||
}
|
||||
|
||||
enabled: { ! (addPrinterByIpScreen.hasSentRequest || addPrinterByIpScreen.haveConnection) }
|
||||
onAccepted: addPrinterButton.clicked()
|
||||
}
|
||||
|
||||
|
@ -101,6 +105,7 @@ Item
|
|||
if (hostnameField.text.trim() != "")
|
||||
{
|
||||
enabled = false;
|
||||
addPrinterByIpScreen.deviceUnresponsive = false;
|
||||
UM.OutputDeviceManager.addManualDevice(hostnameField.text, hostnameField.text);
|
||||
}
|
||||
}
|
||||
|
@ -115,6 +120,12 @@ Item
|
|||
! addPrinterByIpScreen.haveConnection
|
||||
}
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: UM.OutputDeviceManager
|
||||
onManualDeviceChanged: { addPrinterButton.enabled = ! UM.OutputDeviceManager.hasManualDevice }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -131,8 +142,22 @@ Item
|
|||
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||
font: UM.Theme.getFont("default")
|
||||
|
||||
visible: { addPrinterByIpScreen.hasSentRequest && ! addPrinterByIpScreen.haveConnection }
|
||||
text: catalog.i18nc("@label", "The printer at this address has not responded yet.")
|
||||
visible:
|
||||
{
|
||||
(addPrinterByIpScreen.hasSentRequest && ! addPrinterByIpScreen.haveConnection)
|
||||
|| addPrinterByIpScreen.deviceUnresponsive
|
||||
}
|
||||
text:
|
||||
{
|
||||
if (addPrinterByIpScreen.deviceUnresponsive)
|
||||
{
|
||||
catalog.i18nc("@label", "Could not connect to device.")
|
||||
}
|
||||
else
|
||||
{
|
||||
catalog.i18nc("@label", "The printer at this address has not responded yet.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item
|
||||
|
@ -141,7 +166,7 @@ Item
|
|||
anchors.top: parent.top
|
||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||
|
||||
visible: addPrinterByIpScreen.haveConnection
|
||||
visible: addPrinterByIpScreen.haveConnection && ! addPrinterByIpScreen.deviceUnresponsive
|
||||
|
||||
Label
|
||||
{
|
||||
|
@ -174,9 +199,18 @@ Item
|
|||
target: UM.OutputDeviceManager
|
||||
onManualDeviceChanged:
|
||||
{
|
||||
typeText.text = UM.OutputDeviceManager.manualDeviceProperty("printer_type")
|
||||
firmwareText.text = UM.OutputDeviceManager.manualDeviceProperty("firmware_version")
|
||||
addressText.text = UM.OutputDeviceManager.manualDeviceProperty("address")
|
||||
if (UM.OutputDeviceManager.hasManualDevice)
|
||||
{
|
||||
typeText.text = UM.OutputDeviceManager.manualDeviceProperty("printer_type")
|
||||
firmwareText.text = UM.OutputDeviceManager.manualDeviceProperty("firmware_version")
|
||||
addressText.text = UM.OutputDeviceManager.manualDeviceProperty("address")
|
||||
}
|
||||
else
|
||||
{
|
||||
typeText.text = ""
|
||||
firmwareText.text = ""
|
||||
addressText.text = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -186,8 +220,17 @@ Item
|
|||
target: UM.OutputDeviceManager
|
||||
onManualDeviceChanged:
|
||||
{
|
||||
printerNameLabel.text = UM.OutputDeviceManager.manualDeviceProperty("name")
|
||||
addPrinterByIpScreen.haveConnection = true
|
||||
if (UM.OutputDeviceManager.hasManualDevice)
|
||||
{
|
||||
printerNameLabel.text = UM.OutputDeviceManager.manualDeviceProperty("name")
|
||||
addPrinterByIpScreen.haveConnection = true
|
||||
}
|
||||
else
|
||||
{
|
||||
addPrinterByIpScreen.hasSentRequest = false
|
||||
addPrinterByIpScreen.haveConnection = false
|
||||
addPrinterByIpScreen.deviceUnresponsive = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -120,18 +120,24 @@ Item
|
|||
onClicked: Qt.openUrlExternally(CuraApplication.ultimakerCloudAccountRootUrl + "/app/create")
|
||||
}
|
||||
|
||||
Cura.SecondaryButton
|
||||
Label
|
||||
{
|
||||
id: signInButton
|
||||
anchors.left: createAccountButton.right
|
||||
anchors.verticalCenter: finishButton.verticalCenter
|
||||
anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
|
||||
text: catalog.i18nc("@button", "Sign in")
|
||||
width: UM.Theme.getSize("welcome_pages_button").width
|
||||
shadowEnabled: false
|
||||
color: "transparent"
|
||||
hoverColor: "transparent"
|
||||
textHoverColor: UM.Theme.getColor("primary")
|
||||
fixedWidthMode: true
|
||||
onClicked: Cura.API.account.login()
|
||||
color: UM.Theme.getColor("secondary_button_text")
|
||||
font: UM.Theme.getFont("medium")
|
||||
renderType: Text.NativeRendering
|
||||
|
||||
MouseArea
|
||||
{
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onClicked: Cura.API.account.login()
|
||||
onEntered: parent.font.underline = true
|
||||
onExited: parent.font.underline = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,30 +28,39 @@ Item
|
|||
renderType: Text.NativeRendering
|
||||
}
|
||||
|
||||
Column
|
||||
// Area where the cloud contents can be put. Pictures, texts and such.
|
||||
Item
|
||||
{
|
||||
id: contentsArea
|
||||
anchors.top: titleLabel.bottom
|
||||
anchors.topMargin: 80
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.bottom: getStartedButton.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||
|
||||
spacing: 60
|
||||
|
||||
Image
|
||||
Column
|
||||
{
|
||||
id: curaImage
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
source: UM.Theme.getImage("first_run_share_data")
|
||||
}
|
||||
anchors.centerIn: parent
|
||||
|
||||
Label
|
||||
{
|
||||
id: textLabel
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: catalog.i18nc("@text", "Ultimaker Cura collects anonymous data to improve print quality<br/>and user experience. <a href=\"TODO\">More information</a>")
|
||||
textFormat: Text.RichText
|
||||
font: UM.Theme.getFont("medium")
|
||||
renderType: Text.NativeRendering
|
||||
spacing: UM.Theme.getSize("welcome_pages_default_margin").height
|
||||
|
||||
Image
|
||||
{
|
||||
id: curaImage
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
source: UM.Theme.getImage("first_run_share_data")
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
id: textLabel
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: catalog.i18nc("@text", "Ultimaker Cura collects anonymous data to improve print quality<br/>and user experience. <a href=\"TODO\">More information</a>")
|
||||
textFormat: Text.RichText
|
||||
font: UM.Theme.getFont("medium")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,9 @@ Item
|
|||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.margins: 1
|
||||
// Keep a small margin with the Rectangle container so its content will not overlap with the Rectangle
|
||||
// border.
|
||||
anchors.margins: UM.Theme.getSize("default_lining").width
|
||||
sourceComponent: base.contentComponent != null ? base.contentComponent : emptyComponent
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,8 @@ Item
|
|||
{
|
||||
currentStep++
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
passLastPage()
|
||||
}
|
||||
}
|
||||
|
@ -69,10 +70,6 @@ Item
|
|||
{
|
||||
currentStep = page_index
|
||||
}
|
||||
else
|
||||
{
|
||||
console.log("Error: cannot find page with page_id = [", page_id, "]")
|
||||
}
|
||||
}
|
||||
|
||||
onVisibleChanged:
|
||||
|
|
|
@ -12,36 +12,37 @@ import Cura 1.1 as Cura
|
|||
//
|
||||
Item
|
||||
{
|
||||
Column
|
||||
UM.I18nCatalog { id: catalog; name: "cura" }
|
||||
|
||||
Label
|
||||
{
|
||||
id: titleLabel
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: UM.Theme.getSize("welcome_pages_default_margin").height
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: catalog.i18nc("@label", "User Agreement")
|
||||
color: UM.Theme.getColor("primary_button")
|
||||
font: UM.Theme.getFont("large_bold")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
|
||||
Item // Area for pictures and texts
|
||||
{
|
||||
anchors.top: titleLabel.bottom
|
||||
anchors.bottom: agreeButton.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.margins: 20
|
||||
|
||||
UM.I18nCatalog { id: catalog; name: "cura" }
|
||||
|
||||
spacing: 40
|
||||
|
||||
// Placeholder
|
||||
Label { text: " " }
|
||||
anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
|
||||
|
||||
Label
|
||||
{
|
||||
id: titleLabel
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: catalog.i18nc("@label", "User Agreement")
|
||||
color: UM.Theme.getColor("primary_button")
|
||||
font: UM.Theme.getFont("large_bold")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
width: parent.width * 2 / 3
|
||||
id: disclaimerLineLabel
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.centerIn: parent
|
||||
anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
|
||||
|
||||
width: (parent.width * 2 / 3) | 0
|
||||
|
||||
text: "<p><b>Disclaimer by Ultimaker</b></p>"
|
||||
+ "<p>Please read this disclaimer carefully.</p>"
|
||||
+ "<p>Except when otherwise stated in writing, Ultimaker provides any Ultimaker software or third party software \"As is\" without warranty of any kind. The entire risk as to the quality and perfoemance of Ultimaker software is with you.</p>"
|
||||
|
|
|
@ -11,30 +11,28 @@ import Cura 1.1 as Cura
|
|||
//
|
||||
// This component contains the content for the "Welcome" page of the welcome on-boarding process.
|
||||
//
|
||||
Column
|
||||
Item
|
||||
{
|
||||
UM.I18nCatalog { id: catalog; name: "cura" }
|
||||
|
||||
spacing: 60
|
||||
anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
|
||||
|
||||
// Placeholder
|
||||
Label { text: " " }
|
||||
|
||||
Label
|
||||
Column // Arrange the items vertically and put everything in the center
|
||||
{
|
||||
id: titleLabel
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: catalog.i18nc("@label", "Welcome to Ultimaker Cura")
|
||||
color: UM.Theme.getColor("primary_button")
|
||||
font: UM.Theme.getFont("large_bold")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
anchors.centerIn: parent
|
||||
width: parent.width
|
||||
spacing: UM.Theme.getSize("welcome_pages_default_margin").height
|
||||
|
||||
Column
|
||||
{
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
spacing: 40
|
||||
Label
|
||||
{
|
||||
id: titleLabel
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: catalog.i18nc("@label", "Welcome to Ultimaker Cura")
|
||||
color: UM.Theme.getColor("primary_button")
|
||||
font: UM.Theme.getFont("large_bold")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
|
||||
Image
|
||||
{
|
||||
|
@ -52,15 +50,16 @@ Column
|
|||
font: UM.Theme.getFont("medium")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
}
|
||||
|
||||
Cura.PrimaryButton
|
||||
{
|
||||
id: getStartedButton
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: catalog.i18nc("@button", "Get started")
|
||||
width: UM.Theme.getSize("welcome_pages_button").width
|
||||
fixedWidthMode: true
|
||||
onClicked: base.showNextPage()
|
||||
Cura.PrimaryButton
|
||||
{
|
||||
id: getStartedButton
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
|
||||
text: catalog.i18nc("@button", "Get started")
|
||||
width: UM.Theme.getSize("welcome_pages_button").width
|
||||
fixedWidthMode: true
|
||||
onClicked: base.showNextPage()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,8 +32,8 @@ Item
|
|||
{
|
||||
anchors.top: titleLabel.bottom
|
||||
anchors.bottom: getStartedButton.top
|
||||
anchors.topMargin: 40
|
||||
anchors.bottomMargin: 40
|
||||
anchors.topMargin: UM.Theme.getSize("welcome_pages_default_margin").height
|
||||
anchors.bottomMargin: UM.Theme.getSize("welcome_pages_default_margin").height
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: parent.width * 3 / 4
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue