libpromeki main
PROfessional MEdia toolKIt
 
Loading...
Searching...
No Matches
progressbar.h
Go to the documentation of this file.
1
8#pragma once
9
11#include <promeki/tui/widget.h>
12
14
20class TuiProgressBar : public TuiWidget {
21 PROMEKI_OBJECT(TuiProgressBar, TuiWidget)
22 public:
24 ~TuiProgressBar() override;
25
26 void setValue(int value);
27 int value() const { return _value; }
28
29 void setRange(int min, int max);
30 int minimum() const { return _min; }
31 int maximum() const { return _max; }
32
33 Size2Di32 sizeHint() const override;
34
35 protected:
36 void paintEvent(TuiPaintEvent *e) override;
37
38 private:
39 int _value = 0;
40 int _min = 0;
41 int _max = 100;
42};
43
Dynamic array container wrapping std::vector.
Definition list.h:40
Base object for promeki.
Definition objectbase.h:129
ObjectBase * parent() const
Returns the parent object, if one. nullptr if none.
Definition objectbase.h:258
Event delivered when a TUI widget needs to repaint.
Definition widget.h:28
Horizontal progress indicator.
Definition progressbar.h:20
void paintEvent(TuiPaintEvent *e) override
Called to paint the widget. Override in subclasses.
Size2Di32 sizeHint() const override
Returns the preferred size. Override in subclasses.
Base class for all TUI widgets.
Definition widget.h:88
#define PROMEKI_NAMESPACE_BEGIN
Starts a promeki namespace block.
Definition namespace.h:14
#define PROMEKI_NAMESPACE_END
Ends a promeki namespace block.
Definition namespace.h:19
const T & value(const Result< T > &r)
Returns the value from a Result.
Definition result.h:56