mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -06:00
Add busyIndicator and text in AddCloudPrintersView
CURA-7022
This commit is contained in:
parent
15e7cb44af
commit
1aea28a8eb
1 changed files with 63 additions and 13 deletions
|
@ -18,16 +18,66 @@ Item
|
||||||
|
|
||||||
id: addCloudPrinterScreen
|
id: addCloudPrinterScreen
|
||||||
|
|
||||||
Label
|
property bool searchingForCloudPrinters: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Rectangle
|
||||||
{
|
{
|
||||||
id: titleLabel
|
id: cloudPrintersContent
|
||||||
anchors.top: parent.top
|
//color: "steelblue"
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
//opacity: 0.3
|
||||||
horizontalAlignment: Text.AlignHCenter
|
width: parent.width
|
||||||
text: catalog.i18nc("@label", "Add a Cloud printer")
|
border.width: 1
|
||||||
color: UM.Theme.getColor("primary_button")
|
anchors
|
||||||
font: UM.Theme.getFont("huge")
|
{
|
||||||
renderType: Text.NativeRendering
|
top: parent.top
|
||||||
|
bottom: finishButton.top
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
bottomMargin: UM.Theme.getSize("default_margin").height
|
||||||
|
}
|
||||||
|
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
id: titleLabel
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
text: catalog.i18nc("@label", "Add a Cloud printer")
|
||||||
|
color: UM.Theme.getColor("primary_button")
|
||||||
|
font: UM.Theme.getFont("huge")
|
||||||
|
renderType: Text.NativeRendering
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle
|
||||||
|
{
|
||||||
|
id: waitingContent
|
||||||
|
width: parent.width
|
||||||
|
height: waitingIndicator.height + waitingLabel.height
|
||||||
|
border.width: 1
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
BusyIndicator
|
||||||
|
{
|
||||||
|
id: waitingIndicator
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
running: searchingForCloudPrinters
|
||||||
|
}
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
id: waitingLabel
|
||||||
|
anchors.top: waitingIndicator.bottom
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
text: catalog.i18nc("@label", "Waiting for Cloud response")
|
||||||
|
font: UM.Theme.getFont("medium")
|
||||||
|
renderType: Text.NativeRendering
|
||||||
|
}
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Cura.SecondaryButton
|
Cura.SecondaryButton
|
||||||
|
@ -38,23 +88,23 @@ Item
|
||||||
text: catalog.i18nc("@button", "Add printer manually")
|
text: catalog.i18nc("@button", "Add printer manually")
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
CuraApplication.getDiscoveredPrintersModel().cancelCurrentManualDeviceRequest()
|
Cura.API.account.test("Back button pressed in AddCloudPrintersView.qml")
|
||||||
base.showPreviousPage()
|
base.showPreviousPage()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Cura.PrimaryButton
|
Cura.PrimaryButton
|
||||||
{
|
{
|
||||||
id: connectButton
|
id: finishButton
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
text: catalog.i18nc("@button", "Finish")
|
text: catalog.i18nc("@button", "Finish")
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
CuraApplication.getDiscoveredPrintersModel().createMachineFromDiscoveredPrinter(discoveredPrinter)
|
Cura.API.account.test("Finish button pressed in AddCloudPrintersView.qml")
|
||||||
base.showNextPage()
|
base.showNextPage()
|
||||||
}
|
}
|
||||||
|
|
||||||
enabled: addPrinterByIpScreen.canAddPrinter
|
// enabled: 1 === 1 addPrinterByIpScreen.canAddPrinter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue