If this line edit receives the focus it displays a combobox and hides the combobox if it loses the focus. This behaviour allows to share one single combobox amongst several line edits.
The widget should behave as normal line edit if it have no combobox assiged.
Definition at line 71 of file levaluecombo.h.
OSB_GUI::LeCombo::LeCombo | ( | QWidget * | parent, | |
const char * | name = "leCombo_" , |
|||
FocusOutCombo * | combo = 0 | |||
) | [explicit] |
Constructor with Qt arguments and combobox to use.
virtual OSB_GUI::LeCombo::~LeCombo | ( | ) | [virtual] |
Empty virtual destructor.
virtual void OSB_GUI::LeCombo::comboActivated | ( | int | index | ) | [protected, virtual, slot] |
Handle activation signals from the combobox.
index | Position of the activated item in the combobox. |
Reimplemented in OSB_GUI::LeValueCombo< Value >.
void OSB_GUI::LeCombo::comboFocusOut | ( | QFocusEvent * | e | ) | [private, slot] |
Handle focus-out events from the combobox.
void OSB_GUI::LeCombo::focusInEvent | ( | QFocusEvent * | e | ) | [private] |
Handle focus-in events.
Sets combo_ as its own child, connects to its signals sigFocusOut() and activated() and calls setComboItem().
virtual QSize OSB_GUI::LeCombo::minimumSizeHint | ( | ) | const [private, virtual] |
Minimum size: returns sizeHint().
void OSB_GUI::LeCombo::resizeEvent | ( | QResizeEvent * | e | ) | [private] |
Handle resize events.
Resizes combo_ if the widget is currently its parent.
void OSB_GUI::LeCombo::setCombo | ( | FocusOutCombo * | combo | ) |
virtual void OSB_GUI::LeCombo::setComboItem | ( | ) | const [protected, virtual] |
Set the current item of the combo box.
Called when the line edits gets the focus. The default implementation selects the item with the same text as the line edit; or, if no matching entry can be found, leaves the combobox unchanged.
Reimplemented in OSB_GUI::LeValueCombo< Value >.
virtual QSize OSB_GUI::LeCombo::sizeHint | ( | ) | const [private, virtual] |
Size hint: maximum of own and combobox size.
FocusOutCombo* OSB_GUI::LeCombo::combo_ [private] |
The combobox to use.
Reimplemented in OSB_GUI::LeValueCombo< Value >.
Definition at line 134 of file levaluecombo.h.
QWidget* OSB_GUI::LeCombo::nextFocus_ [private] |
Widget that should receive the forward keyboard focus.
Definition at line 138 of file levaluecombo.h.
QWidget* OSB_GUI::LeCombo::prevFocus_ [private] |
Widget that should receive the backward keyboard focus.
Definition at line 136 of file levaluecombo.h.