casa  $Rev:20696$
Public Slots | Signals | Public Member Functions | Private Slots | Private Member Functions | Private Attributes
casa::ParamPanel Class Reference

A ParamPanel holds information for a single parameter. More...

#include <ParamPanel.qo.h>

List of all members.

Public Slots

void reset ()
 Reset the value to the default (if any).

Signals

void valueChanged (String name)
 Emitted when the user changes the value in this panel.

Public Member Functions

 ParamPanel (const QtParamGUI &parent, String name, const RecordInterface &record, const Record &globals, const Record &last, const QtParamGUI::ResetMode &resetMode, int labelWidth=-1, const String &constraints="", bool subparam=false)
 Constructor that takes the parameter name and a record describing its attributes.
 ~ParamPanel ()
 Destructor.
String name ()
 Returns the parameter's name.
ValuePanelvalue ()
 Returns the ValuePanel.
pair< bool, StringisValid ()
 Returns whether the current value given to the parameter is valid or not.
void getValue (Record &record)
 Put the current value into the record with the parameter name as the key.

Private Slots

void showHideDesc ()
 Show or hide the panel with the description and extra info.
void showHideConstraints (bool checked)
 Show/hide the constraints dialog.
void constraintsClosed ()
 When the constraints dialog is closed.
void changedValue ()
 Catch the value panel's valueChanged signal and re-emit it.

Private Member Functions

void setValue ()
 Sets the value to the default defined in the attributes.

Private Attributes

String m_name
 Parameter name.
const RecordInterfacem_record
 Parameter attributes.
const Recordm_globals
 Global settings.
const Recordm_last
 Last settings.
const QtParamGUI::ResetModem_resetMode
 Reset to globals or defaults.
QLabel * m_units
 (Optional) label to display units.
ValuePanelm_value
 Value panel.
QDialog * m_constDialog
 Constraints dialog.

Detailed Description

A ParamPanel holds information for a single parameter.

It displays the parameter information (name, type, description, etc.) and provides a widget(s) for the user to input a value for that parameter. These widget(s) are held in a ValuePanel.

Definition at line 45 of file ParamPanel.qo.h.


Constructor & Destructor Documentation

casa::ParamPanel::ParamPanel ( const QtParamGUI parent,
String  name,
const RecordInterface record,
const Record globals,
const Record last,
const QtParamGUI::ResetMode resetMode,
int  labelWidth = -1,
const String constraints = "",
bool  subparam = false 
)

Constructor that takes the parameter name and a record describing its attributes.

Allowed attributes include: allowed: a list of possible values to choose from description: a description of the parameter example: example(s) for the parameter kind: indicates whether the parameter has a special type (such as a file) limittypes: if the parameter is type "any", the potential types can be limited mustexist: if the parameter requires a non-empty value range: range of values for numeric types type (required): the type for the parameter units: what conceptual units the parameter is in value: a default value

casa::ParamPanel::~ParamPanel ( )

Destructor.


Member Function Documentation

void casa::ParamPanel::changedValue ( ) [inline, private, slot]

Catch the value panel's valueChanged signal and re-emit it.

Definition at line 134 of file ParamPanel.qo.h.

void casa::ParamPanel::constraintsClosed ( ) [private, slot]

When the constraints dialog is closed.

void casa::ParamPanel::getValue ( Record record)

Put the current value into the record with the parameter name as the key.

pair<bool, String> casa::ParamPanel::isValid ( )

Returns whether the current value given to the parameter is valid or not.

If not valid, the second pair value is the reason why.

String casa::ParamPanel::name ( )

Returns the parameter's name.

void casa::ParamPanel::reset ( ) [slot]

Reset the value to the default (if any).

void casa::ParamPanel::setValue ( ) [private]

Sets the value to the default defined in the attributes.

void casa::ParamPanel::showHideConstraints ( bool  checked) [private, slot]

Show/hide the constraints dialog.

void casa::ParamPanel::showHideDesc ( ) [private, slot]

Show or hide the panel with the description and extra info.

ValuePanel* casa::ParamPanel::value ( )

Returns the ValuePanel.

void casa::ParamPanel::valueChanged ( String  name) [signal]

Emitted when the user changes the value in this panel.


Member Data Documentation

QDialog* casa::ParamPanel::m_constDialog [private]

Constraints dialog.

Definition at line 117 of file ParamPanel.qo.h.

Global settings.

Definition at line 102 of file ParamPanel.qo.h.

const Record& casa::ParamPanel::m_last [private]

Last settings.

Definition at line 105 of file ParamPanel.qo.h.

Parameter name.

Definition at line 96 of file ParamPanel.qo.h.

Parameter attributes.

Definition at line 99 of file ParamPanel.qo.h.

Reset to globals or defaults.

Definition at line 108 of file ParamPanel.qo.h.

QLabel* casa::ParamPanel::m_units [private]

(Optional) label to display units.

Definition at line 111 of file ParamPanel.qo.h.

Value panel.

Definition at line 114 of file ParamPanel.qo.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines