kexi
KexiComboBoxBase Class Reference
#include <kexicomboboxbase.h>
Inheritance diagram for KexiComboBoxBase:

Detailed Description
A base class for handling data-aware combo boxes. This class is used by KexiComboBoxTableEdit and KexiDBComboBox.
Definition at line 37 of file kexicomboboxbase.h.
Member Function Documentation
virtual KexiTableViewColumn* KexiComboBoxBase::column | ( | ) | const [pure virtual] |
- Returns:
- column related to this combo; for KexiComboBoxTableEdit 0 is returned here
Implemented in KexiDBComboBox, and KexiComboBoxTableEdit.
virtual KexiDB::Field* KexiComboBoxBase::field | ( | ) | const [pure virtual] |
- Returns:
- database field related to this combo
Implemented in KexiDBComboBox, and KexiComboBoxTableEdit.
virtual QVariant KexiComboBoxBase::origValue | ( | ) | const [pure virtual] |
QVariant KexiComboBoxBase::value | ( | ) | [virtual] |
Note: Generally in current implementation this is integer > 0; may be null if no value is set.
it &&
- Todo:
- don't return just 1st row, but use autocompletion feature and: show message box if entered text does not match!
Reimplemented in KexiDBComboBox, and KexiComboBoxTableEdit.
Definition at line 237 of file kexicomboboxbase.cpp.
void KexiComboBoxBase::clear | ( | ) | [virtual] |
Reimplement this and call this impl.: used to clear internal editor.
Reimplemented in KexiComboBoxTableEdit.
Definition at line 301 of file kexicomboboxbase.cpp.
void KexiComboBoxBase::createPopup | ( | bool | show | ) |
Definition at line 350 of file kexicomboboxbase.cpp.
void KexiComboBoxBase::slotRowAccepted | ( | KexiTableItem * | item, | |
int | row | |||
) | [virtual] |
Call this from slot.
Reimplemented in KexiDBComboBox, and KexiComboBoxTableEdit.
Definition at line 434 of file kexicomboboxbase.cpp.
void KexiComboBoxBase::slotItemSelected | ( | KexiTableItem * | ) | [virtual] |
Call this from slot.
Reimplemented in KexiDBComboBox, and KexiComboBoxTableEdit.
Definition at line 456 of file kexicomboboxbase.cpp.
void KexiComboBoxBase::slotInternalEditorValueChanged | ( | const QVariant & | v | ) |
Call this from slot.
Reimplemented in KexiDBComboBox, and KexiComboBoxTableEdit.
Definition at line 498 of file kexicomboboxbase.cpp.
virtual QWidget* KexiComboBoxBase::internalEditor | ( | ) | const [pure virtual] |
Implement this to return the internal editor.
Implemented in KexiDBComboBox, and KexiComboBoxTableEdit.
void KexiComboBoxBase::setValueInternal | ( | const QVariant & | add, | |
bool | removeOld | |||
) | [protected, virtual] |
Reimplemented in KexiDBComboBox, and KexiComboBoxTableEdit.
Definition at line 89 of file kexicomboboxbase.cpp.
KexiTableItem * KexiComboBoxBase::selectItemForEnteredValueInLookupTable | ( | const QVariant & | v | ) | [protected] |
Used to select row item for an user-entered value v.
Only for "lookup table" mode.
Definition at line 168 of file kexicomboboxbase.cpp.
QString KexiComboBoxBase::valueForString | ( | const QString & | str, | |
int * | row, | |||
uint | lookInColumn, | |||
uint | returnFromColumn, | |||
bool | allowNulls = false | |||
) | [protected] |
- Returns:
- value from returnFromColumn related to str value from column lookInColumn. If allowNulls is true, NULL is returend if no matched column found, else: str is returned. Example: lookInColumn=0, returnFromColumn=1 --returns user-visible string for column #1 for id-column #0
Definition at line 207 of file kexicomboboxbase.cpp.
void KexiComboBoxBase::setValueOrTextInInternalEditor | ( | const QVariant & | value | ) | [protected] |
sets value for the line edit without setting a flag (m_userEnteredValue) that indicates that the text has been entered by hand (by a user)
Definition at line 512 of file kexicomboboxbase.cpp.
KexiDB::LookupFieldSchema * KexiComboBoxBase::lookupFieldSchema | ( | ) | const [protected] |
- Returns:
- lookup field schema for this combo box, if present and if is valid (i.e. has defined row source)
Definition at line 53 of file kexicomboboxbase.cpp.
int KexiComboBoxBase::rowToHighlightForLookupTable | ( | ) | const [protected] |
Definition at line 63 of file kexicomboboxbase.cpp.
virtual void KexiComboBoxBase::moveCursorToEndInInternalEditor | ( | ) | [protected, pure virtual] |
Implement this to perform "move cursor to end" in the internal editor.
Implemented in KexiDBComboBox, and KexiComboBoxTableEdit.
virtual void KexiComboBoxBase::selectAllInInternalEditor | ( | ) | [protected, pure virtual] |
Implement this to perform "select all" in the internal editor.
Implemented in KexiDBComboBox, and KexiComboBoxTableEdit.
virtual void KexiComboBoxBase::setValueInInternalEditor | ( | const QVariant & | value | ) | [protected, pure virtual] |
Implement this to perform "set value" in the internal editor.
Implemented in KexiDBComboBox, and KexiComboBoxTableEdit.
virtual QVariant KexiComboBoxBase::valueFromInternalEditor | ( | ) | [protected, pure virtual] |
Implement this to return value from the internal editor.
Implemented in KexiDBComboBox, and KexiComboBoxTableEdit.
virtual void KexiComboBoxBase::editRequested | ( | ) | [protected, pure virtual] |
virtual void KexiComboBoxBase::acceptRequested | ( | ) | [protected, pure virtual] |
virtual QPoint KexiComboBoxBase::mapFromParentToGlobal | ( | const QPoint & | pos | ) | const [protected, pure virtual] |
Implement this to return a position pos mapped from parent (e.g.
viewport) to global coordinates. QPoint(-1, -1) should be returned if this cannot be computed.
Implemented in KexiDBComboBox, and KexiComboBoxTableEdit.
virtual int KexiComboBoxBase::popupWidthHint | ( | ) | const [protected, pure virtual] |
Implement this to return a hint for popup width.
Implemented in KexiDBComboBox, and KexiComboBoxTableEdit.
virtual void KexiComboBoxBase::updateButton | ( | ) | [inline, protected, virtual] |
Implement this to update button state.
Table view just updates on/off state for the button depending on visibility of the popup
Reimplemented in KexiComboBoxTableEdit.
Definition at line 134 of file kexicomboboxbase.h.
void KexiComboBoxBase::undoChanges | ( | ) | [protected] |
Used by KexiDBComboBox.
Reimplemented in KexiDBComboBox.
Definition at line 586 of file kexicomboboxbase.cpp.
Member Data Documentation
QVariant KexiComboBoxBase::m_userEnteredValue [protected] |
value (usually a text) entered by hand (by the user)
Definition at line 152 of file kexicomboboxbase.h.
bool KexiComboBoxBase::m_internalEditorValueChanged [protected] |
true if user has text or other value inside editor
Definition at line 154 of file kexicomboboxbase.h.
bool KexiComboBoxBase::m_slotInternalEditorValueChanged_enabled [protected] |
bool KexiComboBoxBase::m_setValueOrTextInInternalEditor_enabled [protected] |
Used in setValueOrTextInInternalEditor() and slotItemSelected().
Definition at line 156 of file kexicomboboxbase.h.
bool KexiComboBoxBase::m_mouseBtnPressedWhenPopupVisible [protected] |
bool KexiComboBoxBase::m_insideCreatePopup [protected] |
true if we're inside createPopup(); used in slotItemSelected()
Definition at line 158 of file kexicomboboxbase.h.
bool KexiComboBoxBase::m_updatePopupSelectionOnShow [protected] |
Set to false as soon as the item corresponding with the current value is selected in the popup table.
This avoids selecting item for origValue() and thus loosing the recent choice.
Definition at line 159 of file kexicomboboxbase.h.
bool KexiComboBoxBase::m_setVisibleValueOnSetValueInternal [protected] |
Used in setValueInternal() to control whether we want to set visible value on setValueInternal()
- true for table view's combo box.
Definition at line 165 of file kexicomboboxbase.h.
The documentation for this class was generated from the following files: