1
0
Fork 0

Launcher: spinner when adding a catalog

This commit is contained in:
James Turner 2018-05-09 19:43:44 +01:00
parent 57a866fc60
commit 8738e18921

View file

@ -37,6 +37,13 @@ Rectangle {
placeholder: "http://www.flightgear.org/hangars/some-catalog.xml" placeholder: "http://www.flightgear.org/hangars/some-catalog.xml"
} }
AnimatedImage {
id: spinner
anchors.horizontalCenter: parent.horizontalCenter
source: "qrc:///linear-spinner"
playing: true
}
Item { Item {
id: buttonBox id: buttonBox
width: parent.width width: parent.width
@ -138,6 +145,7 @@ Rectangle {
PropertyChanges { target: addCatalogPromptText; text: qsTr("Click here to add a new aircraft hangar. (Note this requires an Internet connection)"); clickable: true } PropertyChanges { target: addCatalogPromptText; text: qsTr("Click here to add a new aircraft hangar. (Note this requires an Internet connection)"); clickable: true }
PropertyChanges { target: addCatalogUrlEntry; visible: false; text: "" } // reset URL on cancel / success PropertyChanges { target: addCatalogUrlEntry; visible: false; text: "" } // reset URL on cancel / success
PropertyChanges { target: buttonBox; visible: false } PropertyChanges { target: buttonBox; visible: false }
PropertyChanges { target: spinner; visible: false }
}, },
State { State {
@ -145,6 +153,7 @@ Rectangle {
PropertyChanges { target: addCatalogPromptText; text: qsTr("Enter a hangar location (URL) to add."); clickable: false } PropertyChanges { target: addCatalogPromptText; text: qsTr("Enter a hangar location (URL) to add."); clickable: false }
PropertyChanges { target: addCatalogUrlEntry; visible: true } PropertyChanges { target: addCatalogUrlEntry; visible: true }
PropertyChanges { target: buttonBox; visible: true } PropertyChanges { target: buttonBox; visible: true }
PropertyChanges { target: spinner; visible: false }
}, },
State { State {
@ -152,6 +161,7 @@ Rectangle {
PropertyChanges { target: addCatalogPromptText; text: qsTr("Retrieving hangar information..."); clickable: false } PropertyChanges { target: addCatalogPromptText; text: qsTr("Retrieving hangar information..."); clickable: false }
PropertyChanges { target: addCatalogUrlEntry; visible: false } PropertyChanges { target: addCatalogUrlEntry; visible: false }
PropertyChanges { target: addCatalogProceedButton; enabled: false } PropertyChanges { target: addCatalogProceedButton; enabled: false }
PropertyChanges { target: spinner; visible: true }
}, },
@ -160,6 +170,7 @@ Rectangle {
PropertyChanges { target: addCatalogPromptText; text: qsTr("There was a problem adding the hangar: %1.").arg(addErrorMessage()); clickable: false } PropertyChanges { target: addCatalogPromptText; text: qsTr("There was a problem adding the hangar: %1.").arg(addErrorMessage()); clickable: false }
PropertyChanges { target: addCatalogUrlEntry; visible: true } PropertyChanges { target: addCatalogUrlEntry; visible: true }
PropertyChanges { target: addCatalogProceedButton; enabled: true } PropertyChanges { target: addCatalogProceedButton; enabled: true }
PropertyChanges { target: spinner; visible: false }
} }
] ]
} }