casa
$Rev:20696$
|
Convenience class for the different units available for coordinates/sizes. More...
#include <RSUtils.qo.h>
Public Member Functions | |
RSValue (double d=0) | |
RSValue (double d, Unit u) | |
RSValue (bool hms, long hd, long m, double s, bool minus=false) | |
~RSValue () | |
Static Public Member Functions | |
static bool | convertBetween (const QString &from, const String &fromUnits, RSValue &to) |
Converts the value in the given QString in the given units to the given RSValue. | |
static bool | convertBetween (const RSValue &from, QString &to, int precision=-1) |
Converts the value in the given RSValue to the given QString, using the given precision for the doubles. | |
static bool | convertBetween (const RSValue &from, RSValue &to, const String &toUnits) |
Converts the value in the given RSValue to the give RSValue which uses the given units. | |
Public Attributes | |
bool | isQuantum |
bool | isHMS |
bool | isMinusZero |
Quantum< double > | val |
long | hOrD |
long | min |
double | sec |
Static Public Attributes | |
static const String | DEG |
Conversion methods/constants //. | |
static const String | RAD |
static const String | ARCSEC |
static const String | ARCMIN |
static const String | HMS |
static const String | DMS |
Convenience class for the different units available for coordinates/sizes.
Two modes: quantum and HMS/DMS (distinguished by the "isQuantum" flag).
Definition at line 320 of file RSUtils.qo.h.
casa::RSValue::RSValue | ( | double | d = 0 | ) | [inline] |
Definition at line 322 of file RSUtils.qo.h.
casa::RSValue::RSValue | ( | double | d, |
Unit | u | ||
) | [inline] |
Definition at line 325 of file RSUtils.qo.h.
casa::RSValue::RSValue | ( | bool | hms, |
long | hd, | ||
long | m, | ||
double | s, | ||
bool | minus = false |
||
) | [inline] |
Definition at line 328 of file RSUtils.qo.h.
casa::RSValue::~RSValue | ( | ) | [inline] |
Definition at line 332 of file RSUtils.qo.h.
static bool casa::RSValue::convertBetween | ( | const QString & | from, |
const String & | fromUnits, | ||
RSValue & | to | ||
) | [static] |
static bool casa::RSValue::convertBetween | ( | const RSValue & | from, |
QString & | to, | ||
int | precision = -1 |
||
) | [static] |
Converts the value in the given RSValue to the given QString, using the given precision for the doubles.
static bool casa::RSValue::convertBetween | ( | const RSValue & | from, |
RSValue & | to, | ||
const String & | toUnits | ||
) | [static] |
const String casa::RSValue::ARCMIN [static] |
Definition at line 351 of file RSUtils.qo.h.
const String casa::RSValue::ARCSEC [static] |
Definition at line 350 of file RSUtils.qo.h.
const String casa::RSValue::DEG [static] |
Conversion methods/constants //.
Units constants.
Definition at line 348 of file RSUtils.qo.h.
Referenced by casa::QtEditRegionShape::positionUnits(), and casa::QtEditRegionShape::sizeUnits().
const String casa::RSValue::DMS [static] |
Definition at line 353 of file RSUtils.qo.h.
Referenced by casa::QtEditRegionShape::positionUnits().
const String casa::RSValue::HMS [static] |
Definition at line 352 of file RSUtils.qo.h.
Referenced by casa::QtEditRegionShape::positionUnits().
long casa::RSValue::hOrD |
Definition at line 339 of file RSUtils.qo.h.
bool casa::RSValue::isHMS |
Definition at line 335 of file RSUtils.qo.h.
Definition at line 336 of file RSUtils.qo.h.
Definition at line 334 of file RSUtils.qo.h.
long casa::RSValue::min |
Definition at line 340 of file RSUtils.qo.h.
const String casa::RSValue::RAD [static] |
Definition at line 349 of file RSUtils.qo.h.
Referenced by casa::QtEditRegionShape::positionUnits(), and casa::QtEditRegionShape::sizeUnits().
double casa::RSValue::sec |
Definition at line 341 of file RSUtils.qo.h.
Quantum<double> casa::RSValue::val |
Definition at line 338 of file RSUtils.qo.h.