aboutsummaryrefslogtreecommitdiff
path: root/editor/progress_dialog.h
diff options
context:
space:
mode:
authorRémi Verschelde2017-03-05 16:44:50 +0100
committerRémi Verschelde2017-03-05 16:44:50 +0100
commit5dbf1809c6e3e905b94b8764e99491e608122261 (patch)
tree5e5a5360db15d86d59ec8c6e4f7eb511388c5a9a /editor/progress_dialog.h
parent45438e9918d421b244bfd7776a30e67dc7f2d3e3 (diff)
downloadgodot-5dbf180.tar.gz
godot-5dbf180.tar.zst
godot-5dbf180.zip
A Whole New World (clang-format edition)
I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
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 60acf825a..346d6a58b 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();
};