summaryrefslogtreecommitdiff
path: root/editor/progress_dialog.h
diff options
context:
space:
mode:
Diffstat (limited to 'editor/progress_dialog.h')
-rw-r--r--editor/progress_dialog.h43
1 files changed, 18 insertions, 25 deletions
diff --git a/editor/progress_dialog.h b/editor/progress_dialog.h
index 60acf825a9..346d6a58b3 100644
--- a/editor/progress_dialog.h
+++ b/editor/progress_dialog.h
@@ -29,15 +29,14 @@
#ifndef PROGRESS_DIALOG_H
#define PROGRESS_DIALOG_H
-#include "scene/gui/popup.h"
#include "scene/gui/box_container.h"
-#include "scene/gui/progress_bar.h"
#include "scene/gui/label.h"
-
+#include "scene/gui/popup.h"
+#include "scene/gui/progress_bar.h"
class BackgroundProgress : public HBoxContainer {
- GDCLASS(BackgroundProgress,HBoxContainer);
+ GDCLASS(BackgroundProgress, HBoxContainer);
_THREAD_SAFE_CLASS_
@@ -45,59 +44,53 @@ class BackgroundProgress : public HBoxContainer {
HBoxContainer *hb;
ProgressBar *progress;
-
};
- Map<String,Task> tasks;
- Map<String,int> updates;
+ Map<String, Task> tasks;
+ Map<String, int> updates;
void _update();
protected:
-
- void _add_task(const String& p_task,const String& p_label, int p_steps);
- void _task_step(const String& p_task, int p_step=-1);
- void _end_task(const String& p_task);
+ void _add_task(const String &p_task, const String &p_label, int p_steps);
+ void _task_step(const String &p_task, int p_step = -1);
+ void _end_task(const String &p_task);
static void _bind_methods();
public:
- void add_task(const String& p_task,const String& p_label, int p_steps);
- void task_step(const String& p_task, int p_step=-1);
- void end_task(const String& p_task);
+ void add_task(const String &p_task, const String &p_label, int p_steps);
+ void task_step(const String &p_task, int p_step = -1);
+ void end_task(const String &p_task);
BackgroundProgress() {}
};
-
-
class ProgressDialog : public Popup {
- GDCLASS( ProgressDialog, Popup );
+ GDCLASS(ProgressDialog, Popup);
struct Task {
String task;
VBoxContainer *vb;
ProgressBar *progress;
Label *state;
-
};
- Map<String,Task> tasks;
+ Map<String, Task> tasks;
VBoxContainer *main;
uint64_t last_progress_tick;
static ProgressDialog *singleton;
void _popup();
-protected:
+protected:
void _notification(int p_what);
-public:
+public:
static ProgressDialog *get_singleton() { return singleton; }
- void add_task(const String& p_task,const String& p_label, int p_steps);
- void task_step(const String& p_task, const String& p_state, int p_step=-1, bool p_force_redraw=true);
- void end_task(const String& p_task);
-
+ void add_task(const String &p_task, const String &p_label, int p_steps);
+ void task_step(const String &p_task, const String &p_state, int p_step = -1, bool p_force_redraw = true);
+ void end_task(const String &p_task);
ProgressDialog();
};