From 91ba4cf75ee30c64779edb5b7644e5a830de5026 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Mon, 14 Aug 2023 18:16:53 +0200 Subject: chore: reformat Signed-off-by: Sefa Eyeoglu --- launcher/ui/dialogs/ProgressDialog.h | 47 +++++++++++++++--------------------- 1 file changed, 19 insertions(+), 28 deletions(-) (limited to 'launcher/ui/dialogs/ProgressDialog.h') diff --git a/launcher/ui/dialogs/ProgressDialog.h b/launcher/ui/dialogs/ProgressDialog.h index 51700d87..15eadf4e 100644 --- a/launcher/ui/dialogs/ProgressDialog.h +++ b/launcher/ui/dialogs/ProgressDialog.h @@ -33,13 +33,12 @@ * limitations under the License. */ - #pragma once #include -#include #include #include +#include #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); - int execWithTask(std::unique_ptr &task); + int execWithTask(std::unique_ptr&& task); + int execWithTask(std::unique_ptr& 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 *m_task; + Task* m_task; bool m_is_multi_step = false; QHash taskProgress; - - }; - -- cgit