SourceXtractorPlusPlus
0.10
Please provide a description of the project.
|
Set of progress bars/information entries. More...
Public Member Functions | |
ProgressWidget (int height, int width, int y, int x, short done_color, short progress_color) | |
~ProgressWidget () | |
void | move (int y, int x) |
void | resize (int height, int width) |
unsigned | getHeight () const |
void | update (const std::list< ProgressInfo > &info) |
Private Member Functions | |
void | drawElapsed (size_t value_position, const std::chrono::steady_clock::duration &elapsed, int line) const |
void | drawProgressLine (int value_position, int bar_width, int line, const std::string &label, int total, int done) const |
Private Attributes | |
WINDOW * | m_window |
std::chrono::steady_clock::time_point | m_started |
short | m_done_color |
short | m_progress_color |
Set of progress bars/information entries.
Definition at line 486 of file ProgressNCurses.cpp.
|
inline |
Constructor
height | Height in lines |
width | Width in columns |
y | Start line |
x | Start column |
done_color | Color for the done part |
progress_color | Color for the progress bar |
Definition at line 503 of file ProgressNCurses.cpp.
|
inline |
|
inlineprivate |
Draw the elapsed counter
Definition at line 588 of file ProgressNCurses.cpp.
References std::ostringstream::fill(), m, m_window, s, std::setw(), and std::ostringstream::str().
Referenced by update().
|
inlineprivate |
Draw the set of progress bar/report on the bottom of the screen
Definition at line 609 of file ProgressNCurses.cpp.
References bar, std::string::c_str(), std::fixed(), m_done_color, m_progress_color, m_window, and std::setprecision().
Referenced by update().
|
inline |
Definition at line 542 of file ProgressNCurses.cpp.
References m_window.
|
inline |
Move the progress widget
y | Line |
x | Column |
Definition at line 522 of file ProgressNCurses.cpp.
|
inline |
Resize the progress widget
height | The height in lines |
width | The width in columns |
Definition at line 534 of file ProgressNCurses.cpp.
References m_window.
|
inline |
Update and redraw the progress information
Definition at line 549 of file ProgressNCurses.cpp.
References drawElapsed(), drawProgressLine(), m_started, m_window, and std::chrono::steady_clock::now().
|
private |
Definition at line 660 of file ProgressNCurses.cpp.
Referenced by drawProgressLine().
|
private |
Definition at line 660 of file ProgressNCurses.cpp.
Referenced by drawProgressLine().
|
private |
Definition at line 659 of file ProgressNCurses.cpp.
Referenced by update().
|
private |
Definition at line 658 of file ProgressNCurses.cpp.
Referenced by drawElapsed(), drawProgressLine(), getHeight(), move(), resize(), update(), and ~ProgressWidget().