diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2023-08-02 18:35:35 +0200 |
---|---|---|
committer | Sefa Eyeoglu <contact@scrumplex.net> | 2023-08-02 18:35:35 +0200 |
commit | 1d468ac35ad88d8c77cc83f25e3704d9bd7df01b (patch) | |
tree | 8644b1574c947a1a87c5c7b2567f746cfe17882f /launcher/ui/dialogs/ProgressDialog.h | |
parent | ce2ca1381519a2e261d7f76dffa874d559d979c2 (diff) | |
download | PrismLauncher-1d468ac35ad88d8c77cc83f25e3704d9bd7df01b.tar.gz PrismLauncher-1d468ac35ad88d8c77cc83f25e3704d9bd7df01b.tar.bz2 PrismLauncher-1d468ac35ad88d8c77cc83f25e3704d9bd7df01b.zip |
chore: reformat
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'launcher/ui/dialogs/ProgressDialog.h')
-rw-r--r-- | launcher/ui/dialogs/ProgressDialog.h | 47 |
1 files changed, 19 insertions, 28 deletions
diff --git a/launcher/ui/dialogs/ProgressDialog.h b/launcher/ui/dialogs/ProgressDialog.h index f062be08..82067271 100644 --- a/launcher/ui/dialogs/ProgressDialog.h +++ b/launcher/ui/dialogs/ProgressDialog.h @@ -33,13 +33,12 @@ * limitations under the License. */ - #pragma once #include <QDialog> -#include <memory> #include <QHash> #include <QUuid> +#include <memory> #include "QObjectPtr.h" #include "tasks/Task.h" @@ -49,60 +48,52 @@ class Task; class SequentialTask; -namespace Ui -{ +namespace Ui { class ProgressDialog; } -class ProgressDialog : public QDialog -{ +class ProgressDialog : public QDialog { Q_OBJECT -public: - explicit ProgressDialog(QWidget *parent = 0); + public: + explicit ProgressDialog(QWidget* parent = 0); ~ProgressDialog(); void updateSize(bool recenterParent = false); int execWithTask(Task* task); - int execWithTask(std::unique_ptr<Task> &&task); - int execWithTask(std::unique_ptr<Task> &task); + int execWithTask(std::unique_ptr<Task>&& task); + int execWithTask(std::unique_ptr<Task>& task); void setSkipButton(bool present, QString label = QString()); - Task *getTask(); + Task* getTask(); -public -slots: + public slots: void onTaskStarted(); void onTaskFailed(QString failure); void onTaskSucceeded(); - void changeStatus(const QString &status); + void changeStatus(const QString& status); void changeProgress(qint64 current, qint64 total); void changeStepProgress(TaskStepProgress const& task_progress); - -private -slots: + private slots: void on_skipButton_clicked(bool checked); -protected: - virtual void keyPressEvent(QKeyEvent *e); - virtual void closeEvent(QCloseEvent *e); + protected: + virtual void keyPressEvent(QKeyEvent* e); + virtual void closeEvent(QCloseEvent* e); -private: - bool handleImmediateResult(QDialog::DialogCode &result); + private: + bool handleImmediateResult(QDialog::DialogCode& result); void addTaskProgress(TaskStepProgress const& progress); -private: - Ui::ProgressDialog *ui; + private: + Ui::ProgressDialog* ui; - Task *task; + Task* task; bool m_is_multi_step = false; QHash<QUuid, SubTaskProgressBar*> taskProgress; - - }; - |