Commit cc30c9c6 authored by Don Gagne's avatar Don Gagne

Better upload progress indication

parent d30527f4
......@@ -154,6 +154,7 @@ void PlanMasterController::loadFromVehicle(void)
} else {
_loadGeoFence = true;
_syncInProgress = true;
emit syncInProgressChanged(true);
_missionController.loadFromVehicle();
setDirty(false);
}
......@@ -225,6 +226,8 @@ void PlanMasterController::sendToVehicle(void)
} else {
qCDebug(PlanMasterControllerLog) << "PlanMasterController::sendToVehicle start mission sendToVehicle";
_sendGeoFence = true;
_syncInProgress = true;
emit syncInProgressChanged(true);
_missionController.sendToVehicle();
setDirty(false);
}
......
......@@ -117,6 +117,8 @@ Rectangle {
on_ControllerProgressPctChanged: {
if (_controllerProgressPct === 1) {
missionStats.visible = false
uploadCompleteText.visible = true
resetProgressTimer.start()
} else if (_controllerProgressPct > 0) {
progressBar.visible = true
......@@ -125,8 +127,12 @@ Rectangle {
Timer {
id: resetProgressTimer
interval: 1000
onTriggered: progressBar.visible = false
interval: 5000
onTriggered: {
missionStats.visible = true
uploadCompleteText.visible = false
progressBar.visible = false
}
}
Rectangle {
......@@ -139,15 +145,29 @@ Rectangle {
visible: false
}
QGCLabel {
id: uploadCompleteText
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: logoRow.right
anchors.right: uploadButton.left
font.pointSize: ScreenTools.largeFontPointSize
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: "Done"
visible: false
}
GridLayout {
anchors.top: parent.top
anchors.bottom: parent.bottom
id: missionStats
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.leftMargin: _margins
anchors.rightMargin: _margins
anchors.left: logoRow.right
anchors.right: uploadButton.visible ? uploadButton.left : parent.right
columnSpacing: 0//_margins
columns: 3
columnSpacing: 0
columns: 3
GridLayout {
anchors.verticalCenter: parent.verticalCenter
......@@ -278,10 +298,10 @@ Rectangle {
anchors.rightMargin: _margins
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
text: _controllerDirty ? qsTr("Upload Required") : qsTr("Upload")
text: _controllerSyncInProgress ? qsTr("Uploading...") : (_controllerDirty ? qsTr("Upload Required") : qsTr("Upload"))
enabled: !_controllerSyncInProgress
visible: !_controllerOffline
primary: _controllerDirty
primary: _controllerDirty && !_controllerSyncInProgress
onClicked: planMasterController.upload()
PropertyAnimation on opacity {
......@@ -289,7 +309,7 @@ Rectangle {
from: 0.5
to: 1
loops: Animation.Infinite
running: _controllerDirty
running: _controllerDirty && !_controllerSyncInProgress
alwaysRunToEnd: true
duration: 2000
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment