casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Slots | Signals | Public Member Functions | Protected Member Functions | Private Slots | Private Attributes | List of all members
casa::QtProgressWidget Class Reference

GUI for displaying progress information. More...

#include <QtProgressWidget.qo.h>

Inheritance diagram for casa::QtProgressWidget:
casa::ProgressMonitor

Public Slots

void initialize (const QString &operationName)
 Initializes the GUI with the given operation name. More...
 
void setStatus (const QString &status)
 Sets the status to the given. More...
 
void setProgress (unsigned int progress)
 Sets the progress percentage (0 - 100) to the given. More...
 
void setProgress (unsigned int progress, const QString &status)
 Sets the progress percentage (0 - 100) and the status to the given. More...
 
void finalize ()
 Finalizes the GUI. More...
 

Signals

void backgroundRequested ()
 Signal for when the user requests "background" for the thread. More...
 
void pauseRequested ()
 Signal for when the user requests "pause" for the thread. More...
 
void resumeRequested ()
 Signal for when the user requests "resume" for the thread. More...
 
void cancelRequested ()
 Signal for when the user requests "cancel" for the thread. More...
 

Public Member Functions

 QtProgressWidget (bool allowBackground=true, bool allowPauseResume=true, bool allowCancel=true, bool isDialog=true, bool useCompact=false, QWidget *parent=NULL)
 Constructor which takes the PlotMS parent an optional parent widget. More...
 
 ~QtProgressWidget ()
 Destructor. More...
 
void setAllowedOperations (bool background, bool pauseResume, bool cancel)
 Sets which operations the user can request using this widget. More...
 
QMutex & mutex ()
 Returns the mutex used for this widget. More...
 
void initialize (const casacore::String &operationName)
 Initialize the monitor with the identifying operation. More...
 
void setProgress (unsigned int progress, const casacore::String &status)
 Set the progress to a specific amount and status. More...
 
- Public Member Functions inherited from casa::ProgressMonitor
virtual void finalize ()=0
 Stop the progress. More...
 

Protected Member Functions

void closeEvent (QCloseEvent *event)
 Overrides QWidget::closeEvent(). More...
 
- Protected Member Functions inherited from casa::ProgressMonitor
 ProgressMonitor ()
 
virtual ~ProgressMonitor ()
 

Private Slots

void background ()
 For the "background" button. More...
 
void pauseResume (bool pause)
 For the "pause"/"resume" button. More...
 
void cancel ()
 For the "cancel" button. More...
 

Private Attributes

QMutex itsMutex_
 Mutex. More...
 
Ui::ProgressWidget * itsProgress_
 casacore::Normal widget. More...
 
Ui::ProgressCompactWidget * itsCompactProgress_
 Compact widget. More...
 

Detailed Description

GUI for displaying progress information.

It also shows "background", "cancel", and "pause/resume" buttons for the user. The parent of this widget is responsible for implementing these behaviors as needed.

Definition at line 41 of file QtProgressWidget.qo.h.

Constructor & Destructor Documentation

casa::QtProgressWidget::QtProgressWidget ( bool  allowBackground = true,
bool  allowPauseResume = true,
bool  allowCancel = true,
bool  isDialog = true,
bool  useCompact = false,
QWidget *  parent = NULL 
)

Constructor which takes the PlotMS parent an optional parent widget.

casa::QtProgressWidget::~QtProgressWidget ( )

Destructor.

Member Function Documentation

void casa::QtProgressWidget::background ( )
privateslot

For the "background" button.

void casa::QtProgressWidget::backgroundRequested ( )
signal

Signal for when the user requests "background" for the thread.

void casa::QtProgressWidget::cancel ( )
privateslot

For the "cancel" button.

void casa::QtProgressWidget::cancelRequested ( )
signal

Signal for when the user requests "cancel" for the thread.

void casa::QtProgressWidget::closeEvent ( QCloseEvent *  event)
protected

Overrides QWidget::closeEvent().

Connects closing to the "background" signal.

void casa::QtProgressWidget::finalize ( )
slot

Finalizes the GUI.

Should be called after the operation ends.

void casa::QtProgressWidget::initialize ( const casacore::String )
virtual

Initialize the monitor with the identifying operation.

Implements casa::ProgressMonitor.

void casa::QtProgressWidget::initialize ( const QString &  operationName)
slot

Initializes the GUI with the given operation name.

Should be called before the operation starts.

QMutex& casa::QtProgressWidget::mutex ( )

Returns the mutex used for this widget.

void casa::QtProgressWidget::pauseRequested ( )
signal

Signal for when the user requests "pause" for the thread.

void casa::QtProgressWidget::pauseResume ( bool  pause)
privateslot

For the "pause"/"resume" button.

void casa::QtProgressWidget::resumeRequested ( )
signal

Signal for when the user requests "resume" for the thread.

void casa::QtProgressWidget::setAllowedOperations ( bool  background,
bool  pauseResume,
bool  cancel 
)
virtual

Sets which operations the user can request using this widget.

Implements casa::ProgressMonitor.

void casa::QtProgressWidget::setProgress ( unsigned int  int,
const casacore::String  
)
virtual

Set the progress to a specific amount and status.

Implements casa::ProgressMonitor.

void casa::QtProgressWidget::setProgress ( unsigned int  progress)
slot

Sets the progress percentage (0 - 100) to the given.

void casa::QtProgressWidget::setProgress ( unsigned int  progress,
const QString &  status 
)
slot

Sets the progress percentage (0 - 100) and the status to the given.

void casa::QtProgressWidget::setStatus ( const QString &  status)
slot

Sets the status to the given.

Member Data Documentation

Ui::ProgressCompactWidget* casa::QtProgressWidget::itsCompactProgress_
private

Compact widget.

Definition at line 107 of file QtProgressWidget.qo.h.

QMutex casa::QtProgressWidget::itsMutex_
private

Mutex.

Definition at line 101 of file QtProgressWidget.qo.h.

Ui::ProgressWidget* casa::QtProgressWidget::itsProgress_
private

casacore::Normal widget.

Definition at line 104 of file QtProgressWidget.qo.h.


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