casa::PlotMSPage Class Reference

Represents a single page of PlotCanvases, arranged in a grid. More...

#include <PlotMSPage.h>

List of all members.

Public Member Functions

 PlotMSPage (const PlotMSPage &copy)
 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.
PlotMSPageoperator= (const PlotMSPage &copy)
 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

PlotMSPagesitsParent_
 Parent.
vector< vector< PlotCanvasPtr > > itsCanvases_
 Canvases grid.
vector< vector< QList
< PlotMSPlot * > > > 
itsCanvasOwners_
 Owner grid.

Friends

class PlotMSPlot
class PlotMSPages

Detailed Description

Represents a single page of PlotCanvases, arranged in a grid.

Definition at line 43 of file PlotMSPage.h.


Constructor & Destructor Documentation

casa::PlotMSPage::PlotMSPage ( const PlotMSPage copy  ) 

Copy constructor.

casa::PlotMSPage::~PlotMSPage (  ) 

Destructor.

casa::PlotMSPage::PlotMSPage ( PlotMSPages parent  )  [private]

Constructor.


Member Function Documentation

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.


Friends And Related Function Documentation

friend class PlotMSPages [friend]

Definition at line 47 of file PlotMSPage.h.

friend class PlotMSPlot [friend]

Definition at line 46 of file PlotMSPage.h.


Member Data Documentation

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.

Parent.

Definition at line 93 of file PlotMSPage.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1