summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2015-01-20 22:49:56 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-21 17:04:52 +1200
commite8b02d3b2a9bd620e40d6444852c9d86fde41e66 (patch)
tree3dc8566aa51f65d789d8e2f2837de973fb490f2b /qt-ui
parentb0260c6025a0824ce0f1265615b2cb97251b93c1 (diff)
downloadsubsurface-e8b02d3b2a9bd620e40d6444852c9d86fde41e66.tar.gz
Add a QProgressDialog to auto-ostc3-firmware
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/configuredivecomputerdialog.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/qt-ui/configuredivecomputerdialog.cpp b/qt-ui/configuredivecomputerdialog.cpp
index 182bf76cb..2c2814dad 100644
--- a/qt-ui/configuredivecomputerdialog.cpp
+++ b/qt-ui/configuredivecomputerdialog.cpp
@@ -6,6 +6,7 @@
#include <QMessageBox>
#include <QSettings>
#include <QNetworkReply>
+#include <QProgressDialog>
struct product {
const char *product;
@@ -281,7 +282,13 @@ void OstcFirmwareCheck::saveOstcFirmware(QNetworkReply *reply)
file.open(QIODevice::WriteOnly);
file.write(firmwareData);
file.close();
+ QProgressDialog *dialog = new QProgressDialog("Updating firmware", "", 0, 100);
+ dialog->setCancelButton(0);
+ dialog->setAutoClose(true);
ConfigureDiveComputer *config = new ConfigureDiveComputer();
+ connect(config, SIGNAL(message(QString)), dialog, SLOT(setLabelText(QString)));
+ connect(config, SIGNAL(error(QString)), dialog, SLOT(setLabelText(QString)));
+ connect(config, SIGNAL(progress(int)), dialog, SLOT(setValue(int)));
config->startFirmwareUpdate(storeFirmware, &devData);
}