FIFE
be64c707dea6b3250bd4355bf5c825d25920087d
|
A simple percentage bar. More...
#include <percentagebar.h>
Inherits Widget.
Public Types | |
enum | Orientation { HORIZONTAL = 0, VERTICAL } |
Public Member Functions | |
PercentageBar () | |
Constructor. More... | |
virtual | ~PercentageBar () |
virtual void | draw (Graphics *graphics) |
void | setForegroundImage (Image *image) |
void | setOrientation (Orientation orientation) |
Sets the orientation of the percentage bar. More... | |
Orientation | getOrientation () const |
Gets the orientation of the percentage bar. More... | |
int32_t | getValue () const |
Gets the value of the percentage bar. More... | |
void | setValue (int32_t value) |
Sets the value of the percentage bar. More... | |
Protected Attributes | |
Image * | mImage |
double | mValue |
Holds the current value of the percentage bar. More... | |
Orientation | mOrientation |
Holds the orientation of the percentage bar. More... | |
A simple percentage bar.
Definition at line 45 of file percentagebar.h.
Enumerator | |
---|---|
HORIZONTAL | |
VERTICAL |
Definition at line 49 of file percentagebar.h.
fcn::PercentageBar::PercentageBar | ( | ) |
Constructor.
Definition at line 41 of file percentagebar.cpp.
References HORIZONTAL, mImage, setOrientation(), and setValue().
|
inlinevirtual |
Definition at line 60 of file percentagebar.h.
References draw(), getOrientation(), getValue(), setForegroundImage(), setOrientation(), and setValue().
|
virtual |
Definition at line 49 of file percentagebar.cpp.
References getOrientation(), HORIZONTAL, mImage, and mValue.
Referenced by ~PercentageBar().
PercentageBar::Orientation fcn::PercentageBar::getOrientation | ( | ) | const |
Gets the orientation of the percentage bar.
Definition at line 104 of file percentagebar.cpp.
References mOrientation.
Referenced by draw(), and ~PercentageBar().
int32_t fcn::PercentageBar::getValue | ( | ) | const |
Gets the value of the percentage bar.
Definition at line 94 of file percentagebar.cpp.
References mValue.
Referenced by ~PercentageBar().
void fcn::PercentageBar::setForegroundImage | ( | Image * | image | ) |
Definition at line 68 of file percentagebar.cpp.
References mImage.
Referenced by ~PercentageBar().
void fcn::PercentageBar::setOrientation | ( | PercentageBar::Orientation | orientation | ) |
Sets the orientation of the percentage bar.
orientation | The orientation of the percentage bar. |
Definition at line 99 of file percentagebar.cpp.
References mOrientation.
Referenced by PercentageBar(), and ~PercentageBar().
void fcn::PercentageBar::setValue | ( | int32_t | value | ) |
Sets the value of the percentage bar.
value | In the range of 0-100. |
Definition at line 77 of file percentagebar.cpp.
References mValue.
Referenced by PercentageBar(), and ~PercentageBar().
|
protected |
Definition at line 105 of file percentagebar.h.
Referenced by draw(), PercentageBar(), and setForegroundImage().
|
protected |
Holds the orientation of the percentage bar.
A percentage bar can be drawn vertically or horizontally.
Definition at line 116 of file percentagebar.h.
Referenced by getOrientation(), and setOrientation().
|
protected |
Holds the current value of the percentage bar.
Definition at line 110 of file percentagebar.h.
Referenced by draw(), getValue(), and setValue().