casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
casa::PlotMSPlot Class Reference

Abstract class for a single "plot" concept. More...

#include <PlotMSPlot.h>

Inheritance diagram for casa::PlotMSPlot:
casa::PlotMSParametersWatcher casa::PlotMSIterPlot casa::PlotMSMultiPlot casa::PlotMSOverPlot casa::PlotMSSinglePlot

List of all members.

Public Member Functions

 PlotMSPlot (PlotMSApp *parent)
 Non-Static //.
virtual ~PlotMSPlot ()
 Destructor.
virtual String name () const =0
 ABSTRACT METHODS //.
virtual String spectype () const
 Returns specialization Id for this plot.
virtual vector
< MaskedScatterPlotPtr
plots () const =0
 Returns the plots assigned to this plot.
virtual vector< PlotCanvasPtrcanvases () const =0
 Returns the canvases that have been assigned to this plot.
virtual void setupPlotSubtabs (PlotMSPlotTab &tab) const =0
 Sets up subtabs for the given plot tab, using the add/insert subtab methods.
virtual void attachToCanvases ()=0
 Attaches/Detaches internal plot objects to their assigned canvases.
virtual void detachFromCanvases ()=0
virtual void plotTabHasChanged (PlotMSPlotTab &tab)=0
 Called when the GUI settings in the plot tab have changed.
virtual const
PlotMSPlotParameters
parameters () const
 IMPLEMENTED METHODS //.
virtual PlotMSPlotParametersparameters ()
virtual vector< PlotCanvasPtrvisibleCanvases () const
 Returns the visible canvases (accessible via PlotMSPlotter::currentCanvases()) associated with this plot.
virtual PlotMSRegions selectedRegions () const
 Returns all selected regions on all canvases associated with this plot.
virtual PlotMSRegions visibleSelectedRegions () const
 Returns selected regions on all visible canvases (accessible via PlotMSPlotter::currentCanvases()) associated with this plot.
virtual bool initializePlot (PlotMSPages &pages)
 Initializes the plot with the given canvases.
virtual PlotMSCacheBasecache ()
 Gets the plot's data source.
virtual const PlotMSCacheBasecache () const
virtual Int iter ()
virtual PlotMSAppparent ()
 Gets the plot's parent.
virtual bool firstIter ()
 Steps the iteration.
virtual bool prevIter ()
virtual bool nextIter ()
virtual bool lastIter ()
virtual void parametersHaveChanged (const PlotMSWatchedParameters &params, int updateFlag)
 Implements PlotMSParametersWatcher::parametersHaveChanged().
virtual void plotDataChanged ()
 Calls the dataChanged() method on the MaskedScatterPlots.
virtual bool exportToFormat (const PlotExportFormat &format)
 Exports canvases associated with this plot to the given format.
virtual void canvasWasDisowned (PlotCanvasPtr canvas)
 This method should be called when the given canvas (which was owned by this plot) was disowned.

Static Public Member Functions

static PlotMSPlotParameters makeParameters (PlotMSApp *plotms)
 Static //.
static void makeParameters (PlotMSPlotParameters &params, PlotMSApp *plotms)
 Updates the given PlotMSPlotParameters to be suitable for use with this class, using the given PlotMS parent.

Protected Member Functions

virtual bool assignCanvases (PlotMSPages &pages)=0
 ABSTRACT METHODS //.
virtual bool initializePlot ()=0
 Initializes any internal plot objects, but does NOT set parameters or attach to canvases.
virtual bool parametersHaveChanged_ (const PlotMSWatchedParameters &params, int updateFlag, bool releaseWhenDone)=0
 Updates plot members for parameters specific to the child plot type.
virtual PlotMSRegions selectedRegions (const vector< PlotCanvasPtr > &canvases) const =0
 Helper method for selectedRegions() and visibleSelectedRegions() that returns the selected regions for plots in the given canvases.
virtual void constructorSetup ()
 IMPLEMENTED METHODS //.
virtual bool updateData ()
 Force data update by clearing the cache.
virtual bool allDrawingHeld ()
 Returns true if drawing is currently being held on all plot canvases, false otherwise.
virtual void holdDrawing ()
 Holds drawing on all plot canvases.
virtual void releaseDrawing ()
 Releases drawing on all plot canvases, which will also cause a redraw.

Protected Attributes

PlotMSAppitsParent_
 MEMBERS //.
PlotFactoryPtr itsFactory_
 Plot factory for generating plot objects as needed.
PlotMSPlotParameters itsParams_
 Parameters.
PlotMSCacheBaseitsCache_
 Cache.

Private Member Functions

 PlotMSPlot (const PlotMSPlot &copy)
 Disable copy constructor and operator for now.
PlotMSPlotoperator= (const PlotMSPlot &copy)

Detailed Description

Abstract class for a single "plot" concept.

Generally speaking this one plot handles one data source across potentially many scatter plots and canvases, separated by whatever criteria the subclasses decide on. The base class PlotMSPlot handles interfacing with the rest of PlotMS and MS file and selection, and provides some useful members and methods for subclasses.

Definition at line 49 of file PlotMSPlot.h.


Constructor & Destructor Documentation

Non-Static //.

Constructor which takes the parent PlotMS object. Starts out with default data parameters.

virtual casa::PlotMSPlot::~PlotMSPlot ( ) [virtual]

Destructor.

casa::PlotMSPlot::PlotMSPlot ( const PlotMSPlot copy) [private]

Disable copy constructor and operator for now.


Member Function Documentation

virtual bool casa::PlotMSPlot::allDrawingHeld ( ) [protected, virtual]

Returns true if drawing is currently being held on all plot canvases, false otherwise.

virtual bool casa::PlotMSPlot::assignCanvases ( PlotMSPages pages) [protected, pure virtual]

ABSTRACT METHODS //.

Generates and assigns canvases that this plot will be using, with the given PlotMSPages object. This is called when the plot is first created, and can be called by the plot itself if its canvas layout has changed (in which case this method should check for the canvases that have already been assigned to it in the page).

Implemented in casa::PlotMSIterPlot, casa::PlotMSSinglePlot, casa::PlotMSOverPlot, and casa::PlotMSMultiPlot.

virtual void casa::PlotMSPlot::attachToCanvases ( ) [pure virtual]

Attaches/Detaches internal plot objects to their assigned canvases.

Implemented in casa::PlotMSIterPlot, casa::PlotMSSinglePlot, casa::PlotMSOverPlot, and casa::PlotMSMultiPlot.

virtual PlotMSCacheBase& casa::PlotMSPlot::cache ( ) [inline, virtual]

Gets the plot's data source.

Definition at line 130 of file PlotMSPlot.h.

References itsCache_.

virtual const PlotMSCacheBase& casa::PlotMSPlot::cache ( ) const [inline, virtual]

Definition at line 131 of file PlotMSPlot.h.

References itsCache_.

virtual vector<PlotCanvasPtr> casa::PlotMSPlot::canvases ( ) const [pure virtual]

Returns the canvases that have been assigned to this plot.

Implemented in casa::PlotMSIterPlot, casa::PlotMSSinglePlot, casa::PlotMSOverPlot, and casa::PlotMSMultiPlot.

virtual void casa::PlotMSPlot::canvasWasDisowned ( PlotCanvasPtr  canvas) [virtual]

This method should be called when the given canvas (which was owned by this plot) was disowned.

virtual void casa::PlotMSPlot::constructorSetup ( ) [protected, virtual]

IMPLEMENTED METHODS //.

Note: this method MUST be called in the constructor of any children classes.

Reimplemented in casa::PlotMSIterPlot, casa::PlotMSSinglePlot, casa::PlotMSMultiPlot, and casa::PlotMSOverPlot.

virtual void casa::PlotMSPlot::detachFromCanvases ( ) [pure virtual]
virtual bool casa::PlotMSPlot::exportToFormat ( const PlotExportFormat format) [virtual]

Exports canvases associated with this plot to the given format.

Exports to multiple files if the plot has more than one canvas.

virtual bool casa::PlotMSPlot::firstIter ( ) [inline, virtual]

Steps the iteration.

Reimplemented in casa::PlotMSIterPlot, and casa::PlotMSOverPlot.

Definition at line 139 of file PlotMSPlot.h.

References casa::False.

virtual void casa::PlotMSPlot::holdDrawing ( ) [protected, virtual]

Holds drawing on all plot canvases.

virtual bool casa::PlotMSPlot::initializePlot ( PlotMSPages pages) [virtual]

Initializes the plot with the given canvases.

Initializes any internal plot objects via the protected initializePlot() method, then assigns the plot objects to the canvases via the protected assignCanvases() method, then calls parametersUpdated() to properly set the plot. Drawing is held before these operations, and then released afterwards. Returns true if all operations succeeded; false if at least one failed.

virtual bool casa::PlotMSPlot::initializePlot ( ) [protected, pure virtual]

Initializes any internal plot objects, but does NOT set parameters or attach to canvases.

Will only be called ONCE, before assignCanvases and parametersUpdated, as long as the public initializePlot method is not overridden. Returns true for success, false for failure.

Implemented in casa::PlotMSIterPlot, casa::PlotMSSinglePlot, casa::PlotMSOverPlot, and casa::PlotMSMultiPlot.

virtual Int casa::PlotMSPlot::iter ( ) [inline, virtual]

Reimplemented in casa::PlotMSIterPlot, and casa::PlotMSOverPlot.

Definition at line 132 of file PlotMSPlot.h.

virtual bool casa::PlotMSPlot::lastIter ( ) [inline, virtual]

Reimplemented in casa::PlotMSIterPlot, and casa::PlotMSOverPlot.

Definition at line 142 of file PlotMSPlot.h.

References casa::False.

Static //.

Returns a new instance of PlotMSPlotParameters suitable for use with this class, using the given PlotMS parent.

Reimplemented in casa::PlotMSIterPlot, casa::PlotMSMultiPlot, casa::PlotMSOverPlot, and casa::PlotMSSinglePlot.

static void casa::PlotMSPlot::makeParameters ( PlotMSPlotParameters params,
PlotMSApp plotms 
) [static]

Updates the given PlotMSPlotParameters to be suitable for use with this class, using the given PlotMS parent.

Reimplemented in casa::PlotMSIterPlot, casa::PlotMSMultiPlot, casa::PlotMSOverPlot, and casa::PlotMSSinglePlot.

virtual String casa::PlotMSPlot::name ( ) const [pure virtual]

ABSTRACT METHODS //.

Returns a human-readable name for this plot. Does not have to be unique.

Implemented in casa::PlotMSIterPlot, casa::PlotMSSinglePlot, casa::PlotMSOverPlot, and casa::PlotMSMultiPlot.

virtual bool casa::PlotMSPlot::nextIter ( ) [inline, virtual]

Reimplemented in casa::PlotMSIterPlot, and casa::PlotMSOverPlot.

Definition at line 141 of file PlotMSPlot.h.

References casa::False.

PlotMSPlot& casa::PlotMSPlot::operator= ( const PlotMSPlot copy) [private]
virtual const PlotMSPlotParameters& casa::PlotMSPlot::parameters ( ) const [virtual]

IMPLEMENTED METHODS //.

Returns a reference to the plot's parameters.

virtual void casa::PlotMSPlot::parametersHaveChanged ( const PlotMSWatchedParameters params,
int  updateFlag 
) [virtual]

Implements PlotMSParametersWatcher::parametersHaveChanged().

Updates the data parameters and then calls parametersHaveChanged_().

Implements casa::PlotMSParametersWatcher.

virtual bool casa::PlotMSPlot::parametersHaveChanged_ ( const PlotMSWatchedParameters params,
int  updateFlag,
bool  releaseWhenDone 
) [protected, pure virtual]

Updates plot members for parameters specific to the child plot type.

Returns true if the drawing should be released right away; if false is returned, the child class is expect to release drawing when finished.

Implemented in casa::PlotMSIterPlot, casa::PlotMSSinglePlot, casa::PlotMSOverPlot, and casa::PlotMSMultiPlot.

virtual PlotMSApp* casa::PlotMSPlot::parent ( ) [inline, virtual]

Gets the plot's parent.

Definition at line 136 of file PlotMSPlot.h.

References itsParent_.

virtual void casa::PlotMSPlot::plotDataChanged ( ) [virtual]

Calls the dataChanged() method on the MaskedScatterPlots.

This WILL cause a redraw of the affected canvases.

virtual vector<MaskedScatterPlotPtr> casa::PlotMSPlot::plots ( ) const [pure virtual]

Returns the plots assigned to this plot.

Implemented in casa::PlotMSIterPlot, casa::PlotMSSinglePlot, casa::PlotMSOverPlot, and casa::PlotMSMultiPlot.

virtual void casa::PlotMSPlot::plotTabHasChanged ( PlotMSPlotTab tab) [pure virtual]

Called when the GUI settings in the plot tab have changed.

Implemented in casa::PlotMSIterPlot, casa::PlotMSSinglePlot, casa::PlotMSOverPlot, and casa::PlotMSMultiPlot.

virtual bool casa::PlotMSPlot::prevIter ( ) [inline, virtual]

Reimplemented in casa::PlotMSIterPlot, and casa::PlotMSOverPlot.

Definition at line 140 of file PlotMSPlot.h.

References casa::False.

virtual void casa::PlotMSPlot::releaseDrawing ( ) [protected, virtual]

Releases drawing on all plot canvases, which will also cause a redraw.

Reimplemented in casa::PlotMSMultiPlot.

virtual PlotMSRegions casa::PlotMSPlot::selectedRegions ( ) const [virtual]

Returns all selected regions on all canvases associated with this plot.

virtual PlotMSRegions casa::PlotMSPlot::selectedRegions ( const vector< PlotCanvasPtr > &  canvases) const [protected, pure virtual]

Helper method for selectedRegions() and visibleSelectedRegions() that returns the selected regions for plots in the given canvases.

Implemented in casa::PlotMSIterPlot, casa::PlotMSSinglePlot, casa::PlotMSMultiPlot, and casa::PlotMSOverPlot.

virtual void casa::PlotMSPlot::setupPlotSubtabs ( PlotMSPlotTab tab) const [pure virtual]

Sets up subtabs for the given plot tab, using the add/insert subtab methods.

Implemented in casa::PlotMSIterPlot, casa::PlotMSSinglePlot, casa::PlotMSOverPlot, and casa::PlotMSMultiPlot.

virtual String casa::PlotMSPlot::spectype ( ) const [inline, virtual]

Returns specialization Id for this plot.

Reimplemented in casa::PlotMSIterPlot, and casa::PlotMSOverPlot.

Definition at line 79 of file PlotMSPlot.h.

virtual bool casa::PlotMSPlot::updateData ( ) [inline, protected, virtual]

Force data update by clearing the cache.

Reimplemented in casa::PlotMSIterPlot.

Definition at line 197 of file PlotMSPlot.h.

References casa::PlotMSCacheBase::clear(), itsCache_, and casa::True.

virtual vector<PlotCanvasPtr> casa::PlotMSPlot::visibleCanvases ( ) const [virtual]

Returns the visible canvases (accessible via PlotMSPlotter::currentCanvases()) associated with this plot.

Returns selected regions on all visible canvases (accessible via PlotMSPlotter::currentCanvases()) associated with this plot.


Member Data Documentation

Cache.

Definition at line 222 of file PlotMSPlot.h.

Referenced by cache(), casa::PlotMSIterPlot::updateData(), and updateData().

Plot factory for generating plot objects as needed.

Definition at line 216 of file PlotMSPlot.h.

Parameters.

Definition at line 219 of file PlotMSPlot.h.

MEMBERS //.

PlotMS parent.

Definition at line 213 of file PlotMSPlot.h.

Referenced by parent().


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