casa
$Rev:20696$
|
A ParamPanel holds information for a single parameter. More...
#include <ParamPanel.qo.h>
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. | |
ValuePanel * | value () |
Returns the ValuePanel. | |
pair< bool, String > | isValid () |
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 RecordInterface & | m_record |
Parameter attributes. | |
const Record & | m_globals |
Global settings. | |
const Record & | m_last |
Last settings. | |
const QtParamGUI::ResetMode & | m_resetMode |
Reset to globals or defaults. | |
QLabel * | m_units |
(Optional) label to display units. | |
ValuePanel * | m_value |
Value panel. | |
QDialog * | m_constDialog |
Constraints dialog. |
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.
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.
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.
QDialog* casa::ParamPanel::m_constDialog [private] |
Constraints dialog.
Definition at line 117 of file ParamPanel.qo.h.
const Record& casa::ParamPanel::m_globals [private] |
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.
String casa::ParamPanel::m_name [private] |
Parameter name.
Definition at line 96 of file ParamPanel.qo.h.
const RecordInterface& casa::ParamPanel::m_record [private] |
Parameter attributes.
Definition at line 99 of file ParamPanel.qo.h.
const QtParamGUI::ResetMode& casa::ParamPanel::m_resetMode [private] |
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.
ValuePanel* casa::ParamPanel::m_value [private] |
Value panel.
Definition at line 114 of file ParamPanel.qo.h.