casa
$Rev:20696$
|
A helper class to deal with data ranges to support options. More...
#include <DParameterRange.h>
Public Member Functions | |
DParameterRange (const String name, const String description, const String help, const T minimum, const T maximum, const T resolution, const T defaultvalue, const T value, const String context="", const Bool editable=True, const Bool provideentry=False, const Bool onrelease=False) | |
Constructor taking the name of the parameter, a short description, some help text, a minimum value, a maximum value, a default value, a current value, and flags indicating whether the parameter is editable. | |
DParameterRange () | |
(Required) default constructor. | |
DParameterRange (const DParameterRange< T > &other) | |
(Required) copy constructor. | |
virtual | ~DParameterRange () |
Destructor. | |
DParameterRange< T > & | operator= (const DParameterRange< T > &other) |
(Required) copy assignment. | |
virtual Bool | fromRecord (const RecordInterface &record) |
Parse record , and update this parameter if a field exists whose name matches that of this parameter. | |
virtual void | toRecord (RecordInterface &record, const Bool fullrecord=True, const Bool overwrite=False) |
Place a record describing this parameter in a sub-field of record with name matching that of this parameter. | |
T | minimum () |
Return the minimum for this parameter. | |
T | maximum () |
Return the maximum for this parameter. | |
T | resolution () |
Return the resolution of this parameter. | |
T | defaultValue () |
Return the default for this parameter. | |
T | value () |
Return the current value of this parameter. | |
Bool | provideEntry () |
Return whether there should be a text box beside the slider. | |
Bool | onRelease () |
Return whether the slider event should occur when the user releases the slider, i.e. | |
void | setMinimum (const T minimum) |
Set or change the minimum for this parameter. | |
void | setMaximum (const T maximum) |
Set or change the maximum for this parameter. | |
void | setResolution (const T resolution) |
Set or change the resolution for this parameter. | |
void | setDefaultValue (const T defaultValue) |
Set or change the default for this parameter. | |
void | setValue (const T value) |
Set or change the current value for this parameter. | |
const T & | operator= (const T &value) |
Convenient syntax to set (only) the value. | |
void | setProvideEntry (const Bool provideentry) |
Set or change the provideentry state for this parameter. | |
void | setOnRelease (const Bool onrelease) |
Set or change the onrelease state for this parameter. | |
Private Attributes | |
T | itsMinimum |
Store for the minimum of this parameter. | |
T | itsMaximum |
Store for the maximum of this parameter. | |
T | itsResolution |
Store for the resolution of this parameter. | |
T | itsDefault |
Store for the default of this parameter. | |
T | itsValue |
Store for the value of this parameter. | |
Bool | itsProvideEntry |
Store for the 'provideentry' state of this parameter. | |
Bool | itsOnRelease |
Store for the 'onrelease' state of this parameter. |
A helper class to deal with data ranges to support options.
Public interface
Making things easier
Definition at line 66 of file DParameterRange.h.
casa::DParameterRange< T >::DParameterRange | ( | const String | name, |
const String | description, | ||
const String | help, | ||
const T | minimum, | ||
const T | maximum, | ||
const T | resolution, | ||
const T | defaultvalue, | ||
const T | value, | ||
const String | context = "" , |
||
const Bool | editable = True , |
||
const Bool | provideentry = False , |
||
const Bool | onrelease = False |
||
) |
Constructor taking the name of the parameter, a short description, some help text, a minimum value, a maximum value, a default value, a current value, and flags indicating whether the parameter is editable.
casa::DParameterRange< T >::DParameterRange | ( | ) |
(Required) default constructor.
casa::DParameterRange< T >::DParameterRange | ( | const DParameterRange< T > & | other | ) |
(Required) copy constructor.
virtual casa::DParameterRange< T >::~DParameterRange | ( | ) | [virtual] |
Destructor.
T casa::DParameterRange< T >::defaultValue | ( | ) | [inline] |
Return the default for this parameter.
Definition at line 121 of file DParameterRange.h.
Referenced by casa::DParameterRange< Int >::setDefaultValue().
virtual Bool casa::DParameterRange< T >::fromRecord | ( | const RecordInterface & | record | ) | [virtual] |
Parse record
, and update this parameter if a field exists whose name matches that of this parameter.
Return True
if the parameter is changed, otherwise return False
.
Implements casa::DisplayParameter.
T casa::DParameterRange< T >::maximum | ( | ) | [inline] |
Return the maximum for this parameter.
Definition at line 113 of file DParameterRange.h.
Referenced by casa::QtDisplayData::colorBarSizeAdj(), and casa::DParameterRange< Int >::setMaximum().
T casa::DParameterRange< T >::minimum | ( | ) | [inline] |
Return the minimum for this parameter.
Definition at line 109 of file DParameterRange.h.
Referenced by casa::QtDisplayData::colorBarSizeAdj(), and casa::DParameterRange< Int >::setMinimum().
Bool casa::DParameterRange< T >::onRelease | ( | ) | [inline] |
Return whether the slider event should occur when the user releases the slider, i.e.
at the end of setting the value, rather than in real time as the user moves the slider (good for operations which take a long time)
Definition at line 136 of file DParameterRange.h.
DParameterRange<T>& casa::DParameterRange< T >::operator= | ( | const DParameterRange< T > & | other | ) |
(Required) copy assignment.
const T& casa::DParameterRange< T >::operator= | ( | const T & | value | ) | [inline] |
Convenient syntax to set (only) the value.
Definition at line 161 of file DParameterRange.h.
Bool casa::DParameterRange< T >::provideEntry | ( | ) | [inline] |
Return whether there should be a text box beside the slider.
See 'intrange' in the autogui tool documentation for more information.
Definition at line 130 of file DParameterRange.h.
T casa::DParameterRange< T >::resolution | ( | ) | [inline] |
Return the resolution of this parameter.
Definition at line 117 of file DParameterRange.h.
Referenced by casa::DParameterRange< Int >::setResolution().
void casa::DParameterRange< T >::setDefaultValue | ( | const T | defaultValue | ) | [inline] |
Set or change the default for this parameter.
Definition at line 153 of file DParameterRange.h.
void casa::DParameterRange< T >::setMaximum | ( | const T | maximum | ) | [inline] |
Set or change the maximum for this parameter.
Definition at line 145 of file DParameterRange.h.
void casa::DParameterRange< T >::setMinimum | ( | const T | minimum | ) | [inline] |
Set or change the minimum for this parameter.
Definition at line 141 of file DParameterRange.h.
void casa::DParameterRange< T >::setOnRelease | ( | const Bool | onrelease | ) | [inline] |
Set or change the onrelease state for this parameter.
Definition at line 169 of file DParameterRange.h.
void casa::DParameterRange< T >::setProvideEntry | ( | const Bool | provideentry | ) | [inline] |
Set or change the provideentry state for this parameter.
Definition at line 165 of file DParameterRange.h.
void casa::DParameterRange< T >::setResolution | ( | const T | resolution | ) | [inline] |
Set or change the resolution for this parameter.
Definition at line 149 of file DParameterRange.h.
void casa::DParameterRange< T >::setValue | ( | const T | value | ) | [inline] |
Set or change the current value for this parameter.
Definition at line 157 of file DParameterRange.h.
virtual void casa::DParameterRange< T >::toRecord | ( | RecordInterface & | record, |
const Bool | fullrecord = True , |
||
const Bool | overwrite = False |
||
) | [virtual] |
Place a record describing this parameter in a sub-field of record
with name matching that of this parameter.
If overwrite
is True
, then any existing field with matching name will be overwritten. If fullrecord
is True
, then a complete description of the parameter is given, otherwise just its current value is stored in record
. Presently fullrecord
is ignored.
Implements casa::DisplayParameter.
T casa::DParameterRange< T >::value | ( | ) | [inline] |
Return the current value of this parameter.
Definition at line 125 of file DParameterRange.h.
Referenced by casa::SkyCatOverlayDD::charAngle(), casa::SkyCatOverlayDD::charSize(), casa::QtDisplayData::colorBarSizeAdj(), casa::SkyCatOverlayDD::labelXOffset(), casa::SkyCatOverlayDD::labelYOffset(), casa::SkyCatOverlayDD::lineWidth(), casa::SkyCatOverlayDD::markerSize(), casa::DParameterRange< Int >::operator=(), casa::Profile2dDD::profileLineWidth(), casa::Profile2dDD::regionXRadius(), casa::Profile2dDD::regionYRadius(), and casa::DParameterRange< Int >::setValue().
T casa::DParameterRange< T >::itsDefault [private] |
Store for the default of this parameter.
Definition at line 184 of file DParameterRange.h.
Referenced by casa::DParameterRange< Int >::defaultValue(), and casa::DParameterRange< Int >::setDefaultValue().
T casa::DParameterRange< T >::itsMaximum [private] |
Store for the maximum of this parameter.
Definition at line 178 of file DParameterRange.h.
Referenced by casa::DParameterRange< Int >::maximum(), and casa::DParameterRange< Int >::setMaximum().
T casa::DParameterRange< T >::itsMinimum [private] |
Store for the minimum of this parameter.
Definition at line 175 of file DParameterRange.h.
Referenced by casa::DParameterRange< Int >::minimum(), and casa::DParameterRange< Int >::setMinimum().
Bool casa::DParameterRange< T >::itsOnRelease [private] |
Store for the 'onrelease' state of this parameter.
Definition at line 193 of file DParameterRange.h.
Referenced by casa::DParameterRange< Int >::onRelease(), and casa::DParameterRange< Int >::setOnRelease().
Bool casa::DParameterRange< T >::itsProvideEntry [private] |
Store for the 'provideentry' state of this parameter.
Definition at line 190 of file DParameterRange.h.
Referenced by casa::DParameterRange< Int >::provideEntry(), and casa::DParameterRange< Int >::setProvideEntry().
T casa::DParameterRange< T >::itsResolution [private] |
Store for the resolution of this parameter.
Definition at line 181 of file DParameterRange.h.
Referenced by casa::DParameterRange< Int >::resolution(), and casa::DParameterRange< Int >::setResolution().
T casa::DParameterRange< T >::itsValue [private] |
Store for the value of this parameter.
Definition at line 187 of file DParameterRange.h.
Referenced by casa::DParameterRange< Int >::operator=(), casa::DParameterRange< Int >::setValue(), and casa::DParameterRange< Int >::value().