casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
casa::DParameterRange< T > Class Template Reference

A helper class to deal with data ranges to support options. More...

#include <DParameterRange.h>

Inheritance diagram for casa::DParameterRange< T >:
casa::DisplayParameter

List of all members.

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.
minimum ()
 Return the minimum for this parameter.
maximum ()
 Return the maximum for this parameter.
resolution ()
 Return the resolution of this parameter.
defaultValue ()
 Return the default for this parameter.
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

itsMinimum
 Store for the minimum of this parameter.
itsMaximum
 Store for the maximum of this parameter.
itsResolution
 Store for the resolution of this parameter.
itsDefault
 Store for the default of this parameter.
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.

Detailed Description

template<class T>
class casa::DParameterRange< T >

A helper class to deal with data ranges to support options.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

Synopsis

Example

Motivation

Making things easier

Definition at line 66 of file DParameterRange.h.


Constructor & Destructor Documentation

template<class T>
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.

template<class T>
casa::DParameterRange< T >::DParameterRange ( )

(Required) default constructor.

template<class T>
casa::DParameterRange< T >::DParameterRange ( const DParameterRange< T > &  other)

(Required) copy constructor.

template<class T>
virtual casa::DParameterRange< T >::~DParameterRange ( ) [virtual]

Destructor.


Member Function Documentation

template<class T>
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().

template<class T>
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.

template<class T>
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().

template<class T>
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().

template<class T>
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.

template<class T>
DParameterRange<T>& casa::DParameterRange< T >::operator= ( const DParameterRange< T > &  other)

(Required) copy assignment.

template<class T>
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.

template<class T>
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.

template<class T>
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().

template<class T>
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.

template<class T>
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.

template<class T>
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.

template<class T>
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.

template<class T>
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.

template<class T>
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.

template<class T>
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.

template<class T>
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.

template<class T>
T casa::DParameterRange< T >::value ( ) [inline]

Member Data Documentation

template<class T>
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().

template<class T>
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().

template<class T>
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().

template<class T>
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().

template<class T>
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().

template<class T>
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().

template<class T>
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().


The documentation for this class was generated from the following file: