Base class for WorldCanvas axis labelling using a DisplayCoordinateSystem. More...
#include <WCCSAxisLabeller.h>
Public Types | |
enum | SpecAxisType { FREQ, VELO, WAVE, AWAV } |
Public Member Functions | |
WCCSAxisLabeller () | |
Constructor. | |
virtual | ~WCCSAxisLabeller () |
Destructor. | |
virtual void | setCoordinateSystem (const DisplayCoordinateSystem &coordsys) |
Install a DisplayCoordinateSystem. | |
virtual DisplayCoordinateSystem | coordinateSystem () const |
Get the DisplayCoordinateSystem. | |
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 () const |
DD 'Absolute Pixel Coordinates', e.g. | |
virtual void | setUIBase (Int uibase) |
const String & | spectralunitStr () const |
Int | spectralprec () 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 (DisplayCoordinateSystem &cs) const |
Set spectral state onto given CS. | |
void | setDirectionState (DisplayCoordinateSystem &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 | |
DisplayCoordinateSystem | itsCoordinateSystem |
Bool | itsHasCoordinateSystem |
Int | itsSpectralPrecision |
String | itsSpectralUnit |
String | itsSpectralQuantity |
String | itsSpectralTypeUnit |
String | itsDirectionUnit |
String | itsDirectionSystem |
String | itsFrequencySystem |
String | itsZLabelType |
String | itsZLabelPos |
String | itsRestValue |
String | itsRestUnit |
Int | uiBase_ |
Static Private Attributes | |
static const String | FRAME_REST |
Base class for WorldCanvas axis labelling using a DisplayCoordinateSystem.
This (base) class adds to the interface of WCAxisLabeller functions which support the use/provision of a DisplayCoordinateSystem to assist with axis labelling.
Definition at line 47 of file WCCSAxisLabeller.h.
Definition at line 50 of file WCCSAxisLabeller.h.
casa::WCCSAxisLabeller::WCCSAxisLabeller | ( | ) |
Constructor.
virtual casa::WCCSAxisLabeller::~WCCSAxisLabeller | ( | ) | [virtual] |
Destructor.
String casa::WCCSAxisLabeller::axisText | ( | Int | worldAxis | ) | const [inline, private] |
Definition at line 193 of file WCCSAxisLabeller.h.
References axisText().
String casa::WCCSAxisLabeller::axisText | ( | Int | worldAxis, | |
WorldCanvas * | wc | |||
) | const [private] |
Generate axis text for specified axis.
Referenced by axisText().
virtual DisplayCoordinateSystem casa::WCCSAxisLabeller::coordinateSystem | ( | ) | const [inline, virtual] |
Get the DisplayCoordinateSystem.
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 76 of file WCCSAxisLabeller.h.
References itsHasCoordinateSystem.
void casa::WCCSAxisLabeller::setAbsRelState | ( | ) | [private] |
Set absolute/relative state in itsCoordinateSystem.
virtual void casa::WCCSAxisLabeller::setCoordinateSystem | ( | const DisplayCoordinateSystem & | coordsys | ) | [virtual] |
Install a DisplayCoordinateSystem.
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 | ( | ) | [inline, private] |
Set new direction state in itsCoordinateSystem.
Definition at line 203 of file WCCSAxisLabeller.h.
References itsCoordinateSystem.
void casa::WCCSAxisLabeller::setDirectionState | ( | DisplayCoordinateSystem & | cs | ) | const [protected] |
Set direction state onto given CS.
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 | ( | ) | [inline, private] |
Set new spectral state in itsCoordinateSystem.
Definition at line 198 of file WCCSAxisLabeller.h.
References itsCoordinateSystem.
void casa::WCCSAxisLabeller::setSpectralState | ( | DisplayCoordinateSystem & | cs | ) | const [protected] |
Set spectral state onto given CS.
virtual void casa::WCCSAxisLabeller::setUIBase | ( | Int | uibase | ) | [inline, virtual] |
Definition at line 145 of file WCCSAxisLabeller.h.
References uiBase_.
virtual void casa::WCCSAxisLabeller::setZIndex | ( | Int | zindex | ) | [inline, virtual] |
Definition at line 126 of file WCCSAxisLabeller.h.
References itsZIndex.
Int casa::WCCSAxisLabeller::spectralprec | ( | ) | const [inline] |
Definition at line 155 of file WCCSAxisLabeller.h.
References itsSpectralPrecision.
const String& casa::WCCSAxisLabeller::spectralunitStr | ( | ) | const [inline] |
Definition at line 151 of file WCCSAxisLabeller.h.
References itsSpectralUnit.
virtual Int casa::WCCSAxisLabeller::uiBase | ( | ) | const [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 141 of file WCCSAxisLabeller.h.
References uiBase_.
virtual String casa::WCCSAxisLabeller::xAxisText | ( | ) | const [inline, virtual] |
Reimplemented from casa::WCAxisLabeller.
Definition at line 110 of file WCCSAxisLabeller.h.
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::yAxisText | ( | ) | const [inline, virtual] |
Reimplemented from casa::WCAxisLabeller.
Definition at line 113 of file WCCSAxisLabeller.h.
virtual String casa::WCCSAxisLabeller::yAxisText | ( | WorldCanvas * | wc | ) | const [virtual] |
virtual String casa::WCCSAxisLabeller::zLabelPos | ( | ) | const [inline, virtual] |
Definition at line 122 of file WCCSAxisLabeller.h.
References itsZLabelPos.
virtual String casa::WCCSAxisLabeller::zLabelType | ( | ) | const [inline, virtual] |
Definition at line 118 of file WCCSAxisLabeller.h.
References itsZLabelType.
const String casa::WCCSAxisLabeller::FRAME_REST [static, private] |
Definition at line 213 of file WCCSAxisLabeller.h.
Bool casa::WCCSAxisLabeller::itsAbsolute [protected] |
Definition at line 160 of file WCCSAxisLabeller.h.
Definition at line 173 of file WCCSAxisLabeller.h.
Referenced by coordinateSystem(), setDirectionState(), and setSpectralState().
String casa::WCCSAxisLabeller::itsDirectionSystem [private] |
Definition at line 180 of file WCCSAxisLabeller.h.
String casa::WCCSAxisLabeller::itsDirectionUnit [private] |
Definition at line 179 of file WCCSAxisLabeller.h.
String casa::WCCSAxisLabeller::itsFrequencySystem [private] |
Definition at line 181 of file WCCSAxisLabeller.h.
Bool casa::WCCSAxisLabeller::itsHasCoordinateSystem [private] |
Definition at line 174 of file WCCSAxisLabeller.h.
Referenced by hasCoordinateSystem().
String casa::WCCSAxisLabeller::itsRestUnit [private] |
Definition at line 185 of file WCCSAxisLabeller.h.
String casa::WCCSAxisLabeller::itsRestValue [private] |
Definition at line 184 of file WCCSAxisLabeller.h.
WCCSAxisLabeller::SpecAxisType casa::WCCSAxisLabeller::itsSpecAxisType [mutable, protected] |
Definition at line 162 of file WCCSAxisLabeller.h.
Int casa::WCCSAxisLabeller::itsSpectralPrecision [private] |
Definition at line 175 of file WCCSAxisLabeller.h.
Referenced by spectralprec().
String casa::WCCSAxisLabeller::itsSpectralQuantity [private] |
Definition at line 177 of file WCCSAxisLabeller.h.
String casa::WCCSAxisLabeller::itsSpectralTypeUnit [private] |
Definition at line 178 of file WCCSAxisLabeller.h.
String casa::WCCSAxisLabeller::itsSpectralUnit [private] |
Definition at line 176 of file WCCSAxisLabeller.h.
Referenced by spectralunitStr().
Bool casa::WCCSAxisLabeller::itsWorldAxisLabels [protected] |
Definition at line 161 of file WCCSAxisLabeller.h.
Int casa::WCCSAxisLabeller::itsZIndex [protected] |
Definition at line 163 of file WCCSAxisLabeller.h.
Referenced by setZIndex().
String casa::WCCSAxisLabeller::itsZLabelPos [private] |
Definition at line 183 of file WCCSAxisLabeller.h.
Referenced by zLabelPos().
String casa::WCCSAxisLabeller::itsZLabelType [private] |
Definition at line 182 of file WCCSAxisLabeller.h.
Referenced by zLabelType().
Int casa::WCCSAxisLabeller::uiBase_ [private] |
Definition at line 187 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 78 of file WCCSAxisLabeller.h.