casa
5.7.0-16
|
A helper class to deal with data ranges to support options. More...
#include <DSMarker.h>
Public Member Functions | |
DParameterRange (const casacore::String name, const casacore::String description, const casacore::String help, const T minimum, const T maximum, const T resolution, const T defaultvalue, const T value, const casacore::String context="", const casacore::Bool editable=true, const casacore::Bool provideentry=false, const casacore::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. More... | |
DParameterRange () | |
(Required) default constructor. More... | |
DParameterRange (const DParameterRange< T > &other) | |
(Required) copy constructor. More... | |
virtual | ~DParameterRange () |
Destructor. More... | |
DParameterRange< T > & | operator= (const DParameterRange< T > &other) |
(Required) copy assignment. More... | |
virtual casacore::Bool | fromRecord (const casacore::RecordInterface &record) |
Parse record , and update this parameter if a field exists whose name matches that of this parameter. More... | |
virtual void | toRecord (casacore::RecordInterface &record, const casacore::Bool fullrecord=true, const casacore::Bool overwrite=false) |
Place a record describing this parameter in a sub-field of record with name matching that of this parameter. More... | |
T | minimum () |
Return the minimum for this parameter. More... | |
T | maximum () |
Return the maximum for this parameter. More... | |
T | resolution () |
Return the resolution of this parameter. More... | |
T | defaultValue () |
Return the default for this parameter. More... | |
T | value () |
Return the current value of this parameter. More... | |
casacore::Bool | provideEntry () |
Return whether there should be a text box beside the slider. More... | |
casacore::Bool | onRelease () |
Return whether the slider event should occur when the user releases the slider, i.e. More... | |
void | setMinimum (const T minimum) |
Set or change the minimum for this parameter. More... | |
void | setMaximum (const T maximum) |
Set or change the maximum for this parameter. More... | |
void | setResolution (const T resolution) |
Set or change the resolution for this parameter. More... | |
void | setDefaultValue (const T defaultValue) |
Set or change the default for this parameter. More... | |
void | setValue (const T value) |
Set or change the current value for this parameter. More... | |
const T & | operator= (const T &value) |
Convenient syntax to set (only) the value. More... | |
void | setProvideEntry (const casacore::Bool provideentry) |
Set or change the provideentry state for this parameter. More... | |
void | setOnRelease (const casacore::Bool onrelease) |
Set or change the onrelease state for this parameter. More... | |
Public Member Functions inherited from casa::DisplayParameter | |
virtual | ~DisplayParameter () |
Destructor. More... | |
casacore::String | name () const |
Return the name of this parameter. More... | |
casacore::String | description () const |
Return the description of this parameter. More... | |
casacore::String | help () const |
Return the help for this parameter. More... | |
casacore::String | context () const |
Return the context of this parameter. More... | |
casacore::Bool | allowUnset () const |
Return whether this parameter can be unset. More... | |
casacore::Bool | editable () const |
Return whether this parameter is editable. More... | |
void | setName (const casacore::String name) |
Set or change the name of this parameter to that specified. More... | |
void | setDescription (const casacore::String description) |
Set or change the description of this parameter to what is specified. More... | |
void | setHelp (const casacore::String help) |
Set or change the help for this parameter to what is specified. More... | |
void | setContext (const casacore::String context) |
Set or change the context of this parameter to what is specified. More... | |
void | setAllowUnset (const casacore::Bool allowunset) |
Set or change whether this parameter may be unset, according to the function argument value. More... | |
void | setEditable (const casacore::Bool editable) |
Set or change whether this parameter is editable according to the function argument. More... | |
Private Attributes | |
T | itsMinimum |
Store for the minimum of this parameter. More... | |
T | itsMaximum |
Store for the maximum of this parameter. More... | |
T | itsResolution |
Store for the resolution of this parameter. More... | |
T | itsDefault |
Store for the default of this parameter. More... | |
T | itsValue |
Store for the value of this parameter. More... | |
casacore::Bool | itsProvideEntry |
Store for the 'provideentry' state of this parameter. More... | |
casacore::Bool | itsOnRelease |
Store for the 'onrelease' state of this parameter. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from casa::DisplayParameter | |
DisplayParameter (const casacore::String name, const casacore::String description, const casacore::String help, const casacore::String context="", const casacore::Bool allowunset=false, const casacore::Bool editable=true) | |
Constructor taking the name of the parameter, a short description, some help text, and flags indicating whether the parameter can be unset and is editable. More... | |
DisplayParameter (const DisplayParameter &other) | |
Copy constructor using copy semantics. More... | |
DisplayParameter () | |
Default constructor yielding a useless DisplayParameter. More... | |
DisplayParameter & | operator= (const DisplayParameter &other) |
Copy assignment. More... | |
casacore::Record | baseDescription () |
Return a basic description of this parameter; used by virtual implementations of toRecord method to fill out a casacore::Record describing this DisplayParameter. More... | |
const DisplayOptions & | displayOptions () const |
Return the DisplayOptions to use for parsing Records. More... | |
A helper class to deal with data ranges to support options.
Public interface
Making things easier
Definition at line 45 of file DSMarker.h.
casa::DParameterRange< T >::DParameterRange | ( | const casacore::String | name, |
const casacore::String | description, | ||
const casacore::String | help, | ||
const T | minimum, | ||
const T | maximum, | ||
const T | resolution, | ||
const T | defaultvalue, | ||
const T | value, | ||
const casacore::String | context = "" , |
||
const casacore::Bool | editable = true , |
||
const casacore::Bool | provideentry = false , |
||
const casacore::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 |
Destructor.
|
inline |
Return the default for this parameter.
Definition at line 124 of file DParameterRange.h.
Referenced by casa::DParameterRange< casacore::Int >::setDefaultValue().
|
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.
|
inline |
Return the maximum for this parameter.
Definition at line 114 of file DParameterRange.h.
Referenced by casa::QtDisplayData::colorBarSizeAdj(), and casa::DParameterRange< casacore::Int >::setMaximum().
|
inline |
Return the minimum for this parameter.
Definition at line 109 of file DParameterRange.h.
Referenced by casa::QtDisplayData::colorBarSizeAdj(), and casa::DParameterRange< casacore::Int >::setMinimum().
|
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 142 of file DParameterRange.h.
DParameterRange<T>& casa::DParameterRange< T >::operator= | ( | const DParameterRange< T > & | other | ) |
(Required) copy assignment.
|
inline |
Convenient syntax to set (only) the value.
Definition at line 173 of file DParameterRange.h.
|
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 135 of file DParameterRange.h.
|
inline |
Return the resolution of this parameter.
Definition at line 119 of file DParameterRange.h.
Referenced by casa::DParameterRange< casacore::Int >::setResolution().
|
inline |
Set or change the default for this parameter.
Definition at line 163 of file DParameterRange.h.
|
inline |
Set or change the maximum for this parameter.
Definition at line 153 of file DParameterRange.h.
|
inline |
Set or change the minimum for this parameter.
Definition at line 148 of file DParameterRange.h.
|
inline |
Set or change the onrelease state for this parameter.
Definition at line 184 of file DParameterRange.h.
|
inline |
Set or change the provideentry state for this parameter.
Definition at line 179 of file DParameterRange.h.
|
inline |
Set or change the resolution for this parameter.
Definition at line 158 of file DParameterRange.h.
|
inline |
Set or change the current value for this parameter.
Definition at line 168 of file DParameterRange.h.
|
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.
|
inline |
Return the current value of this parameter.
Definition at line 129 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< casacore::Int >::operator=(), casa::Profile2dDD::profileLineWidth(), casa::Profile2dDD::regionXRadius(), casa::Profile2dDD::regionYRadius(), and casa::DParameterRange< casacore::Int >::setValue().
|
private |
Store for the default of this parameter.
Definition at line 200 of file DParameterRange.h.
Referenced by casa::DParameterRange< casacore::Int >::defaultValue(), and casa::DParameterRange< casacore::Int >::setDefaultValue().
|
private |
Store for the maximum of this parameter.
Definition at line 194 of file DParameterRange.h.
Referenced by casa::DParameterRange< casacore::Int >::maximum(), and casa::DParameterRange< casacore::Int >::setMaximum().
|
private |
Store for the minimum of this parameter.
Definition at line 191 of file DParameterRange.h.
Referenced by casa::DParameterRange< casacore::Int >::minimum(), and casa::DParameterRange< casacore::Int >::setMinimum().
|
private |
Store for the 'onrelease' state of this parameter.
Definition at line 209 of file DParameterRange.h.
Referenced by casa::DParameterRange< casacore::Int >::onRelease(), and casa::DParameterRange< casacore::Int >::setOnRelease().
|
private |
Store for the 'provideentry' state of this parameter.
Definition at line 206 of file DParameterRange.h.
Referenced by casa::DParameterRange< casacore::Int >::provideEntry(), and casa::DParameterRange< casacore::Int >::setProvideEntry().
|
private |
Store for the resolution of this parameter.
Definition at line 197 of file DParameterRange.h.
Referenced by casa::DParameterRange< casacore::Int >::resolution(), and casa::DParameterRange< casacore::Int >::setResolution().
|
private |
Store for the value of this parameter.
Definition at line 203 of file DParameterRange.h.
Referenced by casa::DParameterRange< casacore::Int >::operator=(), casa::DParameterRange< casacore::Int >::setValue(), and casa::DParameterRange< casacore::Int >::value().