casa
$Rev:20696$
|
Standard subclass of ValuePanel that controls widget(s) to allow the user to input a standard value. More...
#include <ValuePanel.qo.h>
Signals | |
void | valueChanged () |
Emitted when the user changes the value. | |
Public Member Functions | |
StandardValuePanel (String paramName, const RecordInterface ¶mRecord) | |
Constructor that takes the parameter name and specification record. | |
~StandardValuePanel () | |
Destructor. | |
pair< bool, String > | valueIsValid () |
ValuePanel methods. | |
DataType | type () |
See ValuePanel::type. | |
void | getValue (String name, Record &record) |
See ValuePanel::getValue. | |
void | setValue (const RecordInterface &rec, RecordFieldId id) |
See ValuePanel::setValue. | |
Private Slots | |
void | typeChanged (QString newType) |
Slot for when the user chooses a different type (for variants). | |
void | lessArray () |
Decrease array widgets by one. | |
void | moreArray () |
Increase array widgets by one. | |
void | lessRecord () |
Decrease record items by one. | |
void | moreRecord () |
Increase record items by one. | |
void | browse () |
Show a file dialog and put the result in the string value. | |
void | changedValue () |
Connecting the various widgets to emit the valueChanged signal. | |
Private Member Functions | |
void | setType (DataType type) |
Set the type of this ValuePanel to the given. | |
void | limitTypes (vector< String > types) |
Limit the chooseable types to the given, for variant values. | |
void | setIntRangeFrom (int from) |
Set the lower bound for inputted int values. | |
void | setIntRangeTo (int to) |
Set the upper bound for inputted int values. | |
void | setDoubleRangeFrom (double from) |
Set the lower bound for inputted double values. | |
void | setDoubleRangeTo (double to) |
Set the upper bound for inputted double values. | |
void | setStringValue (String val) |
Set the string value to the given. | |
void | setBoolValue (bool val) |
Set the bool value to the given. | |
void | setDoubleValue (double val) |
Set the double value to the given. | |
void | setIntValue (int val) |
Set the int value to the given. | |
void | setComplexValue (double val1, double val2) |
Set the complex value to the given. | |
void | setRecordValue (const RecordInterface &record) |
Set the record value to the given. | |
void | setAllowedValue (String val) |
Set the value to the given allowed value. | |
void | setStringArrayValue (const vector< String > &array) |
Set the string array value to the given. | |
void | setBoolArrayValue (const vector< bool > &array) |
Set the bool array value to the given. | |
void | setDoubleArrayValue (const vector< double > &array) |
Set the double array value to the given. | |
void | setIntArrayValue (const vector< int > &array) |
Set the int array value to the given. | |
void | setComplexArrayValue (const vector< DComplex > &array) |
Set the complex array value to the given. | |
QWidget * | arrayWidget () |
Returns a new array widget based on the current type. | |
Static Private Member Functions | |
static vector< DataType > | supportedTypes () |
Holds the types supported by the variant panel. | |
Private Attributes | |
DataType | m_type |
Current type. | |
bool | m_mustExist |
Whether a value is a filename that must exist for it to be valid. | |
vector< QWidget * > | m_aWidgets |
Array widgets (for array types only). | |
vector< RecordItemPanel * > | m_rPanels |
Record item panels (for records only). | |
vector< String > | m_allowed |
Allowed values, or empty if N/A. | |
bool | m_isVariant |
Holds whether the value is a variant or not. | |
pair< int, bool > | m_intFrom |
Current int bounds. | |
pair< int, bool > | m_intTo |
pair< double, bool > | m_doubleFrom |
Current double bounds. | |
pair< double, bool > | m_doubleTo |
Standard subclass of ValuePanel that controls widget(s) to allow the user to input a standard value.
StandardValuePanel can handle values of all "normal" types defined in the DataType. StandardValuePanel can also handle values of type "any" (variant) by providing a combo box to allow the user to switch between value types.
Definition at line 96 of file ValuePanel.qo.h.
casa::StandardValuePanel::StandardValuePanel | ( | String | paramName, |
const RecordInterface & | paramRecord | ||
) |
Constructor that takes the parameter name and specification record.
casa::StandardValuePanel::~StandardValuePanel | ( | ) |
Destructor.
QWidget* casa::StandardValuePanel::arrayWidget | ( | ) | [private] |
Returns a new array widget based on the current type.
Used for adding an item to an array list.
void casa::StandardValuePanel::browse | ( | ) | [private, slot] |
Show a file dialog and put the result in the string value.
void casa::StandardValuePanel::changedValue | ( | ) | [inline, private, slot] |
Connecting the various widgets to emit the valueChanged signal.
Definition at line 259 of file ValuePanel.qo.h.
See ValuePanel::getValue.
Implements casa::ValuePanel.
void casa::StandardValuePanel::lessArray | ( | ) | [private, slot] |
Decrease array widgets by one.
void casa::StandardValuePanel::lessRecord | ( | ) | [private, slot] |
Decrease record items by one.
void casa::StandardValuePanel::limitTypes | ( | vector< String > | types | ) | [private] |
Limit the chooseable types to the given, for variant values.
May not have a noticeable effect if the type is incompatible.
void casa::StandardValuePanel::moreArray | ( | ) | [private, slot] |
Increase array widgets by one.
void casa::StandardValuePanel::moreRecord | ( | ) | [private, slot] |
Increase record items by one.
void casa::StandardValuePanel::setAllowedValue | ( | String | val | ) | [private] |
Set the value to the given allowed value.
May not have a noticeable effect if the type is incompatible.
void casa::StandardValuePanel::setBoolArrayValue | ( | const vector< bool > & | array | ) | [private] |
Set the bool array value to the given.
May not have a noticeable effect if the type is incompatible.
void casa::StandardValuePanel::setBoolValue | ( | bool | val | ) | [private] |
Set the bool value to the given.
May not have a noticeable effect if the type is incompatible.
void casa::StandardValuePanel::setComplexArrayValue | ( | const vector< DComplex > & | array | ) | [private] |
Set the complex array value to the given.
May not have a noticeable effect if the type is incompatible.
void casa::StandardValuePanel::setComplexValue | ( | double | val1, |
double | val2 | ||
) | [private] |
Set the complex value to the given.
May not have a noticeable effect if the type is incompatible.
void casa::StandardValuePanel::setDoubleArrayValue | ( | const vector< double > & | array | ) | [private] |
Set the double array value to the given.
May not have a noticeable effect if the type is incompatible.
void casa::StandardValuePanel::setDoubleRangeFrom | ( | double | from | ) | [private] |
Set the lower bound for inputted double values.
May not have a noticeable effect if the type is incompatible.
void casa::StandardValuePanel::setDoubleRangeTo | ( | double | to | ) | [private] |
Set the upper bound for inputted double values.
May not have a noticeable effect if the type is incompatible.
void casa::StandardValuePanel::setDoubleValue | ( | double | val | ) | [private] |
Set the double value to the given.
May not have a noticeable effect if the type is incompatible.
void casa::StandardValuePanel::setIntArrayValue | ( | const vector< int > & | array | ) | [private] |
Set the int array value to the given.
May not have a noticeable effect if the type is incompatible.
void casa::StandardValuePanel::setIntRangeFrom | ( | int | from | ) | [private] |
Set the lower bound for inputted int values.
May not have a noticeable effect if the type is incompatible.
void casa::StandardValuePanel::setIntRangeTo | ( | int | to | ) | [private] |
Set the upper bound for inputted int values.
May not have a noticeable effect if the type is incompatible.
void casa::StandardValuePanel::setIntValue | ( | int | val | ) | [private] |
Set the int value to the given.
May not have a noticeable effect if the type is incompatible.
void casa::StandardValuePanel::setRecordValue | ( | const RecordInterface & | record | ) | [private] |
Set the record value to the given.
May not have a noticeable effect if the type is incompatible.
void casa::StandardValuePanel::setStringArrayValue | ( | const vector< String > & | array | ) | [private] |
Set the string array value to the given.
May not have a noticeable effect if the type is incompatible.
void casa::StandardValuePanel::setStringValue | ( | String | val | ) | [private] |
Set the string value to the given.
May not have a noticeable effect if the type is incompatible.
void casa::StandardValuePanel::setType | ( | DataType | type | ) | [private] |
Set the type of this ValuePanel to the given.
May change the displayed input widgets.
void casa::StandardValuePanel::setValue | ( | const RecordInterface & | rec, |
RecordFieldId | id | ||
) | [virtual] |
See ValuePanel::setValue.
Implements casa::ValuePanel.
static vector<DataType> casa::StandardValuePanel::supportedTypes | ( | ) | [inline, static, private] |
Holds the types supported by the variant panel.
Definition at line 228 of file ValuePanel.qo.h.
DataType casa::StandardValuePanel::type | ( | ) | [virtual] |
See ValuePanel::type.
Implements casa::ValuePanel.
void casa::StandardValuePanel::typeChanged | ( | QString | newType | ) | [private, slot] |
Slot for when the user chooses a different type (for variants).
void casa::StandardValuePanel::valueChanged | ( | ) | [signal] |
Emitted when the user changes the value.
pair<bool, String> casa::StandardValuePanel::valueIsValid | ( | ) | [virtual] |
vector<String> casa::StandardValuePanel::m_allowed [private] |
Allowed values, or empty if N/A.
Definition at line 139 of file ValuePanel.qo.h.
vector<QWidget*> casa::StandardValuePanel::m_aWidgets [private] |
Array widgets (for array types only).
Definition at line 133 of file ValuePanel.qo.h.
pair<double, bool> casa::StandardValuePanel::m_doubleFrom [private] |
Current double bounds.
The second element holds whether it has been set.
Definition at line 148 of file ValuePanel.qo.h.
pair<double, bool> casa::StandardValuePanel::m_doubleTo [private] |
Definition at line 148 of file ValuePanel.qo.h.
pair<int, bool> casa::StandardValuePanel::m_intFrom [private] |
Current int bounds.
The second element holds whether it has been set.
Definition at line 145 of file ValuePanel.qo.h.
pair<int, bool> casa::StandardValuePanel::m_intTo [private] |
Definition at line 145 of file ValuePanel.qo.h.
bool casa::StandardValuePanel::m_isVariant [private] |
Holds whether the value is a variant or not.
Definition at line 142 of file ValuePanel.qo.h.
bool casa::StandardValuePanel::m_mustExist [private] |
Whether a value is a filename that must exist for it to be valid.
Definition at line 130 of file ValuePanel.qo.h.
vector<RecordItemPanel*> casa::StandardValuePanel::m_rPanels [private] |
Record item panels (for records only).
Definition at line 136 of file ValuePanel.qo.h.
DataType casa::StandardValuePanel::m_type [private] |
Current type.
Definition at line 127 of file ValuePanel.qo.h.