casa
5.7.0-16
|
Implementation of DisplayParameter to package interface to button autoguis. More...
#include <DParameterButton.h>
Public Member Functions | |
DParameterButton (const casacore::String name, const casacore::String description, const casacore::String text, const casacore::String help="", const casacore::String context="", const casacore::Bool editable=true) | |
Constructor taking the name (id) of the button, a label which will appear beside the button, and the text which will appear on the button. More... | |
DParameterButton (const DParameterButton &other) | |
copy constructor. More... | |
virtual | ~DParameterButton () |
Destructor. More... | |
DParameterButton & | operator= (const DParameterButton &other) |
copy assignment. More... | |
virtual casacore::Bool | fromRecord (const casacore::RecordInterface &record) |
Determine whether the record (passed originally from autogui.g) indicates that the button was pressed. More... | |
virtual void | toRecord (casacore::RecordInterface &record, const casacore::Bool fullrecord=true, const casacore::Bool overwrite=false) |
Place a record describing this button in a sub-field of record with name matching that of 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 Member Functions | |
DParameterButton () | |
default constructor disabled–do not use. More... | |
Private Attributes | |
casacore::String | itsText |
Store for the text on the button. 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... | |
Implementation of DisplayParameter to package interface to button autoguis.
Public interface
DParameterButton is an implementation of a DisplayParameter for Buttons. It defines the necessary information to define a button in autogui.g, and packages it into the parameter record field autogui requires.
This class is derived from DisplayParameter It holds the meta-information neccessary to define a button widget, packaging it into the 'parameter record' field required by autogui.g. It can determine whether the button was pressed. The 'value' has no meaning here (it will be true).
Allows buttons to be defined using the same compact DParameter interface used for other autogui widgets.
Definition at line 92 of file DParameterButton.h.
casa::DParameterButton::DParameterButton | ( | const casacore::String | name, |
const casacore::String | description, | ||
const casacore::String | text, | ||
const casacore::String | help = "" , |
||
const casacore::String | context = "" , |
||
const casacore::Bool | editable = true |
||
) |
Constructor taking the name (id) of the button, a label which will appear beside the button, and the text which will appear on the button.
Optionally, popup help text, 'context' string, and a flag indicating whether the button is enabled (disable is not fully supported yet). The context string determines which autogui rollup the button will appear in (replace spaces with underscores in this string).
casa::DParameterButton::DParameterButton | ( | const DParameterButton & | other | ) |
copy constructor.
|
virtual |
Destructor.
|
inlineprivate |
default constructor disabled–do not use.
Definition at line 133 of file DParameterButton.h.
|
virtual |
Determine whether the record (passed originally from autogui.g) indicates that the button was pressed.
Implements casa::DisplayParameter.
DParameterButton& casa::DParameterButton::operator= | ( | const DParameterButton & | other | ) |
copy assignment.
|
virtual |
Place a record describing this button 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
. (At present, fullrecord
is ignored; the full record is always returned).
Implements casa::DisplayParameter.
|
private |
Store for the text on the button.
Definition at line 136 of file DParameterButton.h.