aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/dialogs/ProgressDialog.h
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-08-05 18:21:09 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-08-05 18:21:09 +0300
commit939a2d67ed75be714e9f3b1b918250d006b3860a (patch)
treec5700ba93652e26fc1f86235b1a278d90fd0ce91 /launcher/ui/dialogs/ProgressDialog.h
parent6f7d901a1f5c02e0629e4bae9172c04bb81ce0d9 (diff)
parentae793f6cf11658c9abc5111e82d5ba7b3e6af127 (diff)
downloadPrismLauncher-939a2d67ed75be714e9f3b1b918250d006b3860a.tar.gz
PrismLauncher-939a2d67ed75be714e9f3b1b918250d006b3860a.tar.bz2
PrismLauncher-939a2d67ed75be714e9f3b1b918250d006b3860a.zip
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into develop12
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher/ui/dialogs/ProgressDialog.h')
-rw-r--r--launcher/ui/dialogs/ProgressDialog.h49
1 files changed, 20 insertions, 29 deletions
diff --git a/launcher/ui/dialogs/ProgressDialog.h b/launcher/ui/dialogs/ProgressDialog.h
index fc9a0fbc..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();
+ 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;
-
-
};
-