casa
5.7.0-16
|
Class which manages PlotMSPlots for plotms. More...
#include <PlotMSPlotManager.h>
Public Member Functions | |
PlotMSPlotManager () | |
Constructor. More... | |
~PlotMSPlotManager () | |
Destructor. More... | |
PlotMSApp * | parent () |
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... | |
PlotMSPlot * | plot (unsigned int index) |
const PlotMSPlot * | plot (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... | |
PlotMSPlotParameters * | plotParameters (unsigned int index) |
PlotMSPlot * | addOverPlot (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::String > | getFiles () 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 | |
PlotMSApp * | itsParent_ |
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 |
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.
casa::PlotMSPlotManager::PlotMSPlotManager | ( | ) |
Constructor.
Parent must be set using setParent() before manager can be used.
casa::PlotMSPlotManager::~PlotMSPlotManager | ( | ) |
Destructor.
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.
|
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.
|
private |
Post a plot message to the logger.
|
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 | ( | ) |
|
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.
|
friend |
Definition at line 49 of file PlotMSPlotManager.h.
|
private |
Plot factory.
Definition at line 136 of file PlotMSPlotManager.h.
|
private |
Plot pages.
Definition at line 148 of file PlotMSPlotManager.h.
|
private |
Parent.
Definition at line 130 of file PlotMSPlotManager.h.
|
private |
Plot parameters.
Will not be deleted on destruction.
Definition at line 142 of file PlotMSPlotManager.h.
|
private |
|
private |
Definition at line 133 of file PlotMSPlotManager.h.
|
private |
Watchers.
Definition at line 145 of file PlotMSPlotManager.h.