libcrn
3.9.5
A document image processing library
|
Progress object associated with a widget. More...
#include <GtkCRNProgress.h>
Public Member Functions | |
Progress (const crn::String &name, size_t maxcount=100) | |
Constructor. More... | |
Progress (const crn::String &name, sigc::slot< void > execute_at_end, size_t maxcount=100) | |
Constructor. More... | |
virtual | ~Progress () override=default |
Destructor. More... | |
Gtk::ProgressBar & | GetProgressBar () |
Gets the Gtk progress bar. More... | |
const Gtk::ProgressBar & | GetProgressBar () const |
Gets the Gtk progress bar. More... | |
sigc::signal< void > | signal_end () |
Signal thrown when the progress reached 100%. More... | |
![]() | |
Progress (const String &nam, size_t maxcount=100) | |
Constructor. More... | |
Progress (const Progress &)=delete | |
Progress (Progress &&)=default | |
Progress & | operator= (const Progress &)=delete |
Progress & | operator= (Progress &&)=default |
void | Advance () |
Progresses of one step. More... | |
void | SetMaxCount (size_t maxcount, bool reset=true) |
Sets the total number of steps. More... | |
void | Reset () |
Resets the progress to 0. More... | |
void | SetType (Type typ) noexcept |
Sets the type of progress bar. More... | |
void | SetName (const crn::String &nam) |
Protected Member Functions | |
virtual void | display (const crn::String &msg) override |
Displays current progress on Gtk progress bar (thread safe) More... | |
Additional Inherited Members | |
![]() | |
enum | Type { Type::PERCENT = 0, Type::ABSOLUTE = 1 } |
![]() | |
String | name |
size_t | current |
size_t | end |
String | disp |
Type | type |
Progress object associated with a widget.
Definition at line 34 of file GtkCRNProgress.h.
GtkCRN::Progress::Progress | ( | const crn::String & | name, |
size_t | maxcount = 100 |
||
) |
Constructor.
Constructor
[in] | name | the label displayed on the progress bar |
[in] | maxcount | the number of calls to Advance() to reach 100% |
Definition at line 30 of file GtkCRNProgress.cpp.
GtkCRN::Progress::Progress | ( | const crn::String & | name, |
sigc::slot< void > | execute_at_end, | ||
size_t | maxcount = 100 |
||
) |
Constructor.
Constructor
[in] | name | the label displayed on the progress bar |
[in] | execute_at_end | the callback to call when the progress reaches 100% |
[in] | maxcount | the number of calls to Advance() to reach 100% |
Definition at line 43 of file GtkCRNProgress.cpp.
|
overridevirtualdefault |
Destructor.
Reimplemented from crn::Progress.
|
overrideprotectedvirtual |
Displays current progress on Gtk progress bar (thread safe)
Displays current progress on Gtk progress bar (thread safe)
[in] | msg | the text to display |
Implements crn::Progress.
Definition at line 55 of file GtkCRNProgress.cpp.
|
inline |
Gets the Gtk progress bar.
Definition at line 45 of file GtkCRNProgress.h.
|
inline |
Gets the Gtk progress bar.
Definition at line 47 of file GtkCRNProgress.h.
|
inline |
Signal thrown when the progress reached 100%.
Definition at line 50 of file GtkCRNProgress.h.