9 #ifndef PROGRESSINDICATOR_H
10 #define PROGRESSINDICATOR_H
146 std::cout <<
title() <<
": "
147 << std::setprecision(3) << std::setw(4)
150 if( !
label().empty() )
151 std::cout <<
"(" <<
label() <<
") ";
163 #endif // PROGRESSINDICATOR_H
int m_maxValue
Definition: ProgressIndicator.h:122
bool poll(int progress)
Definition: ProgressIndicator.h:59
Definition: ProgressIndicator.h:132
void step()
Definition: ProgressIndicator.h:80
bool m_canceled
Definition: ProgressIndicator.h:120
std::string title() const
Definition: ProgressIndicator.h:113
void onStart()
Definition: ProgressIndicator.h:141
int progress() const
Definition: ProgressIndicator.h:109
int minValue() const
Definition: ProgressIndicator.h:110
virtual ~ProgressIndicator()
Definition: ProgressIndicator.h:48
void setRange(int min, int max)
Definition: ProgressIndicator.h:85
virtual void onRangeChange(int, int)
Definition: ProgressIndicator.h:56
virtual void setLabel(const std::string &label)
Definition: ProgressIndicator.h:97
int maxValue() const
Definition: ProgressIndicator.h:111
std::string & title()
Definition: ProgressIndicator.h:114
bool onPoll()
Definition: ProgressIndicator.h:144
virtual void onFinish()=0
ConsoleProgressIndicator()
Definition: ProgressIndicator.h:135
virtual void setTitle(const std::string &title)
Definition: ProgressIndicator.h:92
void start()
Definition: ProgressIndicator.h:66
std::string label() const
Definition: ProgressIndicator.h:115
ProgressIndicator(int min=0, int max=100)
Definition: ProgressIndicator.h:40
std::string & label()
Definition: ProgressIndicator.h:116
int m_minValue
Definition: ProgressIndicator.h:121
std::string m_label
Definition: ProgressIndicator.h:125
bool wasCanceled() const
Definition: ProgressIndicator.h:108
int m_progress
Definition: ProgressIndicator.h:119
void onFinish()
Definition: ProgressIndicator.h:142
void finish()
Definition: ProgressIndicator.h:73
std::string m_title
Definition: ProgressIndicator.h:124
Interface for a polling-based progress indicator (e.g. progress bar)
Definition: ProgressIndicator.h:37
float percentage() const
Definition: ProgressIndicator.h:102