Hugin trunk 0.1
Loading...
Searching...
No Matches
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
 
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 successful, 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

◆ ProgressDisplay()

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

constructor

Definition at line 45 of file ProgressDisplay.h.

◆ ~ProgressDisplay()

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

Definition at line 48 of file ProgressDisplay.h.

Member Function Documentation

◆ setMaximum()

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, m_progress, and threshold().

◆ setMessage()

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

◆ taskFinished()

void AppBase::ProgressDisplay::taskFinished ( )

◆ updateDisplay() [1/2]

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.

◆ updateDisplay() [2/2]

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

Definition at line 48 of file ProgressDisplay.cpp.

References m_canceled, setMessage(), and threshold().

◆ updateDisplayValue()

bool AppBase::ProgressDisplay::updateDisplayValue ( )

Definition at line 54 of file ProgressDisplay.cpp.

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

◆ updateProgressDisplay()

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 ProgressReporterDialog, LensCalFrame, MainFrame, PreviewFrame, ToolboxFrame, AppBase::DummyProgressDisplay, and AppBase::StreamProgressDisplay.

Referenced by setMessage(), and updateDisplayValue().

◆ wasCancelled()

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.

Member Data Documentation

◆ m_canceled

bool AppBase::ProgressDisplay::m_canceled
protected

◆ m_filename

std::string AppBase::ProgressDisplay::m_filename
protected

◆ m_maximum

int AppBase::ProgressDisplay::m_maximum
protected

Definition at line 73 of file ProgressDisplay.h.

Referenced by setMaximum(), and updateDisplayValue().

◆ m_message

std::string AppBase::ProgressDisplay::m_message
protected

◆ m_progress

int AppBase::ProgressDisplay::m_progress
protected

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