Gaia
gaia2::TextProgress Class Reference

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
 

Detailed Description

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.

Member Function Documentation

void gaia2::TextProgress::update ( int  value)
inline

Updates the counter to given value, then display its state on the standard output.

Parameters
valuethe value of the counter.

References update().


The documentation for this class was generated from the following file: