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

Class which manages PlotMSPlots for plotms. More...

#include <PlotMSPlotManager.h>

Public Member Functions

 PlotMSPlotManager ()
 Constructor. More...
 
 ~PlotMSPlotManager ()
 Destructor. More...
 
PlotMSAppparent ()
 Gets/Sets the parent PlotMS. More...
 
void setParent (PlotMSApp *parent)
 
PlotterPtr plotter ()
 Returns the plotter used by the parent. More...
 
void addWatcher (PlotMSPlotManagerWatcher *watcher)
 Adds the given watcher to this manager. More...
 
void removeWatcher (PlotMSPlotManagerWatcher *watcher)
 Removes the given watcher from this manager. More...
 
unsigned int numPlots () const
 Returns the number of plots. More...
 
const std::vector< PlotMSPlot * > & plots () const
 Returns all or one of the plots. More...
 
PlotMSPlotplot (unsigned int index)
 
const PlotMSPlotplot (unsigned int index) const
 
QList< PlotMSPlot * > getCanvasPlots (int row, int col) const
 
bool pageGridChanged (int rows, int cols, bool override)
 Set the new size of a multi-plot display. More...
 
void getGridSize (casacore::Int &rows, casacore::Int &cols)
 Return the current size of a multi-plot page grid. More...
 
const std::vector
< PlotMSPlotParameters * > & 
plotParameters () const
 Returns all or one of the plot parameters. More...
 
PlotMSPlotParametersplotParameters (unsigned int index)
 
PlotMSPlotaddOverPlot (const PlotMSPlotParameters *p=NULL)
 Creates a new PlotMSPlot, initializes it properly, adds it to the plotter, and returns a pointer to it. More...
 
void removePlot (PlotMSPlot *plot)
 Remove a plot from the display. More...
 
void clearPlotsAndCanvases (bool clearCanvases=true)
 Clears out all plots and canvases. More...
 
void clearCanvas (int row, int col)
 
bool findEmptySpot (casacore::Int &row, casacore::Int &col)
 
void unassignPlots ()
 
std::vector< casacore::StringgetFiles () const
 
PlotMSParameters getPageParameters ()
 Returns the parameters that control the page display (grid rows & cols). More...
 
bool isPlottable (PlotMSPlot *plot)
 Returns whether or not a canvas has been allocated for the plot. More...
 
bool isOwner (int row, int col, PlotMSPlot *plot)
 

Private Member Functions

void addPlot (PlotMSPlot *plot, const PlotMSPlotParameters *p)
 Helper method for add*Plot methods. More...
 
void notifyWatchers () const
 Notifies any watchers that the managed plots have changed. More...
 
void waitForDrawing ()
 Wait for existing draw threads to finish before we proceed so we don't get a seg fault from a draw thread hanging onto deleted data. More...
 
void logMessage (const QString &msg) const
 Post a plot message to the logger. More...
 

Private Attributes

PlotMSAppitsParent_
 Parent. More...
 
PlotterPtr itsPlotter_
 Plotter. More...
 
PlotFactoryPtr itsFactory_
 Plot factory. More...
 
std::vector< PlotMSPlot * > itsPlots_
 Plots. More...
 
std::vector
< PlotMSPlotParameters * > 
itsPlotParameters_
 Plot parameters. More...
 
std::vector
< PlotMSPlotManagerWatcher * > 
itsWatchers_
 Watchers. More...
 
PlotMSPages itsPages_
 Plot pages. More...
 

Friends

class PlotMSPlot
 

Detailed Description

Class which manages PlotMSPlots for plotms.

Mainly handles adding new plots and managing their PlotCanvases and the arrangement of PlotCanvases in the Plotter. Any PlotMSPlots should be owned by the manager, which will handle deletion as necessary.

Definition at line 46 of file PlotMSPlotManager.h.

Constructor & Destructor Documentation

casa::PlotMSPlotManager::PlotMSPlotManager ( )

Constructor.

Parent must be set using setParent() before manager can be used.

casa::PlotMSPlotManager::~PlotMSPlotManager ( )

Destructor.

Member Function Documentation

PlotMSPlot* casa::PlotMSPlotManager::addOverPlot ( const PlotMSPlotParameters p = NULL)

Creates a new PlotMSPlot, initializes it properly, adds it to the plotter, and returns a pointer to it.

If parameters are given, they are used; otherwise the defaults are used.

void casa::PlotMSPlotManager::addPlot ( PlotMSPlot plot,
const PlotMSPlotParameters p 
)
private

Helper method for add*Plot methods.

void casa::PlotMSPlotManager::addWatcher ( PlotMSPlotManagerWatcher watcher)

Adds the given watcher to this manager.

void casa::PlotMSPlotManager::clearCanvas ( int  row,
int  col 
)
void casa::PlotMSPlotManager::clearPlotsAndCanvases ( bool  clearCanvases = true)

Clears out all plots and canvases.

bool casa::PlotMSPlotManager::findEmptySpot ( casacore::Int row,
casacore::Int col 
)
QList<PlotMSPlot*> casa::PlotMSPlotManager::getCanvasPlots ( int  row,
int  col 
) const
std::vector<casacore::String> casa::PlotMSPlotManager::getFiles ( ) const
void casa::PlotMSPlotManager::getGridSize ( casacore::Int rows,
casacore::Int cols 
)

Return the current size of a multi-plot page grid.

PlotMSParameters casa::PlotMSPlotManager::getPageParameters ( )

Returns the parameters that control the page display (grid rows & cols).

bool casa::PlotMSPlotManager::isOwner ( int  row,
int  col,
PlotMSPlot plot 
)
bool casa::PlotMSPlotManager::isPlottable ( PlotMSPlot plot)

Returns whether or not a canvas has been allocated for the plot.

void casa::PlotMSPlotManager::logMessage ( const QString &  msg) const
private

Post a plot message to the logger.

void casa::PlotMSPlotManager::notifyWatchers ( ) const
private

Notifies any watchers that the managed plots have changed.

unsigned int casa::PlotMSPlotManager::numPlots ( ) const

Returns the number of plots.

bool casa::PlotMSPlotManager::pageGridChanged ( int  rows,
int  cols,
bool  override 
)

Set the new size of a multi-plot display.

PlotMSApp* casa::PlotMSPlotManager::parent ( )

Gets/Sets the parent PlotMS.

PlotMSPlot* casa::PlotMSPlotManager::plot ( unsigned int  index)
const PlotMSPlot* casa::PlotMSPlotManager::plot ( unsigned int  index) const
const std::vector<PlotMSPlotParameters*>& casa::PlotMSPlotManager::plotParameters ( ) const

Returns all or one of the plot parameters.

PlotMSPlotParameters* casa::PlotMSPlotManager::plotParameters ( unsigned int  index)
const std::vector<PlotMSPlot*>& casa::PlotMSPlotManager::plots ( ) const

Returns all or one of the plots.

PlotterPtr casa::PlotMSPlotManager::plotter ( )

Returns the plotter used by the parent.

void casa::PlotMSPlotManager::removePlot ( PlotMSPlot plot)

Remove a plot from the display.

void casa::PlotMSPlotManager::removeWatcher ( PlotMSPlotManagerWatcher watcher)

Removes the given watcher from this manager.

void casa::PlotMSPlotManager::setParent ( PlotMSApp parent)
void casa::PlotMSPlotManager::unassignPlots ( )
void casa::PlotMSPlotManager::waitForDrawing ( )
private

Wait for existing draw threads to finish before we proceed so we don't get a seg fault from a draw thread hanging onto deleted data.

Friends And Related Function Documentation

friend class PlotMSPlot
friend

Definition at line 49 of file PlotMSPlotManager.h.

Member Data Documentation

PlotFactoryPtr casa::PlotMSPlotManager::itsFactory_
private

Plot factory.

Definition at line 136 of file PlotMSPlotManager.h.

PlotMSPages casa::PlotMSPlotManager::itsPages_
private

Plot pages.

Definition at line 148 of file PlotMSPlotManager.h.

PlotMSApp* casa::PlotMSPlotManager::itsParent_
private

Parent.

Definition at line 130 of file PlotMSPlotManager.h.

std::vector<PlotMSPlotParameters*> casa::PlotMSPlotManager::itsPlotParameters_
private

Plot parameters.

Will not be deleted on destruction.

Definition at line 142 of file PlotMSPlotManager.h.

std::vector<PlotMSPlot*> casa::PlotMSPlotManager::itsPlots_
private

Plots.

Will be deleted on destruction.

Definition at line 139 of file PlotMSPlotManager.h.

PlotterPtr casa::PlotMSPlotManager::itsPlotter_
private

Plotter.

Definition at line 133 of file PlotMSPlotManager.h.

std::vector<PlotMSPlotManagerWatcher*> casa::PlotMSPlotManager::itsWatchers_
private

Watchers.

Definition at line 145 of file PlotMSPlotManager.h.


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