1 #ifndef _Q_PROGRESSBAR_HH_
2 #define _Q_PROGRESSBAR_HH_
37 QProgressBar(uint64_t total_iterations,
string description=
"Progress",
bool leave=
true,
int step=1,
bool enable=
true,std::ostream& out=std::cout)
84 uint64_t sugg_step=total_iterations/1e4;
112 void Print(
string message,
bool isbar=
false)
const{
144 FILE* stream = popen(
"tput cols",
"r");
147 if (fgets(buffer,
sizeof(buffer), stream) != NULL) {
159 bar <<std::setw(6)<<std::setfill(
' ')<< std::fixed << std::setprecision(2) << doneperc*100;
163 size_t maxdonechar = (size_t)(doneperc * (
double)progresssize);
164 for(
size_t i =0;i<progresssize;i++){
one-line description of your QObject
void SetDescription(string description)
void Print(string message, bool isbar=false) const
std::ostream & foutstream
void IncrementIter(bool printbar=true)
QProgressBar & operator=(const QProgressBar &other)
QObjectDef(QProgressBar, 2)
QProgressBar(uint64_t total_iterations, string description="Progress", bool leave=true, int step=1, bool enable=true, std::ostream &out=std::cout)
void Clear()
clear members
QProgressBar(const QProgressBar &other)
void SetIterations(uint64_t total_iterations)