kexi
KexiInputTableEdit Class Reference
#include <kexiinputtableedit.h>
Inheritance diagram for KexiInputTableEdit:

Detailed Description
General purpose cell editor using line edit widget.
Definition at line 33 of file kexiinputtableedit.h.
Public Slots | |
virtual void | moveCursorToEnd () |
virtual void | moveCursorToStart () |
virtual void | selectAll () |
Signals | |
void | hintClicked () |
Public Member Functions | |
KexiInputTableEdit (KexiTableViewColumn &column, QWidget *parent=0) | |
virtual | ~KexiInputTableEdit () |
virtual bool | valueChanged () |
virtual bool | valueIsNull () |
virtual bool | valueIsEmpty () |
virtual QVariant | value () |
virtual bool | cursorAtStart () |
virtual bool | cursorAtEnd () |
virtual void | clear () |
virtual QSize | totalSize () |
virtual void | handleAction (const QString &actionName) |
virtual void | handleCopyAction (const QVariant &value, const QVariant &visibleValue) |
virtual bool | showToolTipIfNeeded (const QVariant &value, const QRect &rect, const QFontMetrics &fm, bool focused) |
Protected Slots | |
void | setRestrictedCompletion () |
void | completed (const QString &) |
Protected Member Functions | |
virtual void | setValueInternal (const QVariant &add, bool removeOld) |
void | showHintButton () |
void | init () |
virtual void | paintEvent (QPaintEvent *e) |
Protected Attributes | |
KexiTextFormatter | m_textFormatter |
bool | m_calculatedCell |
QString | m_decsym |
QString | m_origText |
KLineEdit * | m_lineedit |
Member Function Documentation
bool KexiInputTableEdit::valueChanged | ( | ) | [virtual] |
- Returns:
- true if editor's value is changed (compared to original value)
Reimplemented from KexiDataItemInterface.
Reimplemented in KexiComboBoxTableEdit.
Definition at line 260 of file kexiinputtableedit.cpp.
bool KexiInputTableEdit::valueIsNull | ( | ) | [virtual] |
- Returns:
- true if editor's value is null (not empty)
Implements KexiDataItemInterface.
Reimplemented in KexiDateTableEdit, KexiDateTimeTableEdit, and KexiTimeTableEdit.
Definition at line 267 of file kexiinputtableedit.cpp.
bool KexiInputTableEdit::valueIsEmpty | ( | ) | [virtual] |
- Returns:
- true if editor's value is empty (not null).
Only few field types can accept "EMPTY" property (check this with KexiDB::Field::hasEmptyProperty()),
Implements KexiDataItemInterface.
Reimplemented in KexiDateTableEdit, KexiDateTimeTableEdit, and KexiTimeTableEdit.
Definition at line 272 of file kexiinputtableedit.cpp.
QVariant KexiInputTableEdit::value | ( | ) | [virtual] |
- Returns:
- value currently represented by this item.
Implements KexiDataItemInterface.
Reimplemented in KexiComboBoxTableEdit, KexiDateTableEdit, KexiDateTimeTableEdit, and KexiTimeTableEdit.
Definition at line 277 of file kexiinputtableedit.cpp.
bool KexiInputTableEdit::cursorAtStart | ( | ) | [virtual] |
- Returns:
- true if the item widget's cursor (whatever that means, eg. line edit cursor) is at the beginning of editor's contents. This can inform table/form view that after pressing "left arrow" key should stop editing and move to a field on the left hand.
Implements KexiDataItemInterface.
Definition at line 321 of file kexiinputtableedit.cpp.
bool KexiInputTableEdit::cursorAtEnd | ( | ) | [virtual] |
- Returns:
- true if the item widget's cursor (whatever that means, eg. line edit cursor) is at the end of editor's contents. This can inform table/form view that after pressing "right arrow" key should stop editing and move to a field on the right hand.
Implements KexiDataItemInterface.
Definition at line 326 of file kexiinputtableedit.cpp.
void KexiInputTableEdit::clear | ( | ) | [virtual] |
clears item's data, so the data will contain NULL data
Implements KexiDataItemInterface.
Reimplemented in KexiComboBoxTableEdit.
Definition at line 316 of file kexiinputtableedit.cpp.
QSize KexiInputTableEdit::totalSize | ( | ) | [virtual] |
- Returns:
- total size of this editor, including any buttons, etc. (if present).
Reimplemented from KexiTableEdit.
Definition at line 331 of file kexiinputtableedit.cpp.
void KexiInputTableEdit::handleAction | ( | const QString & | actionName | ) | [virtual] |
Handles action having standard name actionName. Action could be: "edit_cut", "edit_paste", etc.
- Todo:
- handle rich text?
Reimplemented from KexiDataItemInterface.
Reimplemented in KexiComboBoxTableEdit, KexiDateTableEdit, KexiDateTimeTableEdit, and KexiTimeTableEdit.
Definition at line 345 of file kexiinputtableedit.cpp.
void KexiInputTableEdit::handleCopyAction | ( | const QVariant & | value, | |
const QVariant & | visibleValue | |||
) | [virtual] |
Handles copy action for value. The value is copied to clipboard in format appropriate for the editor's impementation, e.g. for image cell it can be a pixmap. visibleValue is unused here. Reimplemented after KexiTableEdit.
- Todo:
- handle rich text?
Implements KexiTableEdit.
Reimplemented in KexiComboBoxTableEdit, KexiDateTableEdit, KexiDateTimeTableEdit, and KexiTimeTableEdit.
Definition at line 338 of file kexiinputtableedit.cpp.
bool KexiInputTableEdit::showToolTipIfNeeded | ( | const QVariant & | value, | |
const QRect & | rect, | |||
const QFontMetrics & | fm, | |||
bool | focused | |||
) | [virtual] |
Shows a special tooltip for value if needed, i.e. if the value could not fit inside rect for a given font metrics fm.
- Returns:
- true a normal tooltip should be displayed (using QToolTip,) and false if no tooltip should be displayed or a custom tooltip was displayed internally (not yet supported). This implementation converts the value to text using valueToText() if calue is not string to see whether it can fit inside the cell's rect. If the cell is currentl focused (selected), focused is true.
Reimplemented from KexiTableEdit.
Definition at line 366 of file kexiinputtableedit.cpp.
void KexiInputTableEdit::moveCursorToEnd | ( | ) | [virtual, slot] |
Implemented for KexiDataItemInterface.
mark
Reimplemented from KexiDataItemInterface.
Reimplemented in KexiComboBoxTableEdit.
Definition at line 378 of file kexiinputtableedit.cpp.
void KexiInputTableEdit::moveCursorToStart | ( | ) | [virtual, slot] |
Implemented for KexiDataItemInterface.
mark
Reimplemented from KexiDataItemInterface.
Reimplemented in KexiComboBoxTableEdit.
Definition at line 383 of file kexiinputtableedit.cpp.
void KexiInputTableEdit::selectAll | ( | ) | [virtual, slot] |
Implemented for KexiDataItemInterface.
Reimplemented from KexiDataItemInterface.
Reimplemented in KexiComboBoxTableEdit.
Definition at line 388 of file kexiinputtableedit.cpp.
void KexiInputTableEdit::setValueInternal | ( | const QVariant & | add, | |
bool | removeOld | |||
) | [protected, virtual] |
initializes this editor with add value
Implements KexiDataItemInterface.
Reimplemented in KexiComboBoxTableEdit, KexiDateTableEdit, KexiDateTimeTableEdit, and KexiTimeTableEdit.
Definition at line 119 of file kexiinputtableedit.cpp.
Member Data Documentation
QString KexiInputTableEdit::m_origText [protected] |
KLineEdit* KexiInputTableEdit::m_lineedit [protected] |
orig. Line Edit's text after conversion - for easy comparing
Definition at line 118 of file kexiinputtableedit.h.
The documentation for this class was generated from the following files: