aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/dialogs/ProgressDialog.h
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2023-08-04 19:42:36 +0200
committerGitHub <noreply@github.com>2023-08-04 19:42:36 +0200
commitae793f6cf11658c9abc5111e82d5ba7b3e6af127 (patch)
treeed41f30e2c0f02e4be1d42324b3f05fbab75b2cd /launcher/ui/dialogs/ProgressDialog.h
parent50c7d39e082f0a7dbd977401e16d5adf534d9770 (diff)
parent1d638e018ac40fbfb35dd117f9a948c0cf35eadd (diff)
downloadPrismLauncher-ae793f6cf11658c9abc5111e82d5ba7b3e6af127.tar.gz
PrismLauncher-ae793f6cf11658c9abc5111e82d5ba7b3e6af127.tar.bz2
PrismLauncher-ae793f6cf11658c9abc5111e82d5ba7b3e6af127.zip
Merge pull request #1459 from Scrumplex/format
Diffstat (limited to 'launcher/ui/dialogs/ProgressDialog.h')
-rw-r--r--launcher/ui/dialogs/ProgressDialog.h47
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;
-
-
};
-