#include <kexiformdataiteminterface.h>
Public Member Functions | |
| TQString | dataSource () const |
| void | setDataSource (const TQString &ds) |
| TQCString | dataSourceMimeType () const |
| void | setDataSourceMimeType (const TQCString &ds) |
| virtual void | setDisplayDefaultValue (TQWidget *widget, bool displayDefaultValue) |
| virtual bool | hasDisplayedDefaultValue () const |
| virtual TQWidget * | widget () |
| virtual void | setInvalidState (const TQString &displayText)=0 |
| virtual void | setReadOnly (bool readOnly)=0 |
| virtual KexiDB::Field * | field () const |
| virtual KexiDB::QueryColumnInfo * | columnInfo () const |
| virtual void | setColumnInfo (KexiDB::QueryColumnInfo *cinfo) |
| virtual void | setVisibleColumnInfo (KexiDB::QueryColumnInfo *cinfo) |
| virtual KexiDB::QueryColumnInfo * | visibleColumnInfo () const |
| virtual void | hideWidget () |
| virtual void | showWidget () |
| virtual void | undoChanges () |
| void | cancelEditor () |
| virtual bool | keyPressed (TQKeyEvent *ke) |
| 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 TQVariant | value ()=0 |
| virtual bool | valueIsValid () |
| virtual bool | valueIsNull ()=0 |
| virtual bool | valueIsEmpty ()=0 |
| virtual TQVariant | visibleValue () |
| virtual bool | isReadOnly () const |
| virtual bool | valueChanged () |
| virtual bool | cursorAtStart ()=0 |
| virtual bool | cursorAtEnd ()=0 |
| virtual void | moveCursorToEnd () |
| virtual void | moveCursorToStart () |
| virtual void | selectAll () |
| virtual void | clear ()=0 |
| 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 |
| virtual void | handleAction (const TQString &actionName) |
Protected Attributes | |
| TQString | m_dataSource |
| TQCString | m_dataSourceMimeType |
| KexiDB::QueryColumnInfo * | m_columnInfo |
| KexiDisplayUtils::DisplayParameters * | m_displayParametersForEnteredValue |
| KexiDisplayUtils::DisplayParameters * | m_displayParametersForDefaultValue |
| bool | m_displayDefaultValue: 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 |
Friends | |
| class | KexiDBAutoField |
Additional Inherited Members | |
| Protected Member Functions inherited from KexiDataItemInterface | |
| virtual void | setValueInternal (const TQVariant &add, bool removeOld)=0 |
| virtual void | setVisibleValueInternal (const TQVariant &value) |
| virtual void | signalValueChanged () |
| virtual void | beforeSignalValueChanged () |
| KexiDataItemChangesListener * | listener () |
Detailed Description
An interface for declaring form widgets to be data-aware.
Definition at line 32 of file kexiformdataiteminterface.h.
Constructor & Destructor Documentation
◆ KexiFormDataItemInterface()
| KexiFormDataItemInterface::KexiFormDataItemInterface | ( | ) |
Definition at line 25 of file kexiformdataiteminterface.cpp.
◆ ~KexiFormDataItemInterface()
|
virtual |
Definition at line 34 of file kexiformdataiteminterface.cpp.
Member Function Documentation
◆ cancelEditor()
| void KexiFormDataItemInterface::cancelEditor | ( | ) |
Definition at line 62 of file kexiformdataiteminterface.cpp.
◆ columnInfo()
|
inlinevirtual |
- Returns
- database column information for this item
Implements KexiDataItemInterface.
Definition at line 90 of file kexiformdataiteminterface.h.
◆ dataSource()
|
inline |
- Returns
- the name of the data source for this widget. Data source usually means here a table or query, a field name or an expression.
Definition at line 40 of file kexiformdataiteminterface.h.
◆ dataSourceMimeType()
|
inline |
- Returns
- the mime type of the data source for this widget. Data source mime type means here types like "kexi/table" or "kexi/query" in.the data source is set to object (as within form or subform) or is empty if the data source is set to table field or query column.
Definition at line 50 of file kexiformdataiteminterface.h.
◆ field()
|
virtual |
- Returns
- database column information for this item
Implements KexiDataItemInterface.
Reimplemented in KexiDBComboBox.
Definition at line 47 of file kexiformdataiteminterface.cpp.
◆ hasDisplayedDefaultValue()
|
inlinevirtual |
- Returns
- true if default value is displayed for this item.
Definition at line 66 of file kexiformdataiteminterface.h.
◆ hideWidget()
|
inlinevirtual |
Does nothing, because within forms, widgets are always visible.
Reimplemented from KexiDataItemInterface.
Definition at line 107 of file kexiformdataiteminterface.h.
◆ keyPressed()
|
inlinevirtual |
Reimplemented in KexiDBAutoField, KexiDBComboBox, KexiDBImageBox, and KexiDBLineEdit.
Definition at line 132 of file kexiformdataiteminterface.h.
◆ setColumnInfo()
|
inlinevirtual |
Used internally to set database column information. Reimplement if you need to do additional actions, e.g. set data validator based on field type. Don't forget about calling superclass implementation.
Implements KexiDataItemInterface.
Reimplemented in KexiDBAutoField, KexiDBComboBox, KexiDBImageBox, KexiDBLabel, KexiDBLineEdit, and KexiDBTextEdit.
Definition at line 96 of file kexiformdataiteminterface.h.
◆ setDataSource()
|
inline |
Sets the name of the data source for this widget. Data source usually means here a table or query or field name name.
Definition at line 44 of file kexiformdataiteminterface.h.
◆ setDataSourceMimeType()
|
inline |
Sets the mime type of the data source for this widget. Data source usually means here a "kexi/table" or "kexi/query".
- See also
- dataSourceMimeType()
Definition at line 55 of file kexiformdataiteminterface.h.
◆ setDisplayDefaultValue()
|
virtual |
If displayDefaultValue is true, the value set by KexiDataItemInterface::setValue() is displayed in a special way. Used by KexiFormDataProvider::fillDataItems(). widget is equal to 'this'. You can reimplement this in the widget. Always call the superclass' implementation. setDisplayDefaultValue(.., false) is called in KexiFormScrollView::valueChanged() as a response on data change performed by user.
Reimplemented in KexiDBAutoField, KexiDBCheckBox, KexiDBLineEdit, and KexiDBTextEdit.
Definition at line 52 of file kexiformdataiteminterface.cpp.
◆ setInvalidState()
|
pure virtual |
Sets 'invalid' state, e.g. a text editor widget should display text displayText and become read only to prevent entering data, because updating at the database backend is not available. displayText is usually set to something i18n'd like "#NAME?". Note: that even widgets that usualy do not display texts (e.g. pixmaps) should display displayText too.
Implemented in KexiDBAutoField, KexiDBCheckBox, KexiDBDateEdit, KexiDBDateTimeEdit, KexiDBDoubleSpinBox, KexiDBForm, KexiDBImageBox, KexiDBIntSpinBox, KexiDBLabel, KexiDBLineEdit, KexiDBTextEdit, and KexiDBTimeEdit.
◆ setReadOnly()
|
pure virtual |
Changes 'read only' flag, for this widget. Typically this flag can be passed to a widget itself, e.g. KLineEdit::setReadOnly(bool).
Implemented in KexiDBAutoField.
◆ setVisibleColumnInfo()
|
inlinevirtual |
Used internally to set visible database column information. Reimplemented in KexiDBComboBox: except for combo box, this does nothing.
Reimplemented in KexiDBComboBox.
Definition at line 100 of file kexiformdataiteminterface.h.
◆ showWidget()
|
inlinevirtual |
Does nothing, because within forms, widgets are always visible.
Reimplemented from KexiDataItemInterface.
Definition at line 110 of file kexiformdataiteminterface.h.
◆ undoChanges()
|
virtual |
Undoes changes made to this item - just resets the widget to original value. Note: This is internal method called by KexiFormScrollView::cancelEditor(). To cancel editing of the widget's data from the widget's code, use KexiFormDataItemInterface::cancelEditor(). Reimplemented in KexiDBComboBox to also revert the visible value (i.e. text) to the original state.
Reimplemented in KexiDBComboBox.
Definition at line 40 of file kexiformdataiteminterface.cpp.
◆ visibleColumnInfo()
|
inlinevirtual |
- Returns
- visible database column information for this item. Except for combo box, this is exactly the same as columnInfo().
Reimplemented in KexiDBComboBox.
Definition at line 104 of file kexiformdataiteminterface.h.
◆ widget()
|
inlinevirtual |
Convenience function: casts this item to a TQWidget. Can return 0 if the item is not a TQWidget-derived object.
Implements KexiDataItemInterface.
Reimplemented in KexiDBCheckBox, KexiDBDateEdit, KexiDBDateTimeEdit, KexiDBDoubleSpinBox, KexiDBForm, KexiDBImageBox, KexiDBIntSpinBox, KexiDBLabel, KexiDBLineEdit, KexiDBTextEdit, and KexiDBTimeEdit.
Definition at line 70 of file kexiformdataiteminterface.h.
Friends And Related Symbol Documentation
◆ KexiDBAutoField
|
friend |
Definition at line 142 of file kexiformdataiteminterface.h.
Member Data Documentation
◆ m_columnInfo
|
protected |
Definition at line 137 of file kexiformdataiteminterface.h.
◆ m_dataSource
|
protected |
Definition at line 135 of file kexiformdataiteminterface.h.
◆ m_dataSourceMimeType
|
protected |
Definition at line 136 of file kexiformdataiteminterface.h.
◆ m_displayDefaultValue
|
protected |
used by setDisplayDefaultValue()
Definition at line 140 of file kexiformdataiteminterface.h.
◆ m_displayParametersForDefaultValue
|
protected |
used in setDisplayDefaultValue()
Definition at line 139 of file kexiformdataiteminterface.h.
◆ m_displayParametersForEnteredValue
|
protected |
used in setDisplayDefaultValue()
Definition at line 138 of file kexiformdataiteminterface.h.
The documentation for this class was generated from the following files:
