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

Subclass of RegionShape used for drawing composite regions. More...

#include <RegionShapes.h>

Inheritance diagram for RSComposite:

Public Member Functions

 RSComposite (casacore::MDirection::Types worldSys, bool dependent=true, casacore::String customName="")
 Non-Static Members //. More...
 
 RSComposite (bool dependent=true, casacore::String customName="")
 Pixel constructor. More...
 
 RSComposite (const casacore::RecordInterface &properties)
 casacore::Record Constructor. More...
 
 ~RSComposite ()
 Destructor. More...
 
void addShape (RegionShape *shape)
 Adds the given shape(s) to this composite. More...
 
void addShapes (const std::vector< RegionShape * > shapes)
 
bool childrenAreDependent () const
 Returns true if the children are dependent, false otherwise. More...
 
void setChildrenAreDependent (bool dependent=true)
 Sets whether children are dependent or not. More...
 
std::vector< RegionShape * > children ()
 Returns the composite's children. More...
 
std::vector< const RegionShape * > children () const
 
void setLineColor (const casacore::String &newColor, bool alsoSetLabel=true)
 Overrides RegionShape methods in the case of dependent children. More...
 
void setLineWidth (double width)
 
void setLineStyle (LineStyle style)
 
void setLabel (const RegionShapeLabel &label)
 
bool drawAndUpdateBoundingBox (WorldCanvasHolder &wch, casacore::String *err=NULL)
 Implements RegionShape::drawAndUpdateBoundingBox. More...
 
casacore::String type () const
 Implements RegionShape::type. More...
 
casacore::String oneWordType () const
 Overrides RegionShape::oneWordType. More...
 
double getAngle (casacore::String toSystem="") const
 Returns 0 degrees pixel/screen in the given coordinate system (own system if toSystem is empty, otherwise see the constraints listed in RegionShape::coordParameterValues(casacore::String). More...
 
void getCompositeCoordinates (double &centerX, double &centerY, casacore::String toSystem="") const
 Gets composite-specific coordinates, to avoid dependence on coordParameterValues() when the shape type is known. More...
 
std::vector< double > coordParameterValues () const
 Implements RegionShape::coordParameterValues. More...
 
std::vector< double > coordParameterValues (casacore::String toSystem) const
 Implements RegionShape::coordParameterValues. More...
 
std::vector< casacore::StringcoordParameterNames () const
 Implements RegionShape::coordParameterNames. More...
 
std::vector
< CoordinateParameterType > 
coordParameterTypes () const
 Implements RegionShape::coordParameterPositions. More...
 
void setCoordParameters (const std::vector< double > &vals)
 Implements RegionShape::setCoordParameters. More...
 
void setCoordParameters (const std::vector< double > &vals, casacore::String valSystem)
 Implements RegionShape::setCoordParameters. More...
 
void move (double dx, double dy, casacore::String system="")
 Implements RegionShape::move. More...
 
RSHandle getHandle () const
 Implements RegionShape::getHandle. More...
 
std::vector< casacore::StringoptionNames () const
 Implements RegionShape::optionNames. More...
 
std::vector< OptionType > optionTypes () const
 Implements RegionShape::optionTypes. More...
 
std::vector< RSOption > optionValues () const
 Implements RegionShape::optionValues. More...
 
void setOptionValues (const std::vector< RSOption > &options)
 Implements RegionShape::setOptions. More...
 

Static Public Attributes

static const casacore::String PROPDEPENDENTCHILDREN
 Static Members //. More...
 
static const casacore::String PROPCHILDREN
 

Protected Member Functions

void getShapeSpecificProperties (casacore::Record &properties) const
 to children or not. More...
 
void setShapeSpecificProperties (const casacore::RecordInterface &properties)
 Implements RegionShape::setShapeSpecificProperties. More...
 
void updateMinMax ()
 Update m_xMin, m_xMax, m_yMin, and m_yMax. More...
 

Protected Attributes

casacore::String m_custName
 
bool m_dependentChildren
 
vector< RegionShape * > m_shapes
 
double m_centerX
 
double m_centerY
 
bool m_syncAngleDepChildren
 
double m_syncAngle
 1) are dependent 2) have angles (rectangle, ellipse, vector, text) 3) all have synched (same) angle More...
 
bool m_applyChangesToChildren
 

Private Member Functions

bool addShapeHelper (RegionShape *shape)
 Adds the given child but does not perform upkeep. More...
 
void addShapeUpkeep ()
 Does upkeep after adding shapes. More...
 
void convertMinMax (double &xmin, double &xmax, double &ymin, double &ymax, unsigned int index) const
 Gets the min/max of the child at the given index, in the composite's coordinate system. More...
 

Detailed Description

Subclass of RegionShape used for drawing composite regions.

A composite region consists of zero or more children RegionShapes. A RSComposite can either see its children as dependent, in which the parent controls the properties for each shape, or independent in which each child's properties must be set individually. An RSComposite can have a custom name/type. NOTE: xMin, xMax, yMin, and yMax values are ONLY valid if all children shapes have the same coordinate system as the parent composite. The following properties are also available:

Definition at line 1035 of file RegionShapes.h.

Constructor & Destructor Documentation

RSComposite::RSComposite ( casacore::MDirection::Types  worldSys,
bool  dependent = true,
casacore::String  customName = "" 
)

Non-Static Members //.

World constructor. Initially empty composite. The dependent flag controls whether the children are dependent or independent. If customName is set, it will be returned on type(). The given world system is only used for displaying/setting the center of the composite and does not affect the coordinate systems of the children.

RSComposite::RSComposite ( bool  dependent = true,
casacore::String  customName = "" 
)

Pixel constructor.

Initially empty composite. The dependent flag controls whether the children are dependent or independent. If custonName is set, it will be returned on type().

RSComposite::RSComposite ( const casacore::RecordInterface properties)

casacore::Record Constructor.

RSComposite::~RSComposite ( )

Destructor.

Member Function Documentation

void RSComposite::addShape ( RegionShape *  shape)

Adds the given shape(s) to this composite.

Note that in the case of depdendent children, line properties, linethrough properties, and label properties of the individual shapes are discarded in favor of those of the parent RSComposite.

bool RSComposite::addShapeHelper ( RegionShape *  shape)
private

Adds the given child but does not perform upkeep.

Returns true if the shape was added, false otherwise.

void RSComposite::addShapes ( const std::vector< RegionShape * >  shapes)
void RSComposite::addShapeUpkeep ( )
private

Does upkeep after adding shapes.

std::vector<RegionShape*> RSComposite::children ( )

Returns the composite's children.

std::vector<const RegionShape*> RSComposite::children ( ) const
bool RSComposite::childrenAreDependent ( ) const

Returns true if the children are dependent, false otherwise.

void RSComposite::convertMinMax ( double &  xmin,
double &  xmax,
double &  ymin,
double &  ymax,
unsigned int  index 
) const
private

Gets the min/max of the child at the given index, in the composite's coordinate system.

std::vector<casacore::String> RSComposite::coordParameterNames ( ) const

Implements RegionShape::coordParameterNames.

std::vector<CoordinateParameterType> RSComposite::coordParameterTypes ( ) const

Implements RegionShape::coordParameterPositions.

std::vector<double> RSComposite::coordParameterValues ( ) const

Implements RegionShape::coordParameterValues.

std::vector<double> RSComposite::coordParameterValues ( casacore::String  toSystem) const

Implements RegionShape::coordParameterValues.

bool RSComposite::drawAndUpdateBoundingBox ( WorldCanvasHolder &  wch,
casacore::String err = NULL 
)

Implements RegionShape::drawAndUpdateBoundingBox.

double RSComposite::getAngle ( casacore::String  toSystem = "") const

Returns 0 degrees pixel/screen in the given coordinate system (own system if toSystem is empty, otherwise see the constraints listed in RegionShape::coordParameterValues(casacore::String).

void RSComposite::getCompositeCoordinates ( double &  centerX,
double &  centerY,
casacore::String  toSystem = "" 
) const

Gets composite-specific coordinates, to avoid dependence on coordParameterValues() when the shape type is known.

If toSystem is empty, no conversion is done; otherwise see the constraints listed in RegionShape::coordParameterValues(casacore::String).

RSHandle RSComposite::getHandle ( ) const

Implements RegionShape::getHandle.

void RSComposite::getShapeSpecificProperties ( casacore::Record properties) const
protected

to children or not.

Implements RegionShape::getShapeSpecificProperties.

void RSComposite::move ( double  dx,
double  dy,
casacore::String  system = "" 
)

Implements RegionShape::move.

casacore::String RSComposite::oneWordType ( ) const
inline

Overrides RegionShape::oneWordType.

Definition at line 1107 of file RegionShapes.h.

std::vector<casacore::String> RSComposite::optionNames ( ) const

Implements RegionShape::optionNames.

std::vector<OptionType> RSComposite::optionTypes ( ) const

Implements RegionShape::optionTypes.

std::vector<RSOption> RSComposite::optionValues ( ) const

Implements RegionShape::optionValues.

void RSComposite::setChildrenAreDependent ( bool  dependent = true)

Sets whether children are dependent or not.

NOTE: This should never be called AFTER the composite has already been added to the QtRegionShapeManager. Preferably it should be done before adding any children either.

void RSComposite::setCoordParameters ( const std::vector< double > &  vals)

Implements RegionShape::setCoordParameters.

void RSComposite::setCoordParameters ( const std::vector< double > &  vals,
casacore::String  valSystem 
)

Implements RegionShape::setCoordParameters.

void RSComposite::setLabel ( const RegionShapeLabel &  label)
void RSComposite::setLineColor ( const casacore::String newColor,
bool  alsoSetLabel = true 
)

Overrides RegionShape methods in the case of dependent children.

void RSComposite::setLineStyle ( LineStyle  style)
void RSComposite::setLineWidth ( double  width)
void RSComposite::setOptionValues ( const std::vector< RSOption > &  options)

Implements RegionShape::setOptions.

void RSComposite::setShapeSpecificProperties ( const casacore::RecordInterface properties)
protected

Implements RegionShape::setShapeSpecificProperties.

casacore::String RSComposite::type ( ) const

Implements RegionShape::type.

void RSComposite::updateMinMax ( )
protected

Update m_xMin, m_xMax, m_yMin, and m_yMax.

Member Data Documentation

bool RSComposite::m_applyChangesToChildren
protected

Definition at line 1170 of file RegionShapes.h.

double RSComposite::m_centerX
protected

Definition at line 1163 of file RegionShapes.h.

double RSComposite::m_centerY
protected

Definition at line 1163 of file RegionShapes.h.

casacore::String RSComposite::m_custName
protected

Definition at line 1160 of file RegionShapes.h.

bool RSComposite::m_dependentChildren
protected

Definition at line 1161 of file RegionShapes.h.

vector<RegionShape*> RSComposite::m_shapes
protected

Definition at line 1162 of file RegionShapes.h.

double RSComposite::m_syncAngle
protected

1) are dependent 2) have angles (rectangle, ellipse, vector, text) 3) all have synched (same) angle

Definition at line 1169 of file RegionShapes.h.

bool RSComposite::m_syncAngleDepChildren
protected

Definition at line 1164 of file RegionShapes.h.

const casacore::String RSComposite::PROPCHILDREN
static

Definition at line 1042 of file RegionShapes.h.

const casacore::String RSComposite::PROPDEPENDENTCHILDREN
static

Static Members //.

Properties. (See class descriptions of RegionShape and RSComposite.)

Definition at line 1041 of file RegionShapes.h.


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