casa
$Rev:20696$
|
Base class for WorldCanvas axis labelling using a CoordinateSystem. More...
#include <WCCSAxisLabeller.h>
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 String & | spectralunitStr () 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_ |
Base class for WorldCanvas axis labelling using a CoordinateSystem.
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.
Definition at line 50 of file WCCSAxisLabeller.h.
Constructor.
virtual casa::WCCSAxisLabeller::~WCCSAxisLabeller | ( | ) | [virtual] |
Destructor.
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] |
virtual CoordinateSystem casa::WCCSAxisLabeller::coordinateSystem | ( | ) | const [inline, virtual] |
Get the CoordinateSystem.
Definition at line 71 of file WCCSAxisLabeller.h.
References itsCoordinateSystem.
void casa::WCCSAxisLabeller::distributeTypeUnit | ( | ) | [private] |
"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.
Bool casa::WCCSAxisLabeller::hasCoordinateSystem | ( | ) | const [inline] |
Has a CS been set?
Definition at line 75 of file WCCSAxisLabeller.h.
void casa::WCCSAxisLabeller::setAbsRelState | ( | ) | [private] |
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.
void casa::WCCSAxisLabeller::setDirectionState | ( | CoordinateSystem & | cs | ) | const [protected] |
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.
void casa::WCCSAxisLabeller::setSpectralState | ( | CoordinateSystem & | cs | ) | const [protected] |
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.
const String& casa::WCCSAxisLabeller::spectralunitStr | ( | ) | const [inline] |
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] |
Bool casa::WCCSAxisLabeller::itsAbsolute [protected] |
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.
String casa::WCCSAxisLabeller::itsRestUnit [private] |
Definition at line 163 of file WCCSAxisLabeller.h.
String casa::WCCSAxisLabeller::itsRestValue [private] |
Definition at line 162 of file WCCSAxisLabeller.h.
WCCSAxisLabeller::SpecAxisType casa::WCCSAxisLabeller::itsSpecAxisType [mutable, protected] |
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().
Bool casa::WCCSAxisLabeller::itsWorldAxisLabels [protected] |
Definition at line 140 of file WCCSAxisLabeller.h.
Int casa::WCCSAxisLabeller::itsZIndex [protected] |
Definition at line 142 of file WCCSAxisLabeller.h.
Referenced by setZIndex().
String casa::WCCSAxisLabeller::itsZLabelPos [private] |
Definition at line 161 of file WCCSAxisLabeller.h.
Referenced by zLabelPos().
String casa::WCCSAxisLabeller::itsZLabelType [private] |
Definition at line 160 of file WCCSAxisLabeller.h.
Referenced by zLabelType().
Int casa::WCCSAxisLabeller::uiBase_ [private] |
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.