Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AppBase::ProgressDisplay Class Referenceabstract

#include <ProgressDisplay.h>

Inheritance diagram for AppBase::ProgressDisplay:
Inheritance graph

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
 

Detailed Description

Definition at line 41 of file ProgressDisplay.h.

Constructor & Destructor Documentation

AppBase::ProgressDisplay::ProgressDisplay ( int  maximum = 0)
inlineexplicitprotected

constructor

Definition at line 45 of file ProgressDisplay.h.

virtual AppBase::ProgressDisplay::~ProgressDisplay ( )
inlinevirtual

Definition at line 48 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.

Referenced by HuginBase::CalculateOptimalROIOutside::CalcOutsideCrop().

void AppBase::ProgressDisplay::setMessage ( const std::string &  message,
const std::string &  filename = "" 
)
void AppBase::ProgressDisplay::taskFinished ( )
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 ( )
virtual void AppBase::ProgressDisplay::updateProgressDisplay ( )
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().

Member Data Documentation

bool AppBase::ProgressDisplay::m_canceled
protected
std::string AppBase::ProgressDisplay::m_filename
protected
int AppBase::ProgressDisplay::m_maximum
protected

Definition at line 73 of file ProgressDisplay.h.

Referenced by setMaximum(), and updateDisplayValue().

std::string AppBase::ProgressDisplay::m_message
protected
int AppBase::ProgressDisplay::m_progress
protected

The documentation for this class was generated from the following files: