AppBase::ProgressDisplay Class Reference

#include <ProgressDisplay.h>

Inheritance diagram for AppBase::ProgressDisplay:

Inheritance graph
[legend]
List of all members.

Public Member Functions

void setMessage (const std::string &message, const std::string &filename="")
 sets the message to given string
void taskFinished ()
 call when a task has finished and the status message should be cleared
bool updateDisplay ()
 updates the display, return true, if update was successfull, false if cancel was pressed
bool updateDisplay (const std::string &message)
bool updateDisplayValue ()
void setMaximum (int newMaximum)
 sets the new maximum value of the progress value
bool wasCancelled ()
 return true, if process should be canceled by user e.g.

Protected Member Functions

 ProgressDisplay (int maximum=0)
 constructor
virtual void updateProgressDisplay ()=0
 Template method, updates the display.

Protected Attributes

bool m_canceled
std::string m_message
std::string m_filename
int m_maximum
int m_progress

Detailed Description

Definition at line 41 of file ProgressDisplay.h.


Constructor & Destructor Documentation

AppBase::ProgressDisplay::ProgressDisplay ( int  maximum = 0  )  [inline, explicit, protected]

constructor

Definition at line 45 of file ProgressDisplay.h.


Member Function Documentation

void AppBase::ProgressDisplay::setMaximum ( int  newMaximum  ) 

sets the new maximum value of the progress value

Definition at line 64 of file ProgressDisplay.cpp.

References m_maximum, and m_progress.

void AppBase::ProgressDisplay::setMessage ( const std::string message,
const std::string filename = "" 
)

sets the message to given string

Reimplemented in ProgressReporterDialog.

Definition at line 31 of file ProgressDisplay.cpp.

References m_filename, m_message, and updateProgressDisplay().

Referenced by correctImage(), HuginBase::Nona::TiffMultiLayerRemapper< ImageType, AlphaImageType >::finalizeOutputFile(), HuginBase::Nona::FileRemapper< ImageType, AlphaType >::getRemapped(), HuginBase::SmallRemappedImageCache::getRemapped(), loadImgsAndExtractPoints(), main(), HuginBase::Nona::TiffMultiLayerRemapper< ImageType, AlphaImageType >::prepareOutputFile(), HuginBase::Nona::MultiImageRemapper< vigra::FRGBImage, AlphaImageType >::prepareOutputFile(), HuginBase::Nona::remapImage(), HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::remapImage(), HuginBase::PointSampler::sampleAndExtractPoints(), HuginBase::Nona::MultiImageRemapper< vigra::FRGBImage, AlphaImageType >::saveRemapped(), HuginBase::Nona::detail::saveRemapped(), HuginBase::Nona::SimpleStitcher< ImageType, AlphaType >::stitch(), HuginBase::Nona::ReduceStitcher< ImageType, AlphaType >::stitch(), HuginBase::Nona::WeightedStitcher< ImageType, AlphaType >::stitch(), taskFinished(), and updateDisplay().

void AppBase::ProgressDisplay::taskFinished (  ) 

call when a task has finished and the status message should be cleared

Definition at line 38 of file ProgressDisplay.cpp.

References setMessage().

Referenced by HuginBase::Nona::TiffMultiLayerRemapper< ImageType, AlphaImageType >::finalizeOutputFile(), HuginBase::Nona::MultiImageRemapper< vigra::FRGBImage, AlphaImageType >::finalizeOutputFile(), loadImgsAndExtractPoints(), main(), HuginBase::Nona::SimpleStitcher< ImageType, AlphaType >::stitch(), and HuginBase::Nona::MultiImageRemapper< vigra::FRGBImage, AlphaImageType >::stitch().

bool AppBase::ProgressDisplay::updateDisplay ( const std::string message  ) 

Definition at line 48 of file ProgressDisplay.cpp.

References m_canceled, and setMessage().

bool AppBase::ProgressDisplay::updateDisplay (  ) 

updates the display, return true, if update was successfull, false if cancel was pressed

Definition at line 43 of file ProgressDisplay.cpp.

References m_canceled.

Referenced by HuginBase::PhotometricOptimizer::photometricVis().

bool AppBase::ProgressDisplay::updateDisplayValue (  ) 

Definition at line 54 of file ProgressDisplay.cpp.

References m_canceled, m_maximum, m_progress, and updateProgressDisplay().

Referenced by HuginBase::getCPoutsideLimit_pair().

virtual void AppBase::ProgressDisplay::updateProgressDisplay (  )  [protected, pure virtual]

Template method, updates the display.

You should override this method with your code of updating the display.

Implemented in ProgressReporterDialog, LensCalFrame, MainFrame, PreviewFrame, AppBase::DummyProgressDisplay, and AppBase::StreamProgressDisplay.

Referenced by setMessage(), and updateDisplayValue().

bool AppBase::ProgressDisplay::wasCancelled (  ) 

return true, if process should be canceled by user e.g.

user pressed cancel button

Definition at line 73 of file ProgressDisplay.cpp.

References m_canceled.

Referenced by AppBase::ProgressReporterAdaptor::increaseProgress().


Member Data Documentation

bool AppBase::ProgressDisplay::m_canceled [protected]

Definition at line 69 of file ProgressDisplay.h.

Referenced by updateDisplay(), ProgressReporterDialog::updateDisplay(), updateDisplayValue(), ProgressReporterDialog::updateProgressDisplay(), and wasCancelled().

std::string AppBase::ProgressDisplay::m_filename [protected]

Reimplemented in MainFrame.

Definition at line 71 of file ProgressDisplay.h.

Referenced by setMessage(), AppBase::StreamProgressDisplay::updateProgressDisplay(), PreviewFrame::updateProgressDisplay(), and LensCalFrame::updateProgressDisplay().

int AppBase::ProgressDisplay::m_maximum [protected]

Definition at line 72 of file ProgressDisplay.h.

Referenced by setMaximum(), and updateDisplayValue().

std::string AppBase::ProgressDisplay::m_message [protected]

Definition at line 70 of file ProgressDisplay.h.

Referenced by setMessage(), AppBase::StreamProgressDisplay::updateProgressDisplay(), PreviewFrame::updateProgressDisplay(), MainFrame::updateProgressDisplay(), and LensCalFrame::updateProgressDisplay().

int AppBase::ProgressDisplay::m_progress [protected]

Reimplemented in LensCalFrame.

Definition at line 73 of file ProgressDisplay.h.

Referenced by setMaximum(), updateDisplayValue(), and ProgressReporterDialog::updateProgressDisplay().


The documentation for this class was generated from the following files:
Generated on 30 Aug 2015 for Hugintrunk by  doxygen 1.4.7