Hugintrunk
0.1
|
#include <ProgressDisplay.h>
Public Member Functions | |
virtual | ~ProgressDisplay () |
void | setMessage (const std::string &message, const std::string &filename="") |
sets the message to given string More... | |
void | taskFinished () |
call when a task has finished and the status message should be cleared More... | |
bool | updateDisplay () |
updates the display, return true, if update was successful, false if cancel was pressed More... | |
bool | updateDisplay (const std::string &message) |
bool | updateDisplayValue () |
void | setMaximum (int newMaximum) |
sets the new maximum value of the progress value More... | |
bool | wasCancelled () |
return true, if process should be canceled by user e.g. More... | |
Protected Member Functions | |
ProgressDisplay (int maximum=0) | |
constructor More... | |
virtual void | updateProgressDisplay ()=0 |
Template method, updates the display. More... | |
Protected Attributes | |
bool | m_canceled |
std::string | m_message |
std::string | m_filename |
int | m_maximum |
int | m_progress |
Definition at line 41 of file ProgressDisplay.h.
|
inlineexplicitprotected |
constructor
Definition at line 45 of file ProgressDisplay.h.
|
inlinevirtual |
Definition at line 48 of file ProgressDisplay.h.
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.
Referenced by HuginBase::CalculateOptimalROIOutside::CalcOutsideCrop().
void AppBase::ProgressDisplay::setMessage | ( | const std::string & | message, |
const std::string & | filename = "" |
||
) |
sets the message to given string
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::ImageCache::getImage(), HuginBase::SmallRemappedImageCache::getRemapped(), HuginBase::Nona::FileRemapper< ImageType, AlphaType >::getRemapped(), HuginBase::ImageCache::getSmallImage(), loadImgsAndExtractPoints(), main(), HuginBase::Nona::MultiImageRemapper< ImageType, AlphaImageType >::prepareOutputFile(), HuginBase::Nona::TiffMultiLayerRemapper< ImageType, AlphaImageType >::prepareOutputFile(), HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::remapImage(), HuginBase::Nona::remapImage(), HuginBase::PointSampler::sampleAndExtractPoints(), HuginBase::Nona::detail::saveRemapped(), HuginBase::Nona::MultiImageRemapper< ImageType, AlphaImageType >::saveRemapped(), HuginBase::Nona::WeightedStitcher< ImageType, AlphaType >::stitch(), HuginBase::Nona::ReduceStitcher< ImageType, AlphaType >::stitch(), HuginBase::Nona::SimpleStitcher< 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::MultiImageRemapper< ImageType, AlphaImageType >::finalizeOutputFile(), HuginBase::Nona::TiffMultiLayerRemapper< ImageType, AlphaImageType >::finalizeOutputFile(), HuginBase::ImageCache::getImage(), HuginBase::ImageCache::getSmallImage(), loadImgsAndExtractPoints(), main(), HuginBase::Nona::MultiImageRemapper< ImageType, AlphaImageType >::stitch(), and HuginBase::Nona::SimpleStitcher< ImageType, AlphaType >::stitch().
bool AppBase::ProgressDisplay::updateDisplay | ( | ) |
updates the display, return true, if update was successful, false if cancel was pressed
Definition at line 43 of file ProgressDisplay.cpp.
References m_canceled.
Referenced by HuginBase::PhotometricOptimizer::photometricVis().
bool AppBase::ProgressDisplay::updateDisplay | ( | const std::string & | message | ) |
Definition at line 48 of file ProgressDisplay.cpp.
References m_canceled, and setMessage().
bool AppBase::ProgressDisplay::updateDisplayValue | ( | ) |
Definition at line 54 of file ProgressDisplay.cpp.
References m_canceled, m_maximum, m_progress, and updateProgressDisplay().
Referenced by HuginBase::CalculateOptimalROIOutside::CalcOutsideCrop(), and HuginBase::getCPoutsideLimit_pair().
|
protectedpure virtual |
Template method, updates the display.
You should override this method with your code of updating the display.
Implemented in MainFrame, AppBase::StreamProgressDisplay, AppBase::DummyProgressDisplay, LensCalFrame, PreviewFrame, and ProgressReporterDialog.
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 HuginBase::CalculateOptimalROIOutside::CalcOutsideCrop().
|
protected |
Definition at line 70 of file ProgressDisplay.h.
Referenced by ProgressReporterDialog::updateDisplay(), updateDisplay(), updateDisplayValue(), ProgressReporterDialog::updateProgressDisplay(), and wasCancelled().
|
protected |
Definition at line 72 of file ProgressDisplay.h.
Referenced by setMessage(), PreviewFrame::updateProgressDisplay(), LensCalFrame::updateProgressDisplay(), and AppBase::StreamProgressDisplay::updateProgressDisplay().
|
protected |
Definition at line 73 of file ProgressDisplay.h.
Referenced by setMaximum(), and updateDisplayValue().
|
protected |
Definition at line 71 of file ProgressDisplay.h.
Referenced by setMessage(), PreviewFrame::updateProgressDisplay(), LensCalFrame::updateProgressDisplay(), AppBase::StreamProgressDisplay::updateProgressDisplay(), and MainFrame::updateProgressDisplay().
|
protected |
Definition at line 74 of file ProgressDisplay.h.
Referenced by setMaximum(), updateDisplayValue(), and ProgressReporterDialog::updateProgressDisplay().