1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-07 07:47:36 +00:00

LibGUI: Add a GProgressBar widget.

This commit is contained in:
Andreas Kling 2019-03-22 02:49:14 +01:00
parent 23fe630057
commit c3b0c1ba68
4 changed files with 123 additions and 2 deletions

22
LibGUI/GProgressBar.h Normal file
View file

@ -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 };
};