diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-03-22 02:49:14 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-03-22 02:49:45 +0100 |
commit | c3b0c1ba68c79c4df1efed8b6d12b1d60187c9a6 (patch) | |
tree | 9d8f6754eb3779373fb3a6f16bca3c3a53d39232 /LibGUI/GProgressBar.h | |
parent | 23fe630057473a1e25723429832f818b84ec41aa (diff) | |
download | serenity-c3b0c1ba68c79c4df1efed8b6d12b1d60187c9a6.zip |
LibGUI: Add a GProgressBar widget.
Diffstat (limited to 'LibGUI/GProgressBar.h')
-rw-r--r-- | LibGUI/GProgressBar.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/LibGUI/GProgressBar.h b/LibGUI/GProgressBar.h new file mode 100644 index 0000000000..6768e28871 --- /dev/null +++ b/LibGUI/GProgressBar.h @@ -0,0 +1,22 @@ +#pragma once + +#include <LibGUI/GWidget.h> + +class GProgressBar : public GWidget { +public: + explicit GProgressBar(GWidget* parent); + virtual ~GProgressBar() override; + + void set_range(int min, int max); + void set_value(int); + + int value() const { return m_value; } + +protected: + virtual void paint_event(GPaintEvent&) override; + +private: + int m_min { 0 }; + int m_max { 100 }; + int m_value { 0 }; +}; |