It provides the mapping between the current item of the combobox and Value.
Value | This is the value that is mapped against the index. |
Definition at line 120 of file osbcombos.h.
typedef ValueMap::size_type OSB_GUI::ValueCombo< Value >::Size [private] |
typedef std::vector<Value> OSB_GUI::ValueCombo< Value >::ValueMap [private] |
OSB_GUI::ValueCombo< Value >::ValueCombo | ( | QWidget * | parent, | |
const char * | name | |||
) |
OSB_GUI::ValueCombo< Value >::~ValueCombo | ( | ) | [pure virtual] |
int OSB_GUI::ValueCombo< Value >::addValue | ( | const Value & | value, | |
const QPixmap & | pixmap, | |||
const std::string & | text | |||
) |
Add a value to the combo.
value | Value to add. | |
pixmap | Text for value. | |
text | Text for value. |
Definition at line 346 of file osbcombos.h.
References OSB_GUI::ValueCombo< Value >::valueMap_.
int OSB_GUI::ValueCombo< Value >::addValue | ( | const Value & | value, | |
const std::string & | text | |||
) |
Add a value to the combo.
value | Value to add. | |
text | Text for value. |
Definition at line 334 of file osbcombos.h.
References OSB_GUI::ValueCombo< Value >::valueMap_.
void OSB_GUI::ValueCombo< Value >::clear | ( | ) |
Remove all entries from the combo box.
Calls QComboBox::clear() and clearValueMap().
Definition at line 321 of file osbcombos.h.
References OSB_GUI::ValueCombo< Value >::clearValueMap().
void OSB_GUI::ValueCombo< Value >::clearValueMap | ( | ) | [protected] |
Clear all entries in the value map.
Definition at line 328 of file osbcombos.h.
References OSB_GUI::ValueCombo< Value >::valueMap_.
Referenced by OSB_GUI::ValueCombo< Value >::clear().
int OSB_GUI::ValueCombo< Value >::getIndex | ( | const Value & | value | ) | const |
Get the index of a value.
Definition at line 300 of file osbcombos.h.
References OSB_GUI::ValueCombo< Value >::valueMap_.
Referenced by OSB_GUI::ValueCombo< Value >::select(), and OSB_GUI::ValueCombo< Value >::setText().
Value OSB_GUI::ValueCombo< Value >::getValue | ( | int | index | ) | const |
Get value at an index.
Definition at line 284 of file osbcombos.h.
References OSB_GUI::ValueCombo< Value >::valueMap_.
Value OSB_GUI::ValueCombo< Value >::getValue | ( | ) | const |
Get the selected value.
Gets the index for the current item and returns the value from valueMap_ or Value() if the index is not valid.
Definition at line 293 of file osbcombos.h.
int OSB_GUI::ValueCombo< Value >::select | ( | const Value & | value | ) |
Set the selected value.
value | Value to select. |
Definition at line 313 of file osbcombos.h.
References OSB_GUI::ValueCombo< Value >::getIndex().
int OSB_GUI::ValueCombo< Value >::setText | ( | const Value & | value, | |
const std::string & | text | |||
) |
Change the text for a value.
value | Value to change. | |
text | Text for value. |
Definition at line 359 of file osbcombos.h.
References OSB_GUI::ValueCombo< Value >::getIndex().
ValueMap OSB_GUI::ValueCombo< Value >::valueMap_ [private] |
Map index <-> Value.
Definition at line 211 of file osbcombos.h.
Referenced by OSB_GUI::ValueCombo< Value >::addValue(), OSB_GUI::ValueCombo< Value >::clearValueMap(), OSB_GUI::ValueCombo< Value >::getIndex(), and OSB_GUI::ValueCombo< Value >::getValue().