AppBase::MultiProgressDisplay Class Reference

The progress display is used to report progress to another part of the program. More...

#include <ProgressDisplayOld.h>

Inheritance diagram for AppBase::MultiProgressDisplay:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 MultiProgressDisplay (double minPrintStep=0.02)
virtual ~MultiProgressDisplay ()
void pushTask (const ProgressTask &task)
 create a new progress display for a task.
void popTask ()
 remove a task from the progress display
void setShortMessage (const std::string &msg)
 change the message text of the current task
void setMessage (const std::string &msg)
 change the message text of the current task
void setProgress (double progress)
 set progress (affects this task and all tasks above it)
void increase ()
 increase progress by a substep.

Protected Member Functions

virtual void updateProgressDisplay ()
 template method, to update the display
virtual void taskAdded ()
 template method, called when a task is added
virtual void taskRemove ()
 template method, called just before the task is removed
void propagateProgress (double progress)
 propagate progress to next level

Protected Attributes

std::vector< ProgressTasktasks
double m_minProgressStep

Detailed Description

The progress display is used to report progress to another part of the program.

This enables the utility classes to report progress both to the statusbar if there is one, or a textmode, for applications without GUI, or no progress at all, with this default class.

This is the better class, and shows the whole hierachy of progress messages.

Definition at line 92 of file ProgressDisplayOld.h.


Constructor & Destructor Documentation

AppBase::MultiProgressDisplay::MultiProgressDisplay double  minPrintStep = 0.02  ) 
 

Definition at line 53 of file ProgressDisplayOld.cpp.

virtual AppBase::MultiProgressDisplay::~MultiProgressDisplay  )  [inline, virtual]
 

Definition at line 98 of file ProgressDisplayOld.h.


Member Function Documentation

void AppBase::MultiProgressDisplay::increase  ) 
 

increase progress by a substep.

Reimplemented in AppBase::DummyMultiProgressDisplay.

Definition at line 107 of file ProgressDisplayOld.cpp.

References setProgress(), and tasks.

Referenced by vigra_ext::nearestFeatureTransform().

void AppBase::MultiProgressDisplay::popTask  ) 
 

remove a task from the progress display

Reimplemented in AppBase::DummyMultiProgressDisplay.

Definition at line 68 of file ProgressDisplayOld.cpp.

References taskRemove(), tasks, and updateProgressDisplay().

Referenced by createCtrlPointsOld(), HuginBase::ImageCache::getImage(), HuginBase::SmallRemappedImageCache::getRemapped(), HuginBase::ImageCache::getSmallImage(), vigra_ext::nearestFeatureTransform(), vigra_ext::transformImageAlphaGPUIntern(), vigra_ext::transformImageAlphaIntern(), vigra_ext::transformImageDist(), vigra_ext::transformImageGPUIntern(), and vigra_ext::transformImageIntern().

void AppBase::MultiProgressDisplay::propagateProgress double  progress  )  [protected]
 

propagate progress to next level

Definition at line 114 of file ProgressDisplayOld.cpp.

References tasks.

Referenced by setProgress().

void AppBase::MultiProgressDisplay::pushTask const ProgressTask task  ) 
 

create a new progress display for a task.

once the operation is finished int must popTask() the progress display.

Parameters:
msg string of the message
subStepIncr finishing the subtask below increases the current progress by subTaskIncr

Reimplemented in AppBase::DummyMultiProgressDisplay.

Definition at line 59 of file ProgressDisplayOld.cpp.

References taskAdded(), tasks, and updateProgressDisplay().

Referenced by correctImage(), createCtrlPointsOld(), HuginBase::ImageCache::getImage(), HuginBase::SmallRemappedImageCache::getRemapped(), HuginBase::ImageCache::getSmallImage(), vigra_ext::nearestFeatureTransform(), vigra_ext::transformImageAlphaGPUIntern(), vigra_ext::transformImageAlphaIntern(), vigra_ext::transformImageDist(), vigra_ext::transformImageGPUIntern(), and vigra_ext::transformImageIntern().

void AppBase::MultiProgressDisplay::setMessage const std::string msg  ) 
 

change the message text of the current task

Reimplemented in LensCalFrame, MainFrame, and AppBase::DummyMultiProgressDisplay.

Definition at line 88 of file ProgressDisplayOld.cpp.

References tasks, and updateProgressDisplay().

Referenced by HuginBase::Nona::FileRemapper< ImageType, AlphaType >::getRemapped(), and HuginBase::Nona::remapImage().

void AppBase::MultiProgressDisplay::setProgress double  progress  ) 
 

set progress (affects this task and all tasks above it)

Reimplemented in AppBase::DummyMultiProgressDisplay.

Definition at line 95 of file ProgressDisplayOld.cpp.

References propagateProgress(), tasks, and updateProgressDisplay().

Referenced by createCtrlPointsOld(), increase(), vigra_ext::transformImageAlphaIntern(), vigra_ext::transformImageDist(), and vigra_ext::transformImageIntern().

void AppBase::MultiProgressDisplay::setShortMessage const std::string msg  ) 
 

change the message text of the current task

Reimplemented in AppBase::DummyMultiProgressDisplay.

Definition at line 80 of file ProgressDisplayOld.cpp.

References tasks, and updateProgressDisplay().

virtual void AppBase::MultiProgressDisplay::taskAdded  )  [inline, protected, virtual]
 

template method, called when a task is added

Reimplemented in AppBase::DummyMultiProgressDisplay, AppBase::MultiProgressDisplayAdaptor, and AppBase::StreamMultiProgressDisplay.

Definition at line 136 of file ProgressDisplayOld.h.

Referenced by pushTask().

virtual void AppBase::MultiProgressDisplay::taskRemove  )  [inline, protected, virtual]
 

template method, called just before the task is removed

Reimplemented in AppBase::DummyMultiProgressDisplay, AppBase::MultiProgressDisplayAdaptor, and AppBase::StreamMultiProgressDisplay.

Definition at line 141 of file ProgressDisplayOld.h.

Referenced by popTask().

virtual void AppBase::MultiProgressDisplay::updateProgressDisplay  )  [inline, protected, virtual]
 

template method, to update the display

should be provided by subclasses.

Reimplemented in MyProgressDialog, LensCalFrame, GLPreviewFrame, MainFrame, PreviewFrame, AppBase::DummyMultiProgressDisplay, AppBase::MultiProgressDisplayAdaptor, and AppBase::StreamMultiProgressDisplay.

Definition at line 133 of file ProgressDisplayOld.h.

Referenced by popTask(), pushTask(), setMessage(), setProgress(), and setShortMessage().


Member Data Documentation

double AppBase::MultiProgressDisplay::m_minProgressStep [protected]
 

Definition at line 149 of file ProgressDisplayOld.h.

std::vector<ProgressTask> AppBase::MultiProgressDisplay::tasks [protected]
 

Definition at line 148 of file ProgressDisplayOld.h.

Referenced by increase(), popTask(), propagateProgress(), pushTask(), setMessage(), setProgress(), and setShortMessage().


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 01:25:46 2014 for Hugintrunk by  doxygen 1.3.9.1