kexi
KexiDataItemInterface Class Reference
#include <kexidataiteminterface.h>
Inheritance diagram for KexiDataItemInterface:

Detailed Description
An interface for declaring widgets to be data-aware.
Definition at line 51 of file kexidataiteminterface.h.
Public Member Functions | |
KexiDataItemInterface () | |
virtual | ~KexiDataItemInterface () |
void | setValue (const QVariant &value, const QVariant &add=QVariant(), bool removeOld=false) |
virtual KexiDB::Field * | field () const =0 |
virtual KexiDB::QueryColumnInfo * | columnInfo () const =0 |
virtual void | setColumnInfo (KexiDB::QueryColumnInfo *cinfo)=0 |
virtual void | installListener (KexiDataItemChangesListener *listener) |
virtual QVariant | value ()=0 |
virtual bool | valueIsValid () |
virtual bool | valueIsNull ()=0 |
virtual bool | valueIsEmpty ()=0 |
virtual bool | isReadOnly () const |
virtual QWidget * | widget ()=0 |
virtual void | hideWidget () |
virtual void | showWidget () |
virtual bool | valueChanged () |
virtual bool | cursorAtStart ()=0 |
virtual bool | cursorAtEnd ()=0 |
virtual void | clear ()=0 |
bool | hasFocusableWidget () const |
virtual void | showFocus (const QRect &r, bool readOnly) |
virtual void | hideFocus () |
virtual void | clickedOnContents () |
bool | acceptEditorAfterDeleteContents () const |
virtual void | setFocus () |
bool | cursorAtNewRow () |
void | setParentDataItemInterface (KexiDataItemInterface *parentDataItemInterface) |
Protected Member Functions | |
virtual void | setValueInternal (const QVariant &add, bool removeOld)=0 |
void | signalValueChanged () |
Protected Attributes | |
KexiDataItemChangesListener * | m_listener |
QVariant | m_origValue |
KexiDataItemInterface * | m_parentDataItemInterface |
bool | m_hasFocusableWidget: 1 |
bool | m_disable_signalValueChanged: 1 |
bool | m_acceptEditorAfterDeleteContents: 1 |
Member Function Documentation
|
Definition at line 161 of file kexidataiteminterface.h. |
|
clears item's data, so the data will contain NULL data
Implemented in KexiDBAutoField, KexiDBCheckBox, KexiDBDateEdit, KexiDBDateTimeEdit, KexiDBDoubleSpinBox, KexiDBForm, KexiDBImageBox, KexiDBIntSpinBox, KexiDBLabel, KexiDBLineEdit, KexiDBTextEdit, KexiDBTimeEdit, KexiBlobTableEdit, KexiKIconTableEdit, KexiBoolTableEdit, KexiComboBoxTableEdit, and KexiInputTableEdit. |
|
Allows to define reaction for clicking on cell's contents. Currently it's used for editor of type boolean, where we want to toggle true/false on single mouse click.
Reimplemented in KexiBoolTableEdit. Definition at line 99 of file kexidataiteminterface.cpp. |
|
Implemented in KexiFormDataItemInterface, and KexiTableEdit. |
|
Implemented in KexiDBAutoField, KexiDBCheckBox, KexiDBDateEdit, KexiDBDateTimeEdit, KexiDBDoubleSpinBox, KexiDBForm, KexiDBImageBox, KexiDBIntSpinBox, KexiDBLabel, KexiDBLineEdit, KexiDBTextEdit, KexiDBTimeEdit, KexiBlobTableEdit, KexiKIconTableEdit, KexiBoolTableEdit, and KexiInputTableEdit. |
|
Implemented in KexiDBAutoField, KexiDBCheckBox, KexiDBDateEdit, KexiDBDateTimeEdit, KexiDBDoubleSpinBox, KexiDBForm, KexiDBImageBox, KexiDBIntSpinBox, KexiDBLabel, KexiDBLineEdit, KexiDBTextEdit, KexiDBTimeEdit, KexiBlobTableEdit, KexiKIconTableEdit, KexiBoolTableEdit, and KexiInputTableEdit. |
|
Implemented in KexiFormDataItemInterface, and KexiTableEdit. |
|
Definition at line 137 of file kexidataiteminterface.h. |
|
Hides additional elements that are needed for indicating that the current cell is selected. For reimplementation. By default does nothing. Reimplemented in KexiComboBoxTableEdit. Definition at line 95 of file kexidataiteminterface.cpp. |
|
Hides item's widget, if available. Reimplemented in KexiFormDataItemInterface, and KexiTableEdit. Definition at line 112 of file kexidataiteminterface.h. |
|
Sets listener. No need to reimplement this.
Reimplemented in KexiDBAutoField. Definition at line 84 of file kexidataiteminterface.cpp. |
|
Reimplemented in KexiDBAutoField, KexiDBCheckBox, KexiDBDateEdit, KexiDBDateTimeEdit, KexiDBDoubleSpinBox, KexiDBForm, KexiDBImageBox, KexiDBIntSpinBox, KexiDBLabel, KexiDBLineEdit, KexiDBTextEdit, and KexiDBTimeEdit. Definition at line 106 of file kexidataiteminterface.h. |
|
Used internally to set column information.
Implemented in KexiFormDataItemInterface, KexiDBAutoField, KexiDBLabel, KexiDBLineEdit, KexiDBTextEdit, and KexiTableEdit. |
|
Sets a pointer to a Parent Data Item Interface. This pointer is 0 by default, but can be set by parent widget if this interface is a building block of a larger data widget. It is the case for KexiDBFieldEdit widget (see KexiDBFieldEdit::createEditor()). Use with care. signalValueChanged() method will check this pointer, and if it's not 0, m_parentDataItemInterface->signalValueChanged() is called, so a changes can be signalled at higher level. Definition at line 172 of file kexidataiteminterface.h. |
|
Just initializes value, and calls init(const QString& add, bool removeOld). If removeOld is true, current value is set up as add. If removeOld if false, current value is set up as value + add. value is stored as 'old value' -it'd be usable in the future (e.g. Combo Box editor can use old value if current value does not match any item on the list). Called by KexiTableView and others. Definition at line 47 of file kexidataiteminterface.cpp. |
|
Initializes this editor with add value, which should be somewhat added to the current value (already storted in m_origValue). If removeOld is true, a value should be set to add, otherwise -it should be set to current m_origValue + add, if possible. Implement this. Implemented in KexiDBAutoField, KexiDBCheckBox, KexiDBDateEdit, KexiDBDateTimeEdit, KexiDBDoubleSpinBox, KexiDBForm, KexiDBImageBox, KexiDBIntSpinBox, KexiDBLabel, KexiDBLineEdit, KexiDBTextEdit, KexiDBTimeEdit, KexiBlobTableEdit, KexiKIconTableEdit, KexiBoolTableEdit, KexiComboBoxTableEdit, KexiDateTableEdit, KexiDateTimeTableEdit, KexiInputTableEdit, and KexiTimeTableEdit. |
|
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 in KexiComboBoxTableEdit. Definition at line 89 of file kexidataiteminterface.cpp. |
|
Shows item's widget, if available. Reimplemented in KexiFormDataItemInterface, and KexiTableEdit. Definition at line 115 of file kexidataiteminterface.h. |
|
Call this in your implementation when value changes, so installed listener can react on this change. If there is a parent data item defined (see setParentDataItemInterface()), parent's signalValueChanged() method will be called instead. Definition at line 56 of file kexidataiteminterface.cpp. |
|
Implemented in KexiDBAutoField, KexiDBCheckBox, KexiDBDateEdit, KexiDBDateTimeEdit, KexiDBDoubleSpinBox, KexiDBForm, KexiDBImageBox, KexiDBIntSpinBox, KexiDBLabel, KexiDBLineEdit, KexiDBTextEdit, KexiDBTimeEdit, KexiBlobTableEdit, KexiKIconTableEdit, KexiBoolTableEdit, KexiComboBoxTableEdit, KexiDateTableEdit, KexiDateTimeTableEdit, KexiInputTableEdit, and KexiTimeTableEdit. |
|
Reimplemented in KexiDBAutoField, KexiComboBoxTableEdit, and KexiInputTableEdit. Definition at line 67 of file kexidataiteminterface.cpp. |
|
Implemented in KexiDBAutoField, KexiDBCheckBox, KexiDBDateEdit, KexiDBDateTimeEdit, KexiDBDoubleSpinBox, KexiDBForm, KexiDBImageBox, KexiDBIntSpinBox, KexiDBLabel, KexiDBLineEdit, KexiDBTextEdit, KexiDBTimeEdit, KexiBlobTableEdit, KexiKIconTableEdit, KexiBoolTableEdit, KexiComboBoxTableEdit, KexiDateTableEdit, KexiDateTimeTableEdit, KexiInputTableEdit, and KexiTimeTableEdit. |
|
Implemented in KexiDBAutoField, KexiDBCheckBox, KexiDBDateEdit, KexiDBDateTimeEdit, KexiDBDoubleSpinBox, KexiDBForm, KexiDBImageBox, KexiDBIntSpinBox, KexiDBLabel, KexiDBLineEdit, KexiDBTextEdit, KexiDBTimeEdit, KexiBlobTableEdit, KexiKIconTableEdit, KexiBoolTableEdit, KexiComboBoxTableEdit, KexiDateTableEdit, KexiDateTimeTableEdit, KexiInputTableEdit, and KexiTimeTableEdit. |
|
Reimplemented in KexiDateTableEdit, KexiDateTimeTableEdit, and KexiTimeTableEdit. Definition at line 103 of file kexidataiteminterface.cpp. |
|
Implemented in KexiFormDataItemInterface, KexiDBCheckBox, KexiDBDateEdit, KexiDBDateTimeEdit, KexiDBDoubleSpinBox, KexiDBForm, KexiDBImageBox, KexiDBIntSpinBox, KexiDBLabel, KexiDBLineEdit, KexiDBTextEdit, KexiDBTimeEdit, and KexiTableEdit. |
Member Data Documentation
|
Definition at line 198 of file kexidataiteminterface.h. |
The documentation for this class was generated from the following files: