#include <kexiinputtableedit.h>
Public Slots | |
| virtual void | moveCursorToEnd () |
| virtual void | moveCursorToStart () |
| virtual void | selectAll () |
Signals | |
| void | hintClicked () |
| Signals inherited from KexiTableEdit | |
| void | editRequested () |
| void | cancelRequested () |
| void | acceptRequested () |
Public Member Functions | |
| KexiInputTableEdit (KexiTableViewColumn &column, TQWidget *parent=0) | |
| virtual bool | valueChanged () |
| virtual bool | valueIsNull () |
| virtual bool | valueIsEmpty () |
| virtual TQVariant | value () |
| virtual bool | cursorAtStart () |
| virtual bool | cursorAtEnd () |
| virtual void | clear () |
| virtual TQSize | totalSize () |
| virtual void | handleAction (const TQString &actionName) |
| virtual void | handleCopyAction (const TQVariant &value, const TQVariant &visibleValue) |
| virtual bool | showToolTipIfNeeded (const TQVariant &value, const TQRect &rect, const TQFontMetrics &fm, bool focused) |
| Public Member Functions inherited from KexiTableEdit | |
| KexiTableEdit (KexiTableViewColumn &column, TQWidget *parent=0) | |
| virtual KexiDB::Field * | field () const |
| virtual KexiDB::QueryColumnInfo * | columnInfo () const |
| virtual void | setColumnInfo (KexiDB::QueryColumnInfo *) |
| KexiTableViewColumn * | column () const |
| KexiDB::Field * | displayedField () const |
| virtual void | resize (int w, int h) |
| virtual TQWidget * | widget () |
| virtual void | hideWidget () |
| virtual void | showWidget () |
| virtual void | paintFocusBorders (TQPainter *p, TQVariant &cal, int x, int y, int w, int h) |
| virtual void | setupContents (TQPainter *p, bool focused, const TQVariant &val, TQString &txt, int &align, int &x, int &y_offset, int &w, int &h) |
| bool | usesSelectedTextColor () const |
| virtual void | paintSelectionBackground (TQPainter *p, bool focused, const TQString &txt, int align, int x, int y_offset, int w, int h, const TQColor &fillColor, const TQFontMetrics &fm, bool readOnly, bool fullRowSelection) |
| int | leftMargin () const |
| int | rightMargin (bool focused) const |
| virtual bool | handleKeyPress (TQKeyEvent *ke, bool editorActive) |
| virtual bool | handleDoubleClick () |
| virtual int | widthForValue (TQVariant &val, const TQFontMetrics &fm) |
| virtual void | createInternalEditor (KexiDB::QuerySchema &schema) |
| Public Member Functions inherited from KexiDataItemInterface | |
| void | setValue (const TQVariant &value, const TQVariant &add=TQVariant(), bool removeOld=false, const TQVariant *visibleValue=0) |
| virtual void | installListener (KexiDataItemChangesListener *listener) |
| virtual bool | valueIsValid () |
| virtual TQVariant | visibleValue () |
| virtual bool | isReadOnly () const |
| virtual void | moveCursorToEnd () |
| virtual void | moveCursorToStart () |
| virtual void | selectAll () |
| bool | hasFocusableWidget () const |
| virtual void | showFocus (const TQRect &r, bool readOnly) |
| virtual void | hideFocus () |
| virtual void | clickedOnContents () |
| bool | acceptEditorAfterDeleteContents () const |
| virtual void | setFocus () |
| bool | cursorAtNewRow () |
| void | setParentDataItemInterface (KexiDataItemInterface *parentDataItemInterface) |
| KexiDataItemInterface * | parentInterface () const |
Protected Slots | |
| void | setRestrictedCompletion () |
| void | completed (const TQString &) |
Protected Member Functions | |
| virtual void | setValueInternal (const TQVariant &add, bool removeOld) |
| void | showHintButton () |
| void | init () |
| virtual void | paintEvent (TQPaintEvent *e) |
| Protected Member Functions inherited from KexiTableEdit | |
| virtual bool | eventFilter (TQObject *watched, TQEvent *e) |
| void | setViewWidget (TQWidget *v) |
| void | moveChild (TQWidget *child, int x, int y) |
| void | repaintRelatedCell () |
| Protected Member Functions inherited from KexiDataItemInterface | |
| virtual void | setVisibleValueInternal (const TQVariant &value) |
| virtual void | signalValueChanged () |
| virtual void | beforeSignalValueChanged () |
| KexiDataItemChangesListener * | listener () |
Protected Attributes | |
| KexiTextFormatter | m_textFormatter |
| bool | m_calculatedCell |
| TQString | m_decsym |
| TQString | m_origText |
| KLineEdit * | m_lineedit |
| Protected Attributes inherited from KexiTableEdit | |
| KexiTableViewColumn * | m_column |
| int | m_leftMargin |
| int | m_rightMargin |
| int | m_rightMarginWhenFocused |
| TQScrollView * | m_scrollView |
| bool | m_usesSelectedTextColor: 1 |
| Protected Attributes inherited from KexiDataItemInterface | |
| TQGuardedPtr< TQObject > | m_listenerObject |
| KexiDataItemChangesListener * | m_listener |
| bool | m_listenerIsTQObject |
| TQVariant | m_origValue |
| KexiDataItemInterface * | m_parentDataItemInterface |
| bool | m_hasFocusableWidget: 1 |
| bool | m_disable_signalValueChanged: 1 |
| bool | m_acceptEditorAfterDeleteContents: 1 |
Detailed Description
General purpose cell editor using line edit widget.
Definition at line 33 of file kexiinputtableedit.h.
Constructor & Destructor Documentation
◆ KexiInputTableEdit()
| KexiInputTableEdit::KexiInputTableEdit | ( | KexiTableViewColumn & | column, |
| TQWidget * | parent = 0 ) |
Definition at line 63 of file kexiinputtableedit.cpp.
◆ ~KexiInputTableEdit()
|
virtual |
Definition at line 73 of file kexiinputtableedit.cpp.
Member Function Documentation
◆ 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.
◆ completed
|
protectedslot |
Definition at line 254 of file kexiinputtableedit.cpp.
◆ 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.
◆ 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.
◆ handleAction()
|
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.
◆ handleCopyAction()
|
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.
◆ init()
|
protected |
Definition at line 77 of file kexiinputtableedit.cpp.
◆ moveCursorToEnd
|
virtualslot |
◆ moveCursorToStart
|
virtualslot |
◆ paintEvent()
|
protectedvirtual |
Definition at line 222 of file kexiinputtableedit.cpp.
◆ selectAll
|
virtualslot |
Implemented for KexiDataItemInterface.
Definition at line 388 of file kexiinputtableedit.cpp.
◆ setRestrictedCompletion
|
protectedslot |
Definition at line 230 of file kexiinputtableedit.cpp.
◆ setValueInternal()
|
protectedvirtual |
initializes this editor with add value
Implements KexiDataItemInterface.
Reimplemented in KexiComboBoxTableEdit, KexiDateTableEdit, KexiDateTimeTableEdit, and KexiTimeTableEdit.
Definition at line 119 of file kexiinputtableedit.cpp.
◆ showToolTipIfNeeded()
|
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 TQToolTip,) 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.
◆ 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.
◆ value()
|
virtual |
- Returns
- value currently represented by this item.
js
- Todo
- PRESERVE PRECISION!
- Todo
- check constraints
Implements KexiDataItemInterface.
Reimplemented in KexiComboBoxTableEdit, KexiDateTableEdit, KexiDateTimeTableEdit, and KexiTimeTableEdit.
Definition at line 277 of file kexiinputtableedit.cpp.
◆ 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.
◆ 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.
◆ 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.
Member Data Documentation
◆ m_calculatedCell
|
protected |
Definition at line 116 of file kexiinputtableedit.h.
◆ m_decsym
|
protected |
Definition at line 117 of file kexiinputtableedit.h.
◆ m_lineedit
|
protected |
orig. Line Edit's text after conversion - for easy comparing
Definition at line 119 of file kexiinputtableedit.h.
◆ m_origText
|
protected |
decimal symbol
Definition at line 118 of file kexiinputtableedit.h.
◆ m_textFormatter
|
protected |
Definition at line 115 of file kexiinputtableedit.h.
The documentation for this class was generated from the following files:
