From 78cdded90273fe6fd00cdd856fae3e54186c725b Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 15 Jan 2014 15:33:04 +0700 Subject: 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 --- qt-ui/subsurfacewebservices.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'qt-ui/subsurfacewebservices.cpp') 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); -- cgit v1.2.3-70-g09d2