aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-15 15:33:04 +0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-15 15:33:04 +0700
commit78cdded90273fe6fd00cdd856fae3e54186c725b (patch)
tree383958bac89cf5c13fd0fcaae94eac876b3e20b5
parent07c116ecd211fc71fb42197a7b6c6e7491c8beb7 (diff)
downloadsubsurface-78cdded90273fe6fd00cdd856fae3e54186c725b.tar.gz
Improve the download from Subsurface webservice dialog
- make the User ID input field wide enough - use the progress bar for an explanatory text - mark it as 100% completed once the download succeeds Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/subsurfacewebservices.cpp6
-rw-r--r--qt-ui/webservices.ui5
2 files changed, 11 insertions, 0 deletions
diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp
index 30efbad93..fb437d11f 100644
--- a/qt-ui/subsurfacewebservices.cpp
+++ b/qt-ui/subsurfacewebservices.cpp
@@ -319,6 +319,9 @@ SubsurfaceWebServices::SubsurfaceWebServices(QWidget* parent, Qt::WindowFlags f)
ui.userID->setText(s.value("subsurface_webservice_uid").toString().toUpper());
hidePassword();
hideUpload();
+ ui.progressBar->setFormat("Enter User ID and click Download");
+ ui.progressBar->setRange(0,1);
+ ui.progressBar->setValue(-1);
}
void SubsurfaceWebServices::buttonClicked(QAbstractButton* button)
@@ -370,6 +373,7 @@ void SubsurfaceWebServices::startDownload()
request.setRawHeader("Accept", "text/xml");
reply = manager()->get(request);
ui.status->setText(tr("Connecting..."));
+ ui.progressBar->setEnabled(true);
ui.progressBar->setRange(0,0); // this makes the progressbar do an 'infinite spin'
ui.download->setEnabled(false);
ui.buttonBox->button(QDialogButtonBox::Apply)->setEnabled(false);
@@ -382,6 +386,8 @@ void SubsurfaceWebServices::downloadFinished()
return;
ui.progressBar->setRange(0,1);
+ ui.progressBar->setValue(1);
+ ui.progressBar->setFormat("%p%");
downloadedData = reply->readAll();
ui.download->setEnabled(true);
diff --git a/qt-ui/webservices.ui b/qt-ui/webservices.ui
index fc6d6bcd5..295c25218 100644
--- a/qt-ui/webservices.ui
+++ b/qt-ui/webservices.ui
@@ -31,6 +31,11 @@
<property name="placeholderText">
<string>Enter your ID here</string>
</property>
+ <property name="minimumSize">
+ <size>
+ <width>420</width>
+ </size>
+ </property>
</widget>
</item>
<item row="0" column="2">