casa
$Rev:20696$
|
PlotMSRegions is a class that holds information about selected regions for a single PlotMSPlot. More...
#include <PlotMSRegions.h>
Public Member Functions | |
PlotMSRegions () | |
Constructor, which creates an empty selection. | |
~PlotMSRegions () | |
Destructor. | |
Vector< pair< PMS::Axis, PMS::Axis > > | allAxisPairs () const |
Returns all axis pairs that have regions. | |
bool | hasRegionsFor (PMS::Axis x, PMS::Axis y) const |
Returns whether or not there are regions for the given (x, y) axis pair. | |
Vector< PlotMSRegion > | regionsFor (PMS::Axis x, PMS::Axis y) const |
Returns a copy of the regions for the given (x, y) axis pair. | |
void | addRegions (PMS::Axis x, PMS::Axis y, const vector< PlotMSRegion > &r) |
Adds the given regions for the given (x, y) axis pair. | |
void | addRegions (PMS::Axis x, PMS::Axis y, const Vector< PlotMSRegion > &r) |
void | addRegions (PMS::Axis x, PMS::Axis y, PlotCanvasPtr canvas) |
Convenience method for adding all selected regions using the standard select tool on the given canvas for the given (x, y) axis pair. | |
void | setRegions (PMS::Axis x, PMS::Axis y, const vector< PlotMSRegion > &r) |
Sets the regions for the given (x, y) axis pair to the given. | |
void | setRegions (PMS::Axis x, PMS::Axis y, const Vector< PlotMSRegion > &r) |
void | setRegions (PMS::Axis x, PMS::Axis y, PlotCanvasPtr canvas) |
Convenience method for setting the regions for the given (x, y) axis pair using the standard select tool on the given canvas. | |
void | clearRegions (PMS::Axis x, PMS::Axis y) |
Clears the regions for the given (x, y) axis pair. | |
Private Types | |
typedef map< pair< PMS::Axis, PMS::Axis >, Vector < PlotMSRegion > > | PMSRMap |
Convenience macro for map type. | |
Private Attributes | |
PMSRMap | itsRegions_ |
Map from (x, y) to selected regions. |
PlotMSRegions is a class that holds information about selected regions for a single PlotMSPlot.
Because PlotMSPlot can have potentially many different plots across potentially many different canvases, it is important that PlotMSRegions be general enough to handle many different cases.
Definition at line 112 of file PlotMSRegions.h.
typedef map<pair<PMS::Axis, PMS::Axis>, Vector<PlotMSRegion> > casa::PlotMSRegions::PMSRMap [private] |
Convenience macro for map type.
Definition at line 159 of file PlotMSRegions.h.
Constructor, which creates an empty selection.
Destructor.
void casa::PlotMSRegions::addRegions | ( | PMS::Axis | x, |
PMS::Axis | y, | ||
const vector< PlotMSRegion > & | r | ||
) | [inline] |
Adds the given regions for the given (x, y) axis pair.
Will not remove any existing regions for that pair. Only adds unique regions.
Definition at line 133 of file PlotMSRegions.h.
void casa::PlotMSRegions::addRegions | ( | PMS::Axis | x, |
PMS::Axis | y, | ||
const Vector< PlotMSRegion > & | r | ||
) |
void casa::PlotMSRegions::addRegions | ( | PMS::Axis | x, |
PMS::Axis | y, | ||
PlotCanvasPtr | canvas | ||
) |
Convenience method for adding all selected regions using the standard select tool on the given canvas for the given (x, y) axis pair.
Vector<pair<PMS::Axis, PMS::Axis> > casa::PlotMSRegions::allAxisPairs | ( | ) | const |
Returns all axis pairs that have regions.
void casa::PlotMSRegions::clearRegions | ( | PMS::Axis | x, |
PMS::Axis | y | ||
) |
Clears the regions for the given (x, y) axis pair.
bool casa::PlotMSRegions::hasRegionsFor | ( | PMS::Axis | x, |
PMS::Axis | y | ||
) | const |
Returns whether or not there are regions for the given (x, y) axis pair.
Vector<PlotMSRegion> casa::PlotMSRegions::regionsFor | ( | PMS::Axis | x, |
PMS::Axis | y | ||
) | const |
Returns a copy of the regions for the given (x, y) axis pair.
void casa::PlotMSRegions::setRegions | ( | PMS::Axis | x, |
PMS::Axis | y, | ||
const vector< PlotMSRegion > & | r | ||
) | [inline] |
Sets the regions for the given (x, y) axis pair to the given.
Removes any existing regions for that pair. Only adds unique regions.
Definition at line 145 of file PlotMSRegions.h.
void casa::PlotMSRegions::setRegions | ( | PMS::Axis | x, |
PMS::Axis | y, | ||
const Vector< PlotMSRegion > & | r | ||
) |
void casa::PlotMSRegions::setRegions | ( | PMS::Axis | x, |
PMS::Axis | y, | ||
PlotCanvasPtr | canvas | ||
) |
Convenience method for setting the regions for the given (x, y) axis pair using the standard select tool on the given canvas.
PMSRMap casa::PlotMSRegions::itsRegions_ [private] |
Map from (x, y) to selected regions.
Definition at line 162 of file PlotMSRegions.h.