Add busyIndicator and text in AddCloudPrintersView

CURA-7022
This commit is contained in:
Kostas Karmas 2020-04-23 15:10:45 +02:00
parent 15e7cb44af
commit 1aea28a8eb

View file

@ -18,16 +18,66 @@ Item
id: addCloudPrinterScreen
Label
property bool searchingForCloudPrinters: true
Rectangle
{
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
id: cloudPrintersContent
//color: "steelblue"
//opacity: 0.3
width: parent.width
border.width: 1
anchors
{
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
@ -38,23 +88,23 @@ Item
text: catalog.i18nc("@button", "Add printer manually")
onClicked:
{
CuraApplication.getDiscoveredPrintersModel().cancelCurrentManualDeviceRequest()
Cura.API.account.test("Back button pressed in AddCloudPrintersView.qml")
base.showPreviousPage()
}
}
Cura.PrimaryButton
{
id: connectButton
id: finishButton
anchors.right: parent.right
anchors.bottom: parent.bottom
text: catalog.i18nc("@button", "Finish")
onClicked:
{
CuraApplication.getDiscoveredPrintersModel().createMachineFromDiscoveredPrinter(discoveredPrinter)
Cura.API.account.test("Finish button pressed in AddCloudPrintersView.qml")
base.showNextPage()
}
enabled: addPrinterByIpScreen.canAddPrinter
// enabled: 1 === 1 addPrinterByIpScreen.canAddPrinter
}
}