casa
5.7.0-16
|
Subclass of PlotMSThread that handles following the progress of canvas drawing. More...
#include <PlotMSDrawThread.qo.h>
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 |
PlotMSPlot * | getPlot () |
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 | |
PlotMSPlotter * | itsPlotter_ |
std::vector< PlotOperationPtr > | itsOperations_ |
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 |
ProgressMonitor * | itsProgressWidget_ |
Progress widget. More... | |
PMSPTMethod * | itsPostThreadMethod_ |
Method/Object to run when thread is finished. More... | |
PMSPTObject | itsPostThreadObject_ |
Subclass of PlotMSThread that handles following the progress of canvas drawing.
Definition at line 43 of file PlotMSDrawThread.qo.h.
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.
|
private |
|
protectedvirtual |
For when the user requests "cancel" for the thread.
Reimplemented from casa::ThreadController.
|
virtual |
Implements casa::PlotMSThread.
bool casa::PlotMSDrawThread::isDrawing | ( | ) | const |
|
virtual |
Implements PlotOperationWatcher::operationChanged().
Implements casa::PlotOperationWatcher.
|
private |
|
virtual |
Implements PlotMSThread::startOperation().
Implements casa::PlotMSThread.
void casa::PlotMSDrawThread::updatePlotterCanvases | ( | ) |
Updates the internal list of canvases based upon the parent PlotMSPlotter.
|
private |
Flag for if thread is currently running or not.
Definition at line 88 of file PlotMSDrawThread.qo.h.
|
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.
|
private |
Operations.
Definition at line 82 of file PlotMSDrawThread.qo.h.
|
private |
casacore::Mutex for accessing operations.
Definition at line 85 of file PlotMSDrawThread.qo.h.
|
private |
Definition at line 79 of file PlotMSDrawThread.qo.h.