diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-09-09 13:02:39 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-09-09 13:02:39 -0700 |
commit | 2025bc1b2bd2e52f27edb67a418e1519d3d664d8 (patch) | |
tree | 68c3991f21abdbdc9801c434b8d841c217d65d43 /qt-ui/mainwindow.h | |
parent | 2c74a8c315441b95da98e3f4b35db1b9eefb76ff (diff) | |
download | subsurface-2025bc1b2bd2e52f27edb67a418e1519d3d664d8.tar.gz |
Replace the spinner with a progress dialog for cloud storage access
Since the spinner caused all kinds of problems inside VMs, wasn't shown at
all for some people on Win10 and appeared to get stuck a lot and still
left people with the perception that Subsurface was hung, this patch takes
a more traditional approach and gives the user a progress dialog.
An additional benefit of this is that the user now can cancel a hung
transfer.
The slightly weird passing in of the callback allows for the separation of
UI and core logic code...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.h')
-rw-r--r-- | qt-ui/mainwindow.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h index 713ab9d61..9ff2a2041 100644 --- a/qt-ui/mainwindow.h +++ b/qt-ui/mainwindow.h @@ -11,11 +11,11 @@ #include <QAction> #include <QUrl> #include <QUuid> +#include <QProgressDialog> #include "ui_mainwindow.h" #include "notificationwidget.h" #include "windowtitleupdate.h" -#include "qtwaitingspinner.h" struct DiveList; class QSortFilterProxyModel; @@ -174,6 +174,7 @@ slots: void on_actionConfigure_Dive_Computer_triggered(); void setDefaultState(); void setAutomaticTitle(); + void cancelCloudStorageOperation(); protected: void closeEvent(QCloseEvent *); @@ -193,8 +194,6 @@ slots: void planCreated(); void setEnabledToolbar(bool arg1); void setPlanNotes(); - void startSpinner(); - void stopSpinner(); private: Ui::MainWindow ui; @@ -208,6 +207,8 @@ private: bool askSaveChanges(); bool okToClose(QString message); void closeCurrentFile(); + void showProgressBar(); + void hideProgressBar(); void writeSettings(); int file_save(); int file_save_as(); @@ -249,7 +250,6 @@ private: QHash<QByteArray, PropertiesForQuadrant> stateProperties; WindowTitleUpdate *wtu; - QtWaitingSpinner *spinner; }; #endif // MAINWINDOW_H |