![]() |
Diana Software
|
one-line description of your QObject More...
Public Member Functions | |
| QProgressBar (uint64_t total_iterations, string description="Progress", bool leave=true, int step=1, bool enable=true, std::ostream &out=std::cout) | |
| QProgressBar (const QProgressBar &other) | |
| QProgressBar () | |
| ~QProgressBar () | |
| void | Clear () |
| clear members More... | |
| void | SetIterations (uint64_t total_iterations) |
| void | SetDescription (string description) |
| void | IncrementIter (bool printbar=true) |
| void | Print (string message, bool isbar=false) const |
| QProgressBar & | operator= (const QProgressBar &other) |
Protected Attributes | |
| std::ostream & | foutstream |
Private Member Functions | |
| void | get_terminal_size () |
| void | PrintBar () |
| QObjectDef (QProgressBar, 2) | |
Private Attributes | |
| bool | fleave |
| uint64_t | fNumOfIters |
| uint64_t | fCurrentIter |
| uint64_t | fstep |
| string | fdesc |
| std::ostringstream | bar |
| size_t | terminalwidth |
| bool | fEnabled |
one-line description of your QObject
Simple Implementation of a progress bar in c++ Usage: int numIter=1000; QProgressBar chbar((uint64_t)numIter,"MyDescription",true,1);//the last three arguments are optional for(int i=0;i<numIter;i++){ <dosomething>; if(condition){ chbar.Print("MyMessage");//Way to print messages without breaking the charging bar } chbar.IncrementIter(); }
Definition at line 34 of file QProgressBar.hh.
|
inline |
Definition at line 37 of file QProgressBar.hh.
References Clear(), fEnabled, fleave, fstep, get_terminal_size(), SetDescription(), and SetIterations().
|
inline |
Definition at line 51 of file QProgressBar.hh.
|
inline |
Definition at line 56 of file QProgressBar.hh.
References Clear().
|
inline |
Definition at line 62 of file QProgressBar.hh.
References Clear().
|
inline |
clear members
Definition at line 64 of file QProgressBar.hh.
References fCurrentIter, fdesc, fEnabled, fleave, fNumOfIters, foutstream, fstep, get_terminal_size(), and terminalwidth.
Referenced by QProgressBar(), and ~QProgressBar().
|
inlineprivate |
Definition at line 143 of file QProgressBar.hh.
References terminalwidth.
Referenced by Clear(), operator=(), and QProgressBar().
|
inline |
Definition at line 91 of file QProgressBar.hh.
References fCurrentIter, fEnabled, fleave, fNumOfIters, foutstream, fstep, PrintBar(), and terminalwidth.
|
inline |
Definition at line 128 of file QProgressBar.hh.
References bar, fCurrentIter, fdesc, fEnabled, fleave, fNumOfIters, and get_terminal_size().
|
inline |
Definition at line 112 of file QProgressBar.hh.
References bar, fEnabled, foutstream, and terminalwidth.
Referenced by PrintBar().
|
inlineprivate |
Definition at line 154 of file QProgressBar.hh.
References bar, fCurrentIter, fdesc, fNumOfIters, Print(), and terminalwidth.
Referenced by IncrementIter().
|
private |
|
inline |
|
inline |
Definition at line 82 of file QProgressBar.hh.
References fNumOfIters, and fstep.
Referenced by QProgressBar().
|
private |
Definition at line 182 of file QProgressBar.hh.
Referenced by operator=(), Print(), and PrintBar().
|
private |
Definition at line 177 of file QProgressBar.hh.
Referenced by Clear(), IncrementIter(), operator=(), and PrintBar().
|
private |
Definition at line 180 of file QProgressBar.hh.
Referenced by Clear(), operator=(), PrintBar(), and SetDescription().
|
private |
Definition at line 184 of file QProgressBar.hh.
Referenced by Clear(), IncrementIter(), operator=(), Print(), and QProgressBar().
|
private |
Definition at line 174 of file QProgressBar.hh.
Referenced by Clear(), IncrementIter(), operator=(), and QProgressBar().
|
private |
Definition at line 176 of file QProgressBar.hh.
Referenced by Clear(), IncrementIter(), operator=(), PrintBar(), and SetIterations().
|
protected |
Definition at line 140 of file QProgressBar.hh.
Referenced by Clear(), IncrementIter(), and Print().
|
private |
Definition at line 178 of file QProgressBar.hh.
Referenced by Clear(), IncrementIter(), QProgressBar(), and SetIterations().
|
private |
Definition at line 183 of file QProgressBar.hh.
Referenced by Clear(), get_terminal_size(), IncrementIter(), Print(), and PrintBar().