diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-07-07 18:22:36 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-07-10 20:45:37 -0400 |
| commit | 89d0528a002a3cd7f0db47b2db53bdaf0e9c494d (patch) | |
| tree | ef1801c666fdbcb10d20232e6aaa3b085b074a0f /src/nxmaccessmanager.h | |
| parent | ea7ad772bbd971e398869d9b74b38d62c814bb02 (diff) | |
progress dialog now shows elapsed time in progress bar
Diffstat (limited to 'src/nxmaccessmanager.h')
| -rw-r--r-- | src/nxmaccessmanager.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/nxmaccessmanager.h b/src/nxmaccessmanager.h index 89438316..b20cb6e8 100644 --- a/src/nxmaccessmanager.h +++ b/src/nxmaccessmanager.h @@ -25,6 +25,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include <QTimer> #include <QNetworkReply> #include <QProgressDialog> +#include <QElapsedTimer> #include <set> namespace MOBase { class IPluginGame; } @@ -34,18 +35,22 @@ class ValidationProgressDialog : QObject Q_OBJECT; public: - ValidationProgressDialog(); + ValidationProgressDialog(std::chrono::seconds timeout); void setParentWidget(QWidget* w); - void show(); - void hide(); + void start(); + void stop(); private: + std::chrono::seconds m_timeout; std::unique_ptr<QDialog> m_dialogHolder; QDialog* m_dialog; QProgressBar* m_bar; + QTimer* m_timer; + QElapsedTimer m_elapsed; void onButton(QAbstractButton* b); + void onTimer(); }; |
