casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
casa::WCCSAxisLabeller Class Reference

Base class for WorldCanvas axis labelling using a CoordinateSystem. More...

#include <WCCSAxisLabeller.h>

Inheritance diagram for casa::WCCSAxisLabeller:
casa::WCAxisLabeller casa::DisplayOptions casa::WCCSNLAxisLabeller

List of all members.

Public Types

enum  SpecAxisType {
  FREQ,
  VELO,
  WAVE,
  AWAV
}

Public Member Functions

 WCCSAxisLabeller ()
 Constructor.
virtual ~WCCSAxisLabeller ()
 Destructor.
virtual void setCoordinateSystem (const CoordinateSystem &coordsys)
 Install a CoordinateSystem.
virtual CoordinateSystem coordinateSystem () const
 Get the CoordinateSystem.
Bool hasCoordinateSystem () const
 Has a CS been set?
virtual void setDefaultOptions ()
 install the default options for this labeller.
virtual Bool setOptions (const Record &rec, Record &updatedOptions)
 apply options stored in rec to the labeller; return value True means a refresh is needed.
virtual Record getOptions () const
 retrieve the current and default options and parameter types.
virtual String xAxisText (WorldCanvas *wc) const
 return the X and Y label text - over-ridden from base class
virtual String yAxisText (WorldCanvas *wc) const
virtual String xAxisText () const
virtual String yAxisText () const
virtual String zLabelType () const
 
   

virtual String zLabelPos () const
virtual void setZIndex (Int zindex)
virtual Int uiBase ()
 DD 'Absolute Pixel Coordinates', e.g.
virtual void setUIBase (Int uibase)
const StringspectralunitStr () const
 
    

Public Attributes

Bool useWCCS
 Setting this True allows the labeller to use the WorldCanvas's own CS to draw labels (although itsCoordinateSystem is still needed for certain things at present).

Protected Member Functions

void setSpectralState (CoordinateSystem &cs) const
 Set spectral state onto given CS.
void setDirectionState (CoordinateSystem &cs) const
 Set direction state onto given CS.

Protected Attributes

Bool itsAbsolute
Bool itsWorldAxisLabels
WCCSAxisLabeller::SpecAxisType itsSpecAxisType
Int itsZIndex

Private Member Functions

String axisText (Int worldAxis, WorldCanvas *wc) const
 Generate axis text for specified axis.
String axisText (Int worldAxis) const
void setSpectralState ()
 Set new spectral state in itsCoordinateSystem.
void setDirectionState ()
 Set new direction state in itsCoordinateSystem.
void setAbsRelState ()
 Set absolute/relative state in itsCoordinateSystem.
void distributeTypeUnit ()
 "optical velocity [m/s]" --> "optical velocity" and "m/s"

Private Attributes

CoordinateSystem itsCoordinateSystem
Bool itsHasCoordinateSystem
String itsSpectralUnit
String itsSpectralQuantity
String itsSpectralTypeUnit
String itsDirectionUnit
String itsDirectionSystem
String itsFrequencySystem
String itsZLabelType
String itsZLabelPos
String itsRestValue
String itsRestUnit
Int uiBase_

Detailed Description

Base class for WorldCanvas axis labelling using a CoordinateSystem.

Synopsis

This (base) class adds to the interface of WCAxisLabeller functions which support the use/provision of a CoordinateSystem to assist with axis labelling.

Definition at line 47 of file WCCSAxisLabeller.h.


Member Enumeration Documentation

Enumerator:
FREQ 
VELO 
WAVE 
AWAV 

Definition at line 50 of file WCCSAxisLabeller.h.


Constructor & Destructor Documentation

Constructor.

Destructor.


Member Function Documentation

String casa::WCCSAxisLabeller::axisText ( Int  worldAxis,
WorldCanvas wc 
) const [private]

Generate axis text for specified axis.

   
String casa::WCCSAxisLabeller::axisText ( Int  worldAxis) const [inline, private]

Definition at line 171 of file WCCSAxisLabeller.h.

References axisText().

Referenced by axisText().

virtual CoordinateSystem casa::WCCSAxisLabeller::coordinateSystem ( ) const [inline, virtual]

Get the CoordinateSystem.

Definition at line 71 of file WCCSAxisLabeller.h.

References itsCoordinateSystem.

"optical velocity [m/s]" --> "optical velocity" and "m/s"

virtual Record casa::WCCSAxisLabeller::getOptions ( ) const [virtual]

retrieve the current and default options and parameter types.

Reimplemented from casa::WCAxisLabeller.

Reimplemented in casa::WCCSNLAxisLabeller.

Has a CS been set?

Definition at line 75 of file WCCSAxisLabeller.h.

Set absolute/relative state in itsCoordinateSystem.

virtual void casa::WCCSAxisLabeller::setCoordinateSystem ( const CoordinateSystem coordsys) [virtual]

Install a CoordinateSystem.

Reimplemented in casa::WCCSNLAxisLabeller.

virtual void casa::WCCSAxisLabeller::setDefaultOptions ( ) [virtual]

install the default options for this labeller.

Reimplemented from casa::WCAxisLabeller.

Reimplemented in casa::WCCSNLAxisLabeller.

Set direction state onto given CS.

void casa::WCCSAxisLabeller::setDirectionState ( ) [inline, private]

Set new direction state in itsCoordinateSystem.

Definition at line 177 of file WCCSAxisLabeller.h.

References itsCoordinateSystem, and setDirectionState().

Referenced by setDirectionState().

virtual Bool casa::WCCSAxisLabeller::setOptions ( const Record rec,
Record updatedOptions 
) [virtual]

apply options stored in rec to the labeller; return value True means a refresh is needed.

Any fields added to the updatedOptions argument are options which have changed in some way due to the setting of other options - ie. they are context sensitive.

Reimplemented from casa::WCAxisLabeller.

Reimplemented in casa::WCCSNLAxisLabeller.

Set spectral state onto given CS.

void casa::WCCSAxisLabeller::setSpectralState ( ) [inline, private]

Set new spectral state in itsCoordinateSystem.

Definition at line 174 of file WCCSAxisLabeller.h.

References itsCoordinateSystem, and setSpectralState().

Referenced by setSpectralState().

virtual void casa::WCCSAxisLabeller::setUIBase ( Int  uibase) [inline, virtual]

Definition at line 130 of file WCCSAxisLabeller.h.

References uiBase_.

virtual void casa::WCCSAxisLabeller::setZIndex ( Int  zindex) [inline, virtual]

Definition at line 115 of file WCCSAxisLabeller.h.

References itsZIndex.

    

Definition at line 135 of file WCCSAxisLabeller.h.

References itsSpectralUnit.

virtual Int casa::WCCSAxisLabeller::uiBase ( ) [inline, virtual]

DD 'Absolute Pixel Coordinates', e.g.

channel numbers, are internally 0-based (they begin numbering at 0), but 'Absolute Pixel coordinates' have traditionally been displayed as 1-based in the glish viewer. uiBase_, and related methods uiBase() and setUIBase(), allow newer (python/Qt-based) code to cause such labelling to be produced with 0-based values instead. Unless setUIBase(0) is called, the traditional 1-based labelling behavior is retained by default.

If you are using 0-basing for 'Absolute Pixel Coordinate' labelling, you should call setUIBase(0), before using draw().

Definition at line 128 of file WCCSAxisLabeller.h.

References uiBase_.

virtual String casa::WCCSAxisLabeller::xAxisText ( WorldCanvas wc) const [virtual]

return the X and Y label text - over-ridden from base class

   
virtual String casa::WCCSAxisLabeller::xAxisText ( ) const [inline, virtual]

Reimplemented from casa::WCAxisLabeller.

Definition at line 107 of file WCCSAxisLabeller.h.

References xAxisText().

Referenced by xAxisText().

virtual String casa::WCCSAxisLabeller::yAxisText ( WorldCanvas wc) const [virtual]
virtual String casa::WCCSAxisLabeller::yAxisText ( ) const [inline, virtual]

Reimplemented from casa::WCAxisLabeller.

Definition at line 108 of file WCCSAxisLabeller.h.

References yAxisText().

Referenced by yAxisText().

virtual String casa::WCCSAxisLabeller::zLabelPos ( ) const [inline, virtual]

Definition at line 113 of file WCCSAxisLabeller.h.

References itsZLabelPos.

virtual String casa::WCCSAxisLabeller::zLabelType ( ) const [inline, virtual]

   

Definition at line 111 of file WCCSAxisLabeller.h.

References itsZLabelType.


Member Data Documentation

Definition at line 139 of file WCCSAxisLabeller.h.

Definition at line 152 of file WCCSAxisLabeller.h.

Referenced by coordinateSystem(), setDirectionState(), and setSpectralState().

Definition at line 158 of file WCCSAxisLabeller.h.

Definition at line 157 of file WCCSAxisLabeller.h.

Definition at line 159 of file WCCSAxisLabeller.h.

Definition at line 153 of file WCCSAxisLabeller.h.

Definition at line 163 of file WCCSAxisLabeller.h.

Definition at line 162 of file WCCSAxisLabeller.h.

Definition at line 141 of file WCCSAxisLabeller.h.

Definition at line 155 of file WCCSAxisLabeller.h.

Definition at line 156 of file WCCSAxisLabeller.h.

Definition at line 154 of file WCCSAxisLabeller.h.

Referenced by spectralunitStr().

Definition at line 140 of file WCCSAxisLabeller.h.

Definition at line 142 of file WCCSAxisLabeller.h.

Referenced by setZIndex().

Definition at line 161 of file WCCSAxisLabeller.h.

Referenced by zLabelPos().

Definition at line 160 of file WCCSAxisLabeller.h.

Referenced by zLabelType().

Definition at line 165 of file WCCSAxisLabeller.h.

Referenced by setUIBase(), and uiBase().

Setting this True allows the labeller to use the WorldCanvas's own CS to draw labels (although itsCoordinateSystem is still needed for certain things at present).

Default: False.

Definition at line 75 of file WCCSAxisLabeller.h.


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