kexi
KexiComboBoxTableEdit Class Reference
#include <kexicomboboxtableedit.h>

Detailed Description
Drop-down cell editor.Definition at line 37 of file kexicomboboxtableedit.h.
Public Slots | |
virtual void | moveCursorToEnd () |
virtual void | moveCursorToStart () |
virtual void | selectAll () |
Public Member Functions | |
KexiComboBoxTableEdit (KexiTableViewColumn &column, QWidget *parent=0) | |
virtual KexiTableViewColumn * | column () const |
virtual KexiDB::Field * | field () const |
virtual QVariant | origValue () const |
virtual void | setValueInternal (const QVariant &add, bool removeOld) |
virtual QVariant | value () |
virtual void | clear () |
virtual bool | valueChanged () |
virtual QVariant | visibleValue () |
virtual void | resize (int w, int h) |
virtual void | showFocus (const QRect &r, bool readOnly) |
virtual void | hideFocus () |
virtual void | paintFocusBorders (QPainter *p, QVariant &cal, int x, int y, int w, int h) |
virtual void | setupContents (QPainter *p, bool focused, const QVariant &val, QString &txt, int &align, int &x, int &y_offset, int &w, int &h) |
virtual bool | handleKeyPress (QKeyEvent *ke, bool editorActive) |
virtual int | widthForValue (QVariant &val, const QFontMetrics &fm) |
virtual void | hide () |
virtual void | show () |
virtual QSize | totalSize () const |
virtual void | createInternalEditor (KexiDB::QuerySchema &schema) |
virtual void | handleAction (const QString &actionName) |
virtual void | handleCopyAction (const QVariant &value, const QVariant &visibleValue) |
Protected Slots | |
void | slotButtonClicked () |
void | slotRowAccepted (KexiTableItem *item, int row) |
void | slotItemSelected (KexiTableItem *item) |
void | slotInternalEditorValueChanged (const QVariant &v) |
void | slotLineEditTextChanged (const QString &s) |
void | slotPopupHidden () |
Protected Member Functions | |
void | updateFocus (const QRect &r) |
virtual bool | eventFilter (QObject *o, QEvent *e) |
virtual QWidget * | internalEditor () const |
virtual void | moveCursorToEndInInternalEditor () |
virtual void | selectAllInInternalEditor () |
virtual void | setValueInInternalEditor (const QVariant &value) |
virtual QVariant | valueFromInternalEditor () |
virtual void | editRequested () |
virtual void | acceptRequested () |
virtual QPoint | mapFromParentToGlobal (const QPoint &pos) const |
virtual int | popupWidthHint () const |
virtual void | updateButton () |
virtual KexiComboBoxPopup * | popup () const |
virtual void | setPopup (KexiComboBoxPopup *popup) |
Protected Attributes | |
Private * | d |
Member Function Documentation
virtual KexiTableViewColumn* KexiComboBoxTableEdit::column | ( | ) | const [inline, virtual] |
Implemented for KexiComboBoxBase.
Implements KexiComboBoxBase.
Definition at line 46 of file kexicomboboxtableedit.h.
virtual KexiDB::Field* KexiComboBoxTableEdit::field | ( | ) | const [inline, virtual] |
Implemented for KexiComboBoxBase.
Implements KexiComboBoxBase.
Definition at line 49 of file kexicomboboxtableedit.h.
virtual QVariant KexiComboBoxTableEdit::origValue | ( | ) | const [inline, virtual] |
Implemented for KexiComboBoxBase.
Implements KexiComboBoxBase.
Definition at line 52 of file kexicomboboxtableedit.h.
virtual QVariant KexiComboBoxTableEdit::value | ( | ) | [inline, 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 from KexiComboBoxBase.
Definition at line 57 of file kexicomboboxtableedit.h.
void KexiComboBoxTableEdit::clear | ( | ) | [virtual] |
Reimplement this and call this impl.: used to clear internal editor.
Reimplemented from KexiComboBoxBase.
Definition at line 195 of file kexicomboboxtableedit.cpp.
bool KexiComboBoxTableEdit::valueChanged | ( | ) | [virtual] |
- Returns:
- true if editor's value is changed (compared to original value)
Reimplemented from KexiInputTableEdit.
Definition at line 201 of file kexicomboboxtableedit.cpp.
void KexiComboBoxTableEdit::resize | ( | int | w, | |
int | h | |||
) | [virtual] |
Reimplemented: resizes a view().
Reimplemented from KexiTableEdit.
Definition at line 152 of file kexicomboboxtableedit.cpp.
void KexiComboBoxTableEdit::showFocus | ( | const QRect & | r, | |
bool | readOnly | |||
) | [virtual] |
Displays additional elements that are needed for indicating that the current cell is selected. For example, combobox editor (KexiComboBoxTableEdit) moves and shows dropdown button. r is the rectangle for the cell. If readOnly is true, additional elements should be visually disabled, e.g. dropdown button of the combobox editor should be disabled. For reimplementation. By default does nothing.
Reimplemented from KexiDataItemInterface.
Definition at line 141 of file kexicomboboxtableedit.cpp.
void KexiComboBoxTableEdit::hideFocus | ( | ) | [virtual] |
Hides additional elements that are needed for indicating that the current cell is selected. For reimplementation. By default does nothing.
Reimplemented from KexiDataItemInterface.
Definition at line 180 of file kexicomboboxtableedit.cpp.
void KexiComboBoxTableEdit::paintFocusBorders | ( | QPainter * | p, | |
QVariant & | cal, | |||
int | x, | |||
int | y, | |||
int | w, | |||
int | h | |||
) | [virtual] |
Paints a border for the cell described by x, y, w, h on p painter. The cell's value is val (may be useful if you want to reimplement this method).
Reimplemented from KexiTableEdit.
Definition at line 209 of file kexicomboboxtableedit.cpp.
void KexiComboBoxTableEdit::setupContents | ( | QPainter * | p, | |
bool | focused, | |||
const QVariant & | val, | |||
QString & | txt, | |||
int & | align, | |||
int & | x, | |||
int & | y_offset, | |||
int & | w, | |||
int & | h | |||
) | [virtual] |
Setups contents of the cell. As a special case, if there is lookup field schema defined, val already contains the visible value (usually the text) set by KexiTableView::paintcell(), so there is noo need to lookup the value in the combo box's popup.
Reimplemented from KexiTableEdit.
Definition at line 219 of file kexicomboboxtableedit.cpp.
bool KexiComboBoxTableEdit::handleKeyPress | ( | QKeyEvent * | ke, | |
bool | editorActive | |||
) | [virtual] |
Used to handle key press events for the item.
Reimplemented from KexiTableEdit.
Definition at line 298 of file kexicomboboxtableedit.cpp.
int KexiComboBoxTableEdit::widthForValue | ( | QVariant & | val, | |
const QFontMetrics & | fm | |||
) | [virtual] |
- Returns:
- width of value. For the default implementation val is converted to a string and width of this string is returned.
Reimplemented from KexiTableEdit.
Definition at line 327 of file kexicomboboxtableedit.cpp.
QSize KexiComboBoxTableEdit::totalSize | ( | ) | const [virtual] |
- Returns:
- total size of this editor, including popup button.
Definition at line 362 of file kexicomboboxtableedit.cpp.
void KexiComboBoxTableEdit::createInternalEditor | ( | KexiDB::QuerySchema & | schema | ) | [virtual] |
Created internal editor for this editor is needed. This method is only implemented in KexiComboBoxTableEdit since it's visible value differs from internal value, so a different KexiTableEdit object is used to displaying the data.
Reimplemented from KexiTableEdit.
Definition at line 107 of file kexicomboboxtableedit.cpp.
void KexiComboBoxTableEdit::handleAction | ( | const QString & | actionName | ) | [virtual] |
Reimplemented after KexiInputTableEdit.
- Todo:
- does not work with BLOBs!
Reimplemented from KexiInputTableEdit.
Definition at line 427 of file kexicomboboxtableedit.cpp.
void KexiComboBoxTableEdit::handleCopyAction | ( | const QVariant & | value, | |
const QVariant & | visibleValue | |||
) | [virtual] |
Reimplemented after KexiInputTableEdit. For a special case (combo box), visibleValue can be provided, so it can be copied to the clipboard instead of unreadable value.
- Todo:
- does not work with BLOBs!
Reimplemented from KexiInputTableEdit.
Definition at line 420 of file kexicomboboxtableedit.cpp.
void KexiComboBoxTableEdit::moveCursorToEnd | ( | ) | [virtual, slot] |
Implemented for KexiDataItemInterface.
mark
Reimplemented from KexiInputTableEdit.
Definition at line 382 of file kexicomboboxtableedit.cpp.
void KexiComboBoxTableEdit::moveCursorToStart | ( | ) | [virtual, slot] |
Implemented for KexiDataItemInterface.
mark
Reimplemented from KexiInputTableEdit.
Definition at line 387 of file kexicomboboxtableedit.cpp.
void KexiComboBoxTableEdit::selectAll | ( | ) | [virtual, slot] |
Implemented for KexiDataItemInterface.
Reimplemented from KexiInputTableEdit.
Definition at line 392 of file kexicomboboxtableedit.cpp.
void KexiComboBoxTableEdit::slotRowAccepted | ( | KexiTableItem * | item, | |
int | row | |||
) | [inline, protected, virtual, slot] |
Call this from slot.
Reimplemented from KexiComboBoxBase.
Definition at line 114 of file kexicomboboxtableedit.h.
void KexiComboBoxTableEdit::slotItemSelected | ( | KexiTableItem * | ) | [inline, protected, virtual, slot] |
Call this from slot.
Reimplemented from KexiComboBoxBase.
Definition at line 115 of file kexicomboboxtableedit.h.
void KexiComboBoxTableEdit::slotInternalEditorValueChanged | ( | const QVariant & | v | ) | [inline, protected, slot] |
Call this from slot.
Reimplemented from KexiComboBoxBase.
Definition at line 116 of file kexicomboboxtableedit.h.
void KexiComboBoxTableEdit::updateFocus | ( | const QRect & | r | ) | [protected] |
QWidget * KexiComboBoxTableEdit::internalEditor | ( | ) | const [protected, virtual] |
Implemented for KexiComboBoxBase.
Implements KexiComboBoxBase.
Definition at line 367 of file kexicomboboxtableedit.cpp.
void KexiComboBoxTableEdit::moveCursorToEndInInternalEditor | ( | ) | [protected, virtual] |
Implemented for KexiComboBoxBase.
Implements KexiComboBoxBase.
Definition at line 372 of file kexicomboboxtableedit.cpp.
void KexiComboBoxTableEdit::selectAllInInternalEditor | ( | ) | [protected, virtual] |
Implemented for KexiComboBoxBase.
Implements KexiComboBoxBase.
Definition at line 377 of file kexicomboboxtableedit.cpp.
void KexiComboBoxTableEdit::setValueInInternalEditor | ( | const QVariant & | value | ) | [protected, virtual] |
Implemented for KexiComboBoxBase.
Implements KexiComboBoxBase.
Definition at line 397 of file kexicomboboxtableedit.cpp.
QVariant KexiComboBoxTableEdit::valueFromInternalEditor | ( | ) | [protected, virtual] |
Implemented for KexiComboBoxBase.
Implements KexiComboBoxBase.
Definition at line 402 of file kexicomboboxtableedit.cpp.
virtual void KexiComboBoxTableEdit::editRequested | ( | ) | [inline, protected, virtual] |
Implemented for KexiComboBoxBase.
Implements KexiComboBoxBase.
Definition at line 143 of file kexicomboboxtableedit.h.
virtual void KexiComboBoxTableEdit::acceptRequested | ( | ) | [inline, protected, virtual] |
Implemented for KexiComboBoxBase.
Implements KexiComboBoxBase.
Definition at line 146 of file kexicomboboxtableedit.h.
QPoint KexiComboBoxTableEdit::mapFromParentToGlobal | ( | const QPoint & | pos | ) | const [protected, virtual] |
Implemented for KexiComboBoxBase.
Implements KexiComboBoxBase.
Definition at line 407 of file kexicomboboxtableedit.cpp.
int KexiComboBoxTableEdit::popupWidthHint | ( | ) | const [protected, virtual] |
Implemented for KexiComboBoxBase.
Implements KexiComboBoxBase.
Definition at line 415 of file kexicomboboxtableedit.cpp.
void KexiComboBoxTableEdit::updateButton | ( | ) | [protected, virtual] |
Implemented this to update button state.
Reimplemented from KexiComboBoxBase.
Definition at line 278 of file kexicomboboxtableedit.cpp.
The documentation for this class was generated from the following files: