#include <kexicomboboxbase.h>
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.
◆ KexiComboBoxBase()
| KexiComboBoxBase::KexiComboBoxBase |
( |
| ) |
|
◆ ~KexiComboBoxBase()
| KexiComboBoxBase::~KexiComboBoxBase |
( |
| ) |
|
|
virtual |
◆ acceptPopupSelection()
| void KexiComboBoxBase::acceptPopupSelection |
( |
| ) |
|
|
protected |
◆ acceptRequested()
| virtual void KexiComboBoxBase::acceptRequested |
( |
| ) |
|
|
protectedpure virtual |
◆ clear()
| void KexiComboBoxBase::clear |
( |
| ) |
|
|
virtual |
◆ column()
◆ createPopup()
| void KexiComboBoxBase::createPopup |
( |
bool |
show | ) |
|
todo alter the position to fit the popup within screen boundaries
Definition at line 350 of file kexicomboboxbase.cpp.
◆ editRequested()
| virtual void KexiComboBoxBase::editRequested |
( |
| ) |
|
|
protectedpure virtual |
◆ field()
◆ handleKeyPressForPopup()
| bool KexiComboBoxBase::handleKeyPressForPopup |
( |
TQKeyEvent * |
ke | ) |
|
|
protected |
◆ hide()
| void KexiComboBoxBase::hide |
( |
| ) |
|
|
virtual |
◆ internalEditor()
| virtual TQWidget * KexiComboBoxBase::internalEditor |
( |
| ) |
const |
|
pure virtual |
◆ lookupFieldSchema()
- 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.
◆ mapFromParentToGlobal()
| virtual TQPoint KexiComboBoxBase::mapFromParentToGlobal |
( |
const TQPoint & |
pos | ) |
const |
|
protectedpure virtual |
Implement this to return a position pos mapped from parent (e.g.
viewport) to global coordinates. TQPoint(-1, -1) should be returned if this cannot be computed.
Implemented in KexiDBComboBox, and KexiComboBoxTableEdit.
◆ moveCursorToEndInInternalEditor()
| virtual void KexiComboBoxBase::moveCursorToEndInInternalEditor |
( |
| ) |
|
|
protectedpure virtual |
◆ origValue()
| virtual TQVariant KexiComboBoxBase::origValue |
( |
| ) |
const |
|
pure virtual |
◆ popupWidthHint()
| virtual int KexiComboBoxBase::popupWidthHint |
( |
| ) |
const |
|
protectedpure virtual |
◆ rowToHighlightForLookupTable()
| int KexiComboBoxBase::rowToHighlightForLookupTable |
( |
| ) |
const |
|
protected |
◆ selectAllInInternalEditor()
| virtual void KexiComboBoxBase::selectAllInInternalEditor |
( |
| ) |
|
|
protectedpure virtual |
◆ selectItemForEnteredValueInLookupTable()
| KexiTableItem * KexiComboBoxBase::selectItemForEnteredValueInLookupTable |
( |
const TQVariant & |
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.
◆ setValueInInternalEditor()
| virtual void KexiComboBoxBase::setValueInInternalEditor |
( |
const TQVariant & |
value | ) |
|
|
protectedpure virtual |
◆ setValueInternal()
| void KexiComboBoxBase::setValueInternal |
( |
const TQVariant & |
add, |
|
|
bool |
removeOld |
|
) |
| |
|
protectedvirtual |
◆ setValueOrTextInInternalEditor()
| void KexiComboBoxBase::setValueOrTextInInternalEditor |
( |
const TQVariant & |
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.
◆ showPopup()
| void KexiComboBoxBase::showPopup |
( |
| ) |
|
◆ slotInternalEditorValueChanged()
| void KexiComboBoxBase::slotInternalEditorValueChanged |
( |
const TQVariant & |
v | ) |
|
◆ slotItemSelected()
| void KexiComboBoxBase::slotItemSelected |
( |
KexiTableItem * |
| ) |
|
|
virtual |
◆ slotRowAccepted()
| void KexiComboBoxBase::slotRowAccepted |
( |
KexiTableItem * |
item, |
|
|
int |
row |
|
) |
| |
|
virtual |
◆ undoChanges()
| void KexiComboBoxBase::undoChanges |
( |
| ) |
|
|
protected |
◆ updateButton()
| virtual void KexiComboBoxBase::updateButton |
( |
| ) |
|
|
inlineprotectedvirtual |
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.
◆ updateTextForHighlightedRow()
| void KexiComboBoxBase::updateTextForHighlightedRow |
( |
| ) |
|
|
protected |
◆ value()
| TQVariant 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.
◆ valueChangedInternal()
| tristate KexiComboBoxBase::valueChangedInternal |
( |
| ) |
|
|
virtual |
◆ valueForString()
| TQString KexiComboBoxBase::valueForString |
( |
const TQString & |
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.
◆ valueFromInternalEditor()
| virtual TQVariant KexiComboBoxBase::valueFromInternalEditor |
( |
| ) |
|
|
protectedpure virtual |
◆ valueIsEmpty()
| bool KexiComboBoxBase::valueIsEmpty |
( |
| ) |
|
|
virtual |
◆ valueIsNull()
| bool KexiComboBoxBase::valueIsNull |
( |
| ) |
|
|
virtual |
◆ visibleValue()
| TQVariant KexiComboBoxBase::visibleValue |
( |
| ) |
|
|
virtual |
◆ visibleValueForLookupField()
| TQVariant KexiComboBoxBase::visibleValueForLookupField |
( |
| ) |
|
|
protectedvirtual |
◆ m_insideCreatePopup
| bool KexiComboBoxBase::m_insideCreatePopup |
|
protected |
◆ m_internalEditorValueChanged
| bool KexiComboBoxBase::m_internalEditorValueChanged |
|
protected |
◆ m_mouseBtnPressedWhenPopupVisible
| bool KexiComboBoxBase::m_mouseBtnPressedWhenPopupVisible |
|
protected |
◆ m_moveCursorToEndInInternalEditor_enabled
| bool KexiComboBoxBase::m_moveCursorToEndInInternalEditor_enabled |
|
protected |
◆ m_selectAllInInternalEditor_enabled
| bool KexiComboBoxBase::m_selectAllInInternalEditor_enabled |
|
protected |
◆ m_setValueInInternalEditor_enabled
| bool KexiComboBoxBase::m_setValueInInternalEditor_enabled |
|
protected |
◆ m_setValueOrTextInInternalEditor_enabled
| bool KexiComboBoxBase::m_setValueOrTextInInternalEditor_enabled |
|
protected |
◆ m_setVisibleValueOnSetValueInternal
| bool KexiComboBoxBase::m_setVisibleValueOnSetValueInternal |
|
protected |
◆ m_slotInternalEditorValueChanged_enabled
| bool KexiComboBoxBase::m_slotInternalEditorValueChanged_enabled |
|
protected |
◆ m_updatePopupSelectionOnShow
| 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.
◆ m_userEnteredValue
| TQVariant KexiComboBoxBase::m_userEnteredValue |
|
protected |
◆ m_visibleValue
| TQVariant KexiComboBoxBase::m_visibleValue |
|
protected |
The documentation for this class was generated from the following files:
|