KexiDBLineEdit Class Reference
#include <kexidblineedit.h>
Inheritance diagram for KexiDBLineEdit:

Detailed Description
Line edit widget for Kexi forms.Handles many data types. User input is validated by using validators and/or input masks.
Definition at line 43 of file kexidblineedit.h.
Public Slots | |
| void | setDataSource (const QString &ds) |
| Sets the name of the data source for this widget. | |
| void | setDataSourceMimeType (const QCString &ds) |
| virtual void | setReadOnly (bool readOnly) |
| virtual void | undo () |
| Reimplemented, so "undo" means the same as "cancelEditor" action. | |
| virtual void | moveCursorToEnd () |
| Implemented for KexiDataItemInterface. | |
| virtual void | moveCursorToStart () |
| Implemented for KexiDataItemInterface. | |
| virtual void | selectAll () |
| Implemented for KexiDataItemInterface. | |
Public Member Functions | |
| KexiDBLineEdit (QWidget *parent, const char *name=0) | |
| virtual | ~KexiDBLineEdit () |
| QString | dataSource () const |
| QCString | dataSourceMimeType () const |
| virtual QVariant | value () |
| virtual void | setInvalidState (const QString &displayText) |
| virtual bool | valueIsNull () |
| virtual bool | valueIsEmpty () |
| virtual bool | valueIsValid () |
| virtual bool | isReadOnly () const |
| virtual void | setDisplayDefaultValue (QWidget *widget, bool displayDefaultValue) |
| virtual QWidget * | widget () |
| virtual bool | cursorAtStart () |
| virtual bool | cursorAtEnd () |
| virtual void | clear () |
| clears item's data, so the data will contain NULL data | |
| virtual void | setColumnInfo (KexiDB::QueryColumnInfo *cinfo) |
| virtual void | handleAction (const QString &actionName) |
| virtual bool | keyPressed (QKeyEvent *ke) |
Protected Slots | |
| void | slotTextChanged (const QString &) |
Protected Member Functions | |
| virtual void | paintEvent (QPaintEvent *) |
| virtual void | setValueInternal (const QVariant &add, bool removeOld) |
| virtual bool | event (QEvent *) |
| virtual QPopupMenu * | createPopupMenu () |
| virtual bool | appendStretchRequired (KexiDBAutoField *autoField) const |
| Implemented for KexiSubwidgetInterface. | |
Protected Attributes | |
| KexiTextFormatter | m_textFormatter |
| Used to format text. | |
| QGuardedPtr< const QValidator > | m_readOnlyValidator |
| Used for read only flag to disable editing. | |
| QGuardedPtr< const QValidator > | m_readWriteValidator |
| Used to remember the previous validator used forf r/w mode, after setting the read only flag. | |
| KexiDBWidgetContextMenuExtender | m_menuExtender |
| Used for extending context menu. | |
| bool | m_internalReadOnly: 1 |
| Used in isReadOnly, as sometimes we want to have the flag set tot true when KLineEdit::isReadOnly is still false. | |
| bool | m_slotTextChanged_enabled: 1 |
| Used in slotTextChanged(). | |
Properties | |
| QString | dataSource |
| QCString | dataSourceMimeType |
Constructor & Destructor Documentation
|
||||||||||||
|
Definition at line 53 of file kexidblineedit.cpp. References lighterGrayBackgroundColor(), slotTextChanged(), and widget(). |
|
|
Definition at line 73 of file kexidblineedit.cpp. |
Member Function Documentation
|
|
Implemented for KexiSubwidgetInterface.
Reimplemented from KexiSubwidgetInterface. Definition at line 360 of file kexidblineedit.cpp. References KexiDBAutoField::labelPosition, and KexiDBAutoField::Top. |
|
|
clears item's data, so the data will contain NULL data
Implements KexiDataItemInterface. Definition at line 291 of file kexidblineedit.cpp. References m_internalReadOnly. |
|
|
Definition at line 268 of file kexidblineedit.cpp. References KexiDBWidgetContextMenuExtender::createTitle(), and m_menuExtender. |
|
|
Implements KexiDataItemInterface. Definition at line 286 of file kexidblineedit.cpp. |
|
|
Implements KexiDataItemInterface. Definition at line 281 of file kexidblineedit.cpp. |
|
|
Reimplemented from KexiFormDataItemInterface. Definition at line 58 of file kexidblineedit.h. References KexiFormDataItemInterface::dataSource(). |
|
|
Reimplemented from KexiFormDataItemInterface. Definition at line 59 of file kexidblineedit.h. References KexiFormDataItemInterface::dataSourceMimeType(). |
|
|
Definition at line 344 of file kexidblineedit.cpp. References KexiDBTextWidgetInterface::event(). |
|
|
Handles action having standard name actionName. Action could be: "edit_copy", "edit_paste", etc. Reimplemented after KexiDataItemChangesListener. Reimplemented from KexiDataItemInterface. Definition at line 365 of file kexidblineedit.cpp. |
|
|
Reimplemented from KexiDataItemInterface. Definition at line 242 of file kexidblineedit.cpp. References m_internalReadOnly. |
|
|
Called by top-level form on key press event to consume widget-specific shortcuts. Reimplemented from KexiFormDataItemInterface. Definition at line 411 of file kexidblineedit.cpp. |
|
|
Implemented for KexiDataItemInterface. mark Reimplemented from KexiDataItemInterface. Definition at line 396 of file kexidblineedit.cpp. |
|
|
Implemented for KexiDataItemInterface. mark Reimplemented from KexiDataItemInterface. Definition at line 401 of file kexidblineedit.cpp. |
|
|
Definition at line 337 of file kexidblineedit.cpp. References KexiDBTextWidgetInterface::paint(). |
|
|
Implemented for KexiDataItemInterface.
Reimplemented from KexiDataItemInterface. Definition at line 406 of file kexidblineedit.cpp. |
|
|
Reimplemented from KexiFormDataItemInterface. Definition at line 298 of file kexidblineedit.cpp. References KexiDB::Field::Date, KexiDB::Field::DateTime, dateTimeInputMask(), KexiDB::QueryColumnInfo::field, KexiTextFormatter::inputMask(), m_textFormatter, KexiDBTextWidgetInterface::setColumnInfo(), KexiFormDataItemInterface::setColumnInfo(), KexiTextFormatter::setField(), and KexiDB::Field::Time. |
|
|
Sets the name of the data source for this widget. Data source usually means here a table or query or field name name. Reimplemented from KexiFormDataItemInterface. Definition at line 103 of file kexidblineedit.h. References KexiFormDataItemInterface::setDataSource(). |
|
|
Sets the mime type of the data source for this widget. Data source usually means here a "kexi/table" or "kexi/query".
Reimplemented from KexiFormDataItemInterface. Definition at line 104 of file kexidblineedit.h. References KexiFormDataItemInterface::setDataSourceMimeType(). |
|
||||||||||||
|
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'. Reimplemented after KexiFormDataItemInterface. Reimplemented from KexiFormDataItemInterface. Definition at line 379 of file kexidblineedit.cpp. References KexiDisplayUtils::DisplayParameters::font, KexiFormDataItemInterface::m_displayParametersForDefaultValue, KexiFormDataItemInterface::m_displayParametersForEnteredValue, KexiFormDataItemInterface::setDisplayDefaultValue(), and KexiDisplayUtils::DisplayParameters::textColor. |
|
|
Implements KexiFormDataItemInterface. Definition at line 79 of file kexidblineedit.cpp. |
|
|
Changes 'read only' flag, for this widget. Typically this flag can be passed to a widget itself, e.g. KLineEdit::setReadOnly(bool). Implements KexiFormDataItemInterface. Definition at line 247 of file kexidblineedit.cpp. References m_internalReadOnly, m_menuExtender, m_readOnlyValidator, m_readWriteValidator, and KexiDBWidgetContextMenuExtender::updatePopupMenuActions(). |
|
||||||||||||
|
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. Implements KexiDataItemInterface. Definition at line 88 of file kexidblineedit.cpp. References KexiDB::Field::Boolean, KexiDB::Field::Date, KexiDB::Field::DateTime, KexiFormDataItemInterface::m_columnInfo, KexiDataItemInterface::m_origValue, m_slotTextChanged_enabled, m_textFormatter, KexiDB::Field::Time, value(), and KexiTextFormatter::valueToText(). |
|
|
Definition at line 185 of file kexidblineedit.cpp. References m_slotTextChanged_enabled, and KexiDataItemInterface::signalValueChanged(). Referenced by KexiDBLineEdit(). |
|
|
Reimplemented, so "undo" means the same as "cancelEditor" action.
Definition at line 391 of file kexidblineedit.cpp. References KexiFormDataItemInterface::cancelEditor(). |
|
|
Implements KexiDataItemInterface. Definition at line 145 of file kexidblineedit.cpp. References KexiDB::Field::BigInteger, KexiDB::Field::Boolean, KexiDB::Field::Byte, KexiDB::Field::Date, KexiDB::Field::DateTime, KexiDB::Field::Double, KexiDB::QueryColumnInfo::field, KexiDB::Field::Float, KexiDB::Field::Integer, KexiDB::Field::LongText, KexiFormDataItemInterface::m_columnInfo, m_textFormatter, KexiDB::Field::ShortInteger, stringToDateTime(), KexiDB::Field::Text, KexiTextFormatter::textToValue(), and KexiDB::Field::Time. Referenced by setValueInternal(). |
|
|
Implements KexiDataItemInterface. Definition at line 197 of file kexidblineedit.cpp. References KexiDB::Field::Date, dateTimeIsEmpty(), KexiDB::QueryColumnInfo::field, KexiFormDataItemInterface::m_columnInfo, m_textFormatter, KexiDB::Field::Time, and KexiTextFormatter::valueIsEmpty(). Referenced by valueIsNull(), and valueIsValid(). |
|
|
Implements KexiDataItemInterface. Definition at line 192 of file kexidblineedit.cpp. References valueIsEmpty(). |
|
|
Reimplemented from KexiDataItemInterface. Definition at line 219 of file kexidblineedit.cpp. References KexiDB::Field::Date, KexiDB::Field::DateTime, dateTimeIsValid(), KexiDB::QueryColumnInfo::field, KexiFormDataItemInterface::m_columnInfo, m_textFormatter, KexiDB::Field::Time, valueIsEmpty(), and KexiTextFormatter::valueIsValid(). |
|
|
Reimplemented from KexiFormDataItemInterface. Definition at line 276 of file kexidblineedit.cpp. Referenced by KexiDBLineEdit(). |
Member Data Documentation
|
|
Used in isReadOnly, as sometimes we want to have the flag set tot true when KLineEdit::isReadOnly is still false.
Definition at line 164 of file kexidblineedit.h. Referenced by clear(), isReadOnly(), and setReadOnly(). |
|
|
Used for extending context menu.
Definition at line 160 of file kexidblineedit.h. Referenced by createPopupMenu(), and setReadOnly(). |
|
|
Used for read only flag to disable editing.
Definition at line 154 of file kexidblineedit.h. Referenced by setReadOnly(). |
|
|
Used to remember the previous validator used forf r/w mode, after setting the read only flag.
Definition at line 157 of file kexidblineedit.h. Referenced by setReadOnly(). |
|
|
Used in slotTextChanged().
Definition at line 167 of file kexidblineedit.h. Referenced by setValueInternal(), and slotTextChanged(). |
|
|
Used to format text.
Definition at line 151 of file kexidblineedit.h. Referenced by setColumnInfo(), setValueInternal(), value(), valueIsEmpty(), and valueIsValid(). |
Property Documentation
|
|
Definition at line 50 of file kexidblineedit.h. |
|
|
Definition at line 51 of file kexidblineedit.h. |
The documentation for this class was generated from the following files:
