|
CEDRIC
Revision_backup-2009-02
|
Interface for a polling-based progress indicator (e.g. progress bar) More...
#include <ProgressIndicator.h>
Public Member Functions | |
| ProgressIndicator (int min=0, int max=100) | |
| virtual | ~ProgressIndicator () |
| bool | poll (int progress) |
| void | start () |
| void | finish () |
| void | step () |
| void | setRange (int min, int max) |
| virtual void | setTitle (const std::string &title) |
| virtual void | setLabel (const std::string &label) |
| float | percentage () const |
| bool | wasCanceled () const |
| int | progress () const |
| int | minValue () const |
| int | maxValue () const |
| std::string | title () const |
| std::string & | title () |
| std::string | label () const |
| std::string & | label () |
Protected Member Functions | |
| virtual bool | onPoll ()=0 |
| virtual void | onStart ()=0 |
| virtual void | onFinish ()=0 |
| virtual void | onRangeChange (int, int) |
Protected Attributes | |
| int | m_progress |
| bool | m_canceled |
| int | m_minValue |
| int | m_maxValue |
| std::string | m_title |
| std::string | m_label |
Interface for a polling-based progress indicator (e.g. progress bar)
A ProgressIndicator can be used as a commucation channel between a program part which does heavy calculations (like loading huge files from disk) and some kind of main program which handles the gui. It uses a single threaded polling mechanism, where it is thought to derives this class and implement following functions
It is up to the processing task to poll the ProgressIndicator periodically and check isCanceled() to see if he should stop his operation. To make the progress indicator work the loading process must call setRange() to set the progress indicator up and then start() and finish() before the first and after his last call to poll().
|
inline |
|
inlinevirtual |
|
inline |
References m_maxValue, m_progress, onFinish(), and poll().
Referenced by EventNavigator::computeClustering(), EventNavigator::computeSignatures(), EventNavigator::createMap(), createSignaturesAll(), MainWindow::openRootFile(), and EventMap::progress().
|
inline |
References m_label.
Referenced by GlobalProgressIndicator::onPoll(), ConsoleProgressIndicator::onPoll(), GlobalProgressIndicator::onStart(), and setLabel().
|
inline |
References m_label.
|
inline |
References m_maxValue.
|
inline |
References m_minValue.
Referenced by GlobalProgressIndicator::onStart().
|
protectedpure virtual |
Implemented in ConsoleProgressIndicator, and GlobalProgressIndicator.
Referenced by finish().
|
protectedpure virtual |
Implemented in ConsoleProgressIndicator, and GlobalProgressIndicator.
Referenced by poll().
|
inlineprotectedvirtual |
Reimplemented in GlobalProgressIndicator.
Referenced by setRange().
|
protectedpure virtual |
Implemented in ConsoleProgressIndicator, and GlobalProgressIndicator.
Referenced by start().
|
inline |
References m_maxValue, m_minValue, and m_progress.
Referenced by ConsoleProgressIndicator::onPoll().
|
inline |
References m_canceled, m_progress, onPoll(), and progress().
Referenced by EventNavigator::computeClustering(), createSignaturesAll(), finish(), MainWindow::loadSetup(), MainWindow::openRootFile(), EventMap::progress(), MainWindow::selectEvent(), and step().
|
inline |
References m_progress.
Referenced by MainWindow::loadSetup(), GlobalProgressIndicator::onPoll(), poll(), and MainWindow::selectEvent().
|
inlinevirtual |
References label(), and m_label.
Referenced by EventMap::progress(), and GlobalProgressIndicator::setLabel().
|
inline |
References m_maxValue, m_minValue, and onRangeChange().
Referenced by EventNavigator::computeClustering(), createSignaturesAll(), MainWindow::openRootFile(), and EventMap::progress().
|
inlinevirtual |
References m_title, and title().
Referenced by GlobalProgressIndicator::setTitle().
|
inline |
References m_canceled, m_minValue, m_progress, and onStart().
Referenced by EventNavigator::computeClustering(), createSignaturesAll(), MainWindow::openRootFile(), and EventMap::progress().
|
inline |
References m_progress, and poll().
|
inline |
References m_title.
Referenced by ConsoleProgressIndicator::onPoll(), GlobalProgressIndicator::onStart(), and setTitle().
|
inline |
References m_title.
|
inline |
References m_canceled.
Referenced by EventNavigator::computeClustering(), and EventMap::wasCanceled().
|
protected |
Referenced by poll(), start(), and wasCanceled().
|
protected |
Referenced by label(), and setLabel().
|
protected |
Referenced by finish(), maxValue(), percentage(), and setRange().
|
protected |
Referenced by minValue(), percentage(), setRange(), and start().
|
protected |
Referenced by finish(), percentage(), poll(), progress(), start(), and step().
|
protected |
Referenced by setTitle(), and title().
1.8.6