#include <kexidataiteminterface.h>
An interface for declaring widgets to be data-aware.
Definition at line 51 of file kexidataiteminterface.h.
◆ KexiDataItemInterface()
| KexiDataItemInterface::KexiDataItemInterface |
( |
| ) |
|
◆ ~KexiDataItemInterface()
| KexiDataItemInterface::~KexiDataItemInterface |
( |
| ) |
|
|
virtual |
◆ acceptEditorAfterDeleteContents()
| bool KexiDataItemInterface::acceptEditorAfterDeleteContents |
( |
| ) |
const |
|
inline |
- Returns
- true if editing should be accepted immediately after deleting contents for the cell (usually using Delete key). This flag is false by default, and is true e.g. for date, time and datetime types.
Definition at line 184 of file kexidataiteminterface.h.
◆ beforeSignalValueChanged()
| virtual void KexiDataItemInterface::beforeSignalValueChanged |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ clear()
| virtual void KexiDataItemInterface::clear |
( |
| ) |
|
|
pure virtual |
clears item's data, so the data will contain NULL data
Implemented in KexiDBAutoField, KexiDBCheckBox, KexiDBDateEdit, KexiDBDateTimeEdit, KexiDBDoubleSpinBox, KexiDBForm, KexiDBIntSpinBox, KexiDBLabel, KexiDBLineEdit, KexiDBTextEdit, KexiDBTimeEdit, KexiTDEIconTableEdit, KexiBoolTableEdit, KexiComboBoxTableEdit, and KexiInputTableEdit.
◆ clickedOnContents()
| void KexiDataItemInterface::clickedOnContents |
( |
| ) |
|
|
virtual |
◆ columnInfo()
◆ cursorAtEnd()
| virtual bool KexiDataItemInterface::cursorAtEnd |
( |
| ) |
|
|
pure 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.
Implemented in KexiDBAutoField, KexiDBCheckBox, KexiDBDateEdit, KexiDBDateTimeEdit, KexiDBDoubleSpinBox, KexiDBForm, KexiDBImageBox, KexiDBIntSpinBox, KexiDBLabel, KexiDBLineEdit, KexiDBTextEdit, KexiDBTimeEdit, KexiTDEIconTableEdit, KexiBoolTableEdit, and KexiInputTableEdit.
◆ cursorAtNewRow()
| bool KexiDataItemInterface::cursorAtNewRow |
( |
| ) |
|
◆ cursorAtStart()
| virtual bool KexiDataItemInterface::cursorAtStart |
( |
| ) |
|
|
pure 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.
Implemented in KexiDBAutoField, KexiDBCheckBox, KexiDBDateEdit, KexiDBDateTimeEdit, KexiDBDoubleSpinBox, KexiDBForm, KexiDBImageBox, KexiDBIntSpinBox, KexiDBLabel, KexiDBLineEdit, KexiDBTextEdit, KexiDBTimeEdit, KexiTDEIconTableEdit, KexiBoolTableEdit, and KexiInputTableEdit.
◆ field()
◆ handleAction()
| virtual void KexiDataItemInterface::handleAction |
( |
const TQString & |
actionName | ) |
|
|
inlinevirtual |
◆ hasFocusableWidget()
| bool KexiDataItemInterface::hasFocusableWidget |
( |
| ) |
const |
|
inline |
- Returns
- true if this editor offers a widget (e.g. line edit) that we can move focus to. Editor for boolean values has this set to false (see KexiBoolTableEdit). This is true by default. You can override this flag by changing m_hasFocusableWidget in your subclass' constructor.
Definition at line 160 of file kexidataiteminterface.h.
◆ hideFocus()
| void KexiDataItemInterface::hideFocus |
( |
| ) |
|
|
virtual |
◆ hideWidget()
| virtual void KexiDataItemInterface::hideWidget |
( |
| ) |
|
|
inlinevirtual |
◆ installListener()
◆ isReadOnly()
| virtual bool KexiDataItemInterface::isReadOnly |
( |
| ) |
const |
|
inlinevirtual |
- Returns
- 'readOnly' flag for this item. The flag is usually taken from the item's widget, e.g. KLineEdit::isReadOnly(). By default, always returns false.
Reimplemented in KexiDBAutoField, KexiDBCheckBox, KexiDBDateEdit, KexiDBDateTimeEdit, KexiDBDoubleSpinBox, KexiDBForm, KexiDBImageBox, KexiDBIntSpinBox, KexiDBLabel, KexiDBLineEdit, KexiDBTextEdit, and KexiDBTimeEdit.
Definition at line 117 of file kexidataiteminterface.h.
◆ listener()
◆ moveCursorToEnd()
| virtual void KexiDataItemInterface::moveCursorToEnd |
( |
| ) |
|
|
inlinevirtual |
Moves cursor after the last character (or element). For implementation in items supporting text cursor's movement; by default does nothing.
Definition at line 143 of file kexidataiteminterface.h.
◆ moveCursorToStart()
| virtual void KexiDataItemInterface::moveCursorToStart |
( |
| ) |
|
|
inlinevirtual |
Moves cursor before the first character (or element). For implementation in items supporting text cursor's movement; by default does nothing.
Definition at line 147 of file kexidataiteminterface.h.
◆ parentInterface()
◆ selectAll()
| virtual void KexiDataItemInterface::selectAll |
( |
| ) |
|
|
inlinevirtual |
Selects all characters (or elements) of the item. For implementation in items supporting text or elements; by default does nothing.
Definition at line 151 of file kexidataiteminterface.h.
◆ setColumnInfo()
◆ setFocus()
| virtual void KexiDataItemInterface::setFocus |
( |
| ) |
|
|
inlinevirtual |
◆ setParentDataItemInterface()
| void KexiDataItemInterface::setParentDataItemInterface |
( |
KexiDataItemInterface * |
parentDataItemInterface | ) |
|
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 138 of file kexidataiteminterface.cpp.
◆ setValue()
| void KexiDataItemInterface::setValue |
( |
const TQVariant & |
value, |
|
|
const TQVariant & |
add = TQVariant(), |
|
|
bool |
removeOld = false, |
|
|
const TQVariant * |
visibleValue = 0 |
|
) |
| |
Just initializes value, and calls setValueInternal(const TQString& 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).
visibleValue (if not NULL) is passed to provide visible value to display instead of value. This is currently used only in case of the combo box form widget, where displayed content (usually a text of image) differs from the value of the widget (a numeric index).
This method is called by table view's and form's editors.
Definition at line 48 of file kexidataiteminterface.cpp.
◆ setValueInternal()
| virtual void KexiDataItemInterface::setValueInternal |
( |
const TQVariant & |
add, |
|
|
bool |
removeOld |
|
) |
| |
|
protectedpure virtual |
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 KexiDBForm, KexiDBAutoField, KexiDBCheckBox, KexiDBComboBox, KexiDBDateEdit, KexiDBDateTimeEdit, KexiDBDoubleSpinBox, KexiDBImageBox, KexiDBIntSpinBox, KexiDBLabel, KexiDBLineEdit, KexiDBTextEdit, KexiDBTimeEdit, KexiTDEIconTableEdit, KexiBoolTableEdit, KexiComboBoxTableEdit, KexiDateTableEdit, KexiDateTimeTableEdit, KexiInputTableEdit, and KexiTimeTableEdit.
◆ setVisibleValueInternal()
| void KexiDataItemInterface::setVisibleValueInternal |
( |
const TQVariant & |
value | ) |
|
|
protectedvirtual |
Initializes this editor with value visible value. This is currently used only in case of the combo box form widget, where displayed content (usually a text of image) differs from the value of the widget (a numeric index). For implementation in the combo box widget, by default does nothing.
Reimplemented in KexiDBComboBox.
Definition at line 66 of file kexidataiteminterface.cpp.
◆ showFocus()
| void KexiDataItemInterface::showFocus |
( |
const TQRect & |
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 in KexiComboBoxTableEdit.
Definition at line 119 of file kexidataiteminterface.cpp.
◆ showWidget()
| virtual void KexiDataItemInterface::showWidget |
( |
| ) |
|
|
inlinevirtual |
◆ signalValueChanged()
| void KexiDataItemInterface::signalValueChanged |
( |
| ) |
|
|
protectedvirtual |
◆ value()
| virtual TQVariant KexiDataItemInterface::value |
( |
| ) |
|
|
pure virtual |
- Returns
- value currently represented by this item.
Implemented in KexiDBAutoField, KexiDBCheckBox, KexiDBComboBox, KexiDBDateEdit, KexiDBDateTimeEdit, KexiDBDoubleSpinBox, KexiDBForm, KexiDBImageBox, KexiDBIntSpinBox, KexiDBLabel, KexiDBLineEdit, KexiDBTextEdit, KexiDBTimeEdit, KexiTDEIconTableEdit, KexiBoolTableEdit, KexiComboBoxTableEdit, KexiDateTableEdit, KexiDateTimeTableEdit, KexiInputTableEdit, and KexiTimeTableEdit.
◆ valueChanged()
| bool KexiDataItemInterface::valueChanged |
( |
| ) |
|
|
virtual |
◆ valueIsEmpty()
| virtual bool KexiDataItemInterface::valueIsEmpty |
( |
| ) |
|
|
pure virtual |
- Returns
- true if editor's value is empty (not necessary null). Only few data types can accept "EMPTY" property (use KexiDB::Field::hasEmptyProperty() to check this). Used for checking if a given constraint within table of form is met.
Implemented in KexiDBAutoField, KexiDBCheckBox, KexiDBDateEdit, KexiDBDateTimeEdit, KexiDBDoubleSpinBox, KexiDBForm, KexiDBImageBox, KexiDBIntSpinBox, KexiDBLabel, KexiDBLineEdit, KexiDBTextEdit, KexiDBTimeEdit, KexiTDEIconTableEdit, KexiBoolTableEdit, KexiDateTableEdit, KexiDateTimeTableEdit, KexiInputTableEdit, and KexiTimeTableEdit.
◆ valueIsNull()
| virtual bool KexiDataItemInterface::valueIsNull |
( |
| ) |
|
|
pure virtual |
- Returns
- true if editor's value is null (not empty) Used for checking if a given constraint within table or form is met.
Implemented in KexiDBAutoField, KexiDBCheckBox, KexiDBDateEdit, KexiDBDateTimeEdit, KexiDBDoubleSpinBox, KexiDBForm, KexiDBImageBox, KexiDBIntSpinBox, KexiDBLabel, KexiDBLineEdit, KexiDBTextEdit, KexiDBTimeEdit, KexiTDEIconTableEdit, KexiBoolTableEdit, KexiDateTableEdit, KexiDateTimeTableEdit, KexiInputTableEdit, and KexiTimeTableEdit.
◆ valueIsValid()
| bool KexiDataItemInterface::valueIsValid |
( |
| ) |
|
|
virtual |
◆ visibleValue()
| virtual TQVariant KexiDataItemInterface::visibleValue |
( |
| ) |
|
|
inlinevirtual |
- Returns
- value that should be displayed for this item. Only used for items like combo box, where real value is an integer while displayed value is usually a text. For other item types this method should be empty.
Reimplemented in KexiDBComboBox, and KexiComboBoxTableEdit.
Definition at line 112 of file kexidataiteminterface.h.
◆ widget()
| virtual TQWidget * KexiDataItemInterface::widget |
( |
| ) |
|
|
pure virtual |
- Returns
- the view widget of this item, e.g. line edit widget.
Implemented in KexiFormDataItemInterface, KexiDBCheckBox, KexiDBDateEdit, KexiDBDateTimeEdit, KexiDBDoubleSpinBox, KexiDBForm, KexiDBImageBox, KexiDBIntSpinBox, KexiDBLabel, KexiDBLineEdit, KexiDBTextEdit, KexiDBTimeEdit, and KexiTableEdit.
◆ m_acceptEditorAfterDeleteContents
| bool KexiDataItemInterface::m_acceptEditorAfterDeleteContents |
|
protected |
◆ m_disable_signalValueChanged
| bool KexiDataItemInterface::m_disable_signalValueChanged |
|
protected |
◆ m_hasFocusableWidget
| bool KexiDataItemInterface::m_hasFocusableWidget |
|
protected |
◆ m_listener
◆ m_listenerIsTQObject
| bool KexiDataItemInterface::m_listenerIsTQObject |
|
protected |
◆ m_listenerObject
| TQGuardedPtr<TQObject> KexiDataItemInterface::m_listenerObject |
|
protected |
◆ m_origValue
| TQVariant KexiDataItemInterface::m_origValue |
|
protected |
◆ m_parentDataItemInterface
The documentation for this class was generated from the following files:
|