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

Subclass of PlotMSThread that handles following the progress of canvas drawing. More...

#include <PlotMSDrawThread.qo.h>

Inheritance diagram for casa::PlotMSDrawThread:
casa::PlotMSThread casa::PlotOperationWatcher casa::ThreadController casa::ThreadCommunication

Public Member Functions

 PlotMSDrawThread (PlotMSPlotter *plotter, QtProgressWidget *progress, PMSPTMethod postThreadMethod=NULL, PMSPTObject postThreadObject=NULL)
 Constructor which takes the plotter, and optional post-thread method parameters. More...
 
 ~PlotMSDrawThread ()
 Destructor. More...
 
void updatePlotterCanvases ()
 Updates the internal list of canvases based upon the parent PlotMSPlotter. More...
 
virtual void startOperation ()
 Implements PlotMSThread::startOperation(). More...
 
bool isDrawing () const
 
void operationChanged (const PlotOperation &operation)
 Implements PlotOperationWatcher::operationChanged(). More...
 
virtual QString getName () const
 
- Public Member Functions inherited from casa::PlotMSThread
 PlotMSThread (QtProgressWidget *progress, PMSPTMethod postThreadMethod=NULL, PMSPTObject postThreadObject=NULL)
 Constructor which takes the progress widget to use, and an optional post-thread method that should be called when the thread is finished. More...
 
virtual ~PlotMSThread ()
 Destructor. More...
 
virtual void finished ()
 IMPLEMENTED METHODS //. More...
 
virtual void initializeProgress (const casacore::String &operationName)
 Overridden from BackgroundThread in order to update the progress widget on the GUI thread. More...
 
virtual void setProgress (unsigned int progress, const casacore::String &status)
 
virtual void finishProgress ()
 
int getId ()
 
virtual bool isCacheThread () const
 
- Public Member Functions inherited from casa::ThreadController
 ThreadController (ProgressMonitor *progress, PMSPTMethod postThreadMethod=NULL, PMSPTObject postThreadObject=NULL)
 Constructor which takes the progress widget to use, and an optional post-thread method that should be called when the thread is finished. More...
 
virtual ~ThreadController ()
 
virtual void setError (const casacore::String &errorMessage)
 
virtual void setStatus (const casacore::String &status)
 Allows the cache to set the status. More...
 
virtual void setProgress (unsigned int progress)
 Allows the cache to set the progress. More...
 
virtual void setAllowedOperations (bool background, bool pauseResume, bool cancel)
 
 Work classes can specify whether they support background operation, pause/resume,

and cancelling. More...

 
virtual bool wasCanceled () const
 Callback for classes doing the work to check whether they should cancel what they are doing or not. More...
 
void setWorkThread (BackgroundThread *workThread)
 
virtual void background ()
 For when the user requests "background" for the thread. More...
 
virtual void pause ()
 For when the user requests "pause" for the thread. More...
 
virtual void resume ()
 For when the user requests "resume" for the thread. More...
 
virtual void postThreadMethod ()
 Executes the post-thread method as needed. More...
 
bool getResult () const
 Returns the result of the background operation. More...
 
casacore::String getError () const
 Returns any error from the background operation. More...
 
bool isErrorWarning () const
 
casacore::String getErrorTitle () const
 
PlotMSPlotgetPlot ()
 
- Public Member Functions inherited from casa::PlotOperationWatcher
 PlotOperationWatcher ()
 Constructor. More...
 
virtual ~PlotOperationWatcher ()
 Destructor. More...
 

Protected Member Functions

void cancel ()
 For when the user requests "cancel" for the thread. More...
 
- Protected Member Functions inherited from casa::PlotMSThread
virtual void threadFinished ()
 Allows subclasses to override and do any clean-up they need to once the background thread has completed. More...
 
void signalFinishedOperation (PlotMSThread *thread)
 Signal that clean-up and thread work is done. More...
 
- Protected Member Functions inherited from casa::ThreadController
void startThread ()
 Starts the thread. More...
 
- Protected Member Functions inherited from casa::ThreadCommunication
 ThreadCommunication ()
 
virtual ~ThreadCommunication ()
 

Private Member Functions

 PlotMSDrawThread (const PlotMSDrawThread &other)
 
PlotMSDrawThread operator= (const PlotMSDrawThread &other)
 

Private Attributes

PlotMSPlotteritsPlotter_
 
std::vector< PlotOperationPtritsOperations_
 Operations. More...
 
QMutex itsOperationsMutex_
 casacore::Mutex for accessing operations. More...
 
bool isRunning_
 Flag for if thread is currently running or not. More...
 
bool itsOperationFlag_
 Flag indicating that one or more operations tried to call operationChanged() while the operations mutex was locked. More...
 

Additional Inherited Members

- Signals inherited from casa::PlotMSThread
void finishedOperation (PlotMSThread *thread)
 This signal MUST be emitted after start() has been called, and when the operation has finished. More...
 
void updateProgress (unsigned int value, const QString &statusStr)
 
void initProgress (const QString &operationName)
 
void finalizeProgress ()
 
- Protected Slots inherited from casa::PlotMSThread
void cancelThread ()
 For when the user requests "cancel" for the thread. More...
 
- Protected Attributes inherited from casa::ThreadController
volatile bool wasCanceled_
 Flag for whether thread was canceled or not. More...
 
casacore::String error
 Holds error messages. More...
 
casacore::String errorTitle
 
bool errorWarning
 
ProgressMonitoritsProgressWidget_
 Progress widget. More...
 
PMSPTMethoditsPostThreadMethod_
 Method/Object to run when thread is finished. More...
 
PMSPTObject itsPostThreadObject_
 

Detailed Description

Subclass of PlotMSThread that handles following the progress of canvas drawing.

Definition at line 43 of file PlotMSDrawThread.qo.h.

Constructor & Destructor Documentation

casa::PlotMSDrawThread::PlotMSDrawThread ( PlotMSPlotter plotter,
QtProgressWidget progress,
PMSPTMethod  postThreadMethod = NULL,
PMSPTObject  postThreadObject = NULL 
)

Constructor which takes the plotter, and optional post-thread method parameters.

casa::PlotMSDrawThread::~PlotMSDrawThread ( )

Destructor.

casa::PlotMSDrawThread::PlotMSDrawThread ( const PlotMSDrawThread other)
private

Member Function Documentation

void casa::PlotMSDrawThread::cancel ( )
protectedvirtual

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

Reimplemented from casa::ThreadController.

virtual QString casa::PlotMSDrawThread::getName ( ) const
virtual

Implements casa::PlotMSThread.

bool casa::PlotMSDrawThread::isDrawing ( ) const
void casa::PlotMSDrawThread::operationChanged ( const PlotOperation operation)
virtual
PlotMSDrawThread casa::PlotMSDrawThread::operator= ( const PlotMSDrawThread other)
private
virtual void casa::PlotMSDrawThread::startOperation ( )
virtual
void casa::PlotMSDrawThread::updatePlotterCanvases ( )

Updates the internal list of canvases based upon the parent PlotMSPlotter.

Member Data Documentation

bool casa::PlotMSDrawThread::isRunning_
private

Flag for if thread is currently running or not.

Definition at line 88 of file PlotMSDrawThread.qo.h.

bool casa::PlotMSDrawThread::itsOperationFlag_
private

Flag indicating that one or more operations tried to call operationChanged() while the operations mutex was locked.

Definition at line 92 of file PlotMSDrawThread.qo.h.

std::vector<PlotOperationPtr> casa::PlotMSDrawThread::itsOperations_
private

Operations.

Definition at line 82 of file PlotMSDrawThread.qo.h.

QMutex casa::PlotMSDrawThread::itsOperationsMutex_
private

casacore::Mutex for accessing operations.

Definition at line 85 of file PlotMSDrawThread.qo.h.

PlotMSPlotter* casa::PlotMSDrawThread::itsPlotter_
private

Definition at line 79 of file PlotMSDrawThread.qo.h.


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