Represents a single page of PlotCanvases, arranged in a grid. More...
#include <PlotMSPage.h>
Public Member Functions | |
PlotMSPage (const PlotMSPage ©) | |
Copy constructor. | |
~PlotMSPage () | |
Destructor. | |
unsigned int | canvasRows () const |
Returns the number of rows/columns of the canvas grid on this page. | |
unsigned int | canvasCols () const |
void | disown (PlotMSPlot *plot) |
Erase all trace of this plot. | |
void | clearCanvas (int row, int col) |
Erase all traces of a plot at the specific location including removing axes and title. | |
void | clearCanvases () |
Remove axes and titles from all the canvases. | |
PlotMSPage & | operator= (const PlotMSPage ©) |
Copy operator. | |
bool | isSpot (int rowIndex, int colIndex, PlotMSPlot *plot) const |
Returns true if the canvas at (rowIndex, colIndex) does not yet have a plot or if it already has the plot passed in; return false otherwise. | |
std::pair< int, int > | findEmptySpot () const |
Returns the <rowIndex,colIndex> of the first available canvas that does not yet have a plot. | |
bool | isOwner (int rowIndex, int colIndex, PlotMSPlot *plot) const |
Returns whether or not the plot is the owner of a canvas located at the given rowIndex and colIndex. | |
Private Member Functions | |
void | resize (unsigned int nrows, unsigned int ncols) |
Resizes the grid to the given number of rows and columns. | |
PlotMSPage (PlotMSPages &parent) | |
Constructor. | |
bool | disown (int row, int col) |
Returns true if the canvas at the given row and col was disowned; false otherwise. | |
PlotCanvasPtr | canvas (unsigned int row, unsigned int col) |
Returns the canvas at the given row and column, or NULL if invalid. | |
QList< PlotMSPlot * > | owner (unsigned int row, unsigned int col) const |
Returns the owner plot(s) at the given row and column, or an empty list if invalid or there is no owner for that canvas. | |
bool | setOwner (unsigned int row, unsigned int col, PlotMSPlot *plot) |
Sets the owner for the canvas at the given row and column to the given plot; returns true for success, false otherwise. | |
bool | isOwned (unsigned int row, unsigned int col) |
Returns true if the canvas at the given row and column exists and is owned, false otherwise. | |
bool | disown (unsigned int row, unsigned int col, PlotMSPlot *plot) |
Sets the canvas at the given row and column to be owned by no one. | |
void | setupPage () |
Sets up this page on the plotter. | |
Private Attributes | |
PlotMSPages * | itsParent_ |
Parent. | |
vector< vector< PlotCanvasPtr > > | itsCanvases_ |
Canvases grid. | |
vector< vector< QList < PlotMSPlot * > > > | itsCanvasOwners_ |
Owner grid. | |
Friends | |
class | PlotMSPlot |
class | PlotMSPages |
Represents a single page of PlotCanvases, arranged in a grid.
Definition at line 43 of file PlotMSPage.h.
casa::PlotMSPage::PlotMSPage | ( | const PlotMSPage & | copy | ) |
Copy constructor.
casa::PlotMSPage::~PlotMSPage | ( | ) |
Destructor.
casa::PlotMSPage::PlotMSPage | ( | PlotMSPages & | parent | ) | [private] |
Constructor.
PlotCanvasPtr casa::PlotMSPage::canvas | ( | unsigned int | row, | |
unsigned int | col | |||
) | [private] |
Returns the canvas at the given row and column, or NULL if invalid.
unsigned int casa::PlotMSPage::canvasCols | ( | ) | const |
unsigned int casa::PlotMSPage::canvasRows | ( | ) | const |
Returns the number of rows/columns of the canvas grid on this page.
void casa::PlotMSPage::clearCanvas | ( | int | row, | |
int | col | |||
) |
Erase all traces of a plot at the specific location including removing axes and title.
void casa::PlotMSPage::clearCanvases | ( | ) |
Remove axes and titles from all the canvases.
bool casa::PlotMSPage::disown | ( | unsigned int | row, | |
unsigned int | col, | |||
PlotMSPlot * | plot | |||
) | [private] |
Sets the canvas at the given row and column to be owned by no one.
All items are removed from the canvas. Returns true for success, false for failure.
bool casa::PlotMSPage::disown | ( | int | row, | |
int | col | |||
) | [private] |
Returns true if the canvas at the given row and col was disowned; false otherwise.
void casa::PlotMSPage::disown | ( | PlotMSPlot * | plot | ) |
Erase all trace of this plot.
std::pair<int,int> casa::PlotMSPage::findEmptySpot | ( | ) | const |
Returns the <rowIndex,colIndex> of the first available canvas that does not yet have a plot.
Returns <-1,-1> if there are no canvases without plots.
bool casa::PlotMSPage::isOwned | ( | unsigned int | row, | |
unsigned int | col | |||
) | [private] |
Returns true if the canvas at the given row and column exists and is owned, false otherwise.
bool casa::PlotMSPage::isOwner | ( | int | rowIndex, | |
int | colIndex, | |||
PlotMSPlot * | plot | |||
) | const |
Returns whether or not the plot is the owner of a canvas located at the given rowIndex and colIndex.
bool casa::PlotMSPage::isSpot | ( | int | rowIndex, | |
int | colIndex, | |||
PlotMSPlot * | plot | |||
) | const |
Returns true if the canvas at (rowIndex, colIndex) does not yet have a plot or if it already has the plot passed in; return false otherwise.
PlotMSPage& casa::PlotMSPage::operator= | ( | const PlotMSPage & | copy | ) |
Copy operator.
QList<PlotMSPlot*> casa::PlotMSPage::owner | ( | unsigned int | row, | |
unsigned int | col | |||
) | const [private] |
Returns the owner plot(s) at the given row and column, or an empty list if invalid or there is no owner for that canvas.
For overplotting, there could be multiple owners of the canvas at the given location.
void casa::PlotMSPage::resize | ( | unsigned int | nrows, | |
unsigned int | ncols | |||
) | [private] |
Resizes the grid to the given number of rows and columns.
bool casa::PlotMSPage::setOwner | ( | unsigned int | row, | |
unsigned int | col, | |||
PlotMSPlot * | plot | |||
) | [private] |
Sets the owner for the canvas at the given row and column to the given plot; returns true for success, false otherwise.
If the given canvas is already owned, it must first be disowned by its old owner.
void casa::PlotMSPage::setupPage | ( | ) | [private] |
Sets up this page on the plotter.
friend class PlotMSPages [friend] |
Definition at line 47 of file PlotMSPage.h.
friend class PlotMSPlot [friend] |
Definition at line 46 of file PlotMSPage.h.
vector<vector<PlotCanvasPtr > > casa::PlotMSPage::itsCanvases_ [private] |
Canvases grid.
Definition at line 96 of file PlotMSPage.h.
vector<vector<QList<PlotMSPlot*> > > casa::PlotMSPage::itsCanvasOwners_ [private] |
Owner grid.
Definition at line 99 of file PlotMSPage.h.
PlotMSPages* casa::PlotMSPage::itsParent_ [private] |
Parent.
Definition at line 93 of file PlotMSPage.h.