Gaia
|
This class is a very simple class which allows you to print a progress percentage on the standard output. More...
#include <textprogress.h>
Public Member Functions | |
TextProgress (int total, QString format="[%1/%2] (%3% done)...", UpdateType t=UpdateOnPercent) | |
int | total () const |
void | setTotal (int total) |
void | update () |
Updates the counter, ie: displays its state on the standard output. | |
void | update (int value) |
Updates the counter to given value, then display its state on the standard output. More... | |
void | setSilent (bool silent) |
bool | isSilent () |
Protected Attributes | |
QString | _display |
int | _total |
int | _current |
int | _previous |
int | _fieldWidth |
UpdateType | _updateType |
bool | _silent |
This class is a very simple class which allows you to print a progress percentage on the standard output.
It is initialized with the value to be reached (which represents 100%) and then your only task is to feed it with the progress value and it will display itself correctly.
|
inline |
Updates the counter to given value, then display its state on the standard output.
value | the value of the counter. |
References update().