Kexi API Documentation (2.0 alpha)

KexiInputTableEdit Class Reference

#include <kexiinputtableedit.h>

Inheritance diagram for KexiInputTableEdit:

KexiTableEdit QWidget KexiDataItemInterface KexiComboBoxTableEdit KexiDateTableEdit KexiDateTimeTableEdit KexiTimeTableEdit List of all members.

Detailed Description

General purpose cell editor using line edit widget.

Definition at line 33 of file kexiinputtableedit.h.

Public Slots

virtual void moveCursorToEnd ()
 Implemented for KexiDataItemInterface.
virtual void moveCursorToStart ()
 Implemented for KexiDataItemInterface.
virtual void selectAll ()
 Implemented for KexiDataItemInterface.

Signals

void hintClicked ()

Public Member Functions

 KexiInputTableEdit (KexiTableViewColumn &column, QWidget *parent=0)
virtual ~KexiInputTableEdit ()
virtual bool valueChanged ()
virtual bool valueIsNull ()
virtual bool valueIsEmpty ()
virtual QVariant value ()
virtual bool cursorAtStart ()
virtual bool cursorAtEnd ()
virtual void clear ()
 clears item's data, so the data will contain NULL data
virtual QSize totalSize ()
virtual void handleAction (const QString &actionName)
virtual void handleCopyAction (const QVariant &value, const QVariant &visibleValue)
virtual bool showToolTipIfNeeded (const QVariant &value, const QRect &rect, const QFontMetrics &fm, bool focused)

Protected Slots

void setRestrictedCompletion ()
void completed (const QString &)

Protected Member Functions

virtual void setValueInternal (const QVariant &add, bool removeOld)
 initializes this editor with add value
void showHintButton ()
void init ()
virtual void paintEvent (QPaintEvent *e)

Protected Attributes

KexiTextFormatter m_textFormatter
bool m_calculatedCell
QString m_decsym
QString m_origText
 decimal symbol
KLineEditm_lineedit
 orig. Line Edit's text after conversion - for easy comparing


Constructor & Destructor Documentation

KexiInputTableEdit::KexiInputTableEdit KexiTableViewColumn column,
QWidget parent = 0
 

Definition at line 63 of file kexiinputtableedit.cpp.

References init().

KexiInputTableEdit::~KexiInputTableEdit  )  [virtual]
 

Definition at line 73 of file kexiinputtableedit.cpp.


Member Function Documentation

void KexiInputTableEdit::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.

References m_lineedit.

void KexiInputTableEdit::completed const QString  )  [protected, slot]
 

Definition at line 254 of file kexiinputtableedit.cpp.

References m_lineedit.

Referenced by init().

bool KexiInputTableEdit::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.

References m_lineedit.

bool KexiInputTableEdit::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.

References m_lineedit.

void KexiInputTableEdit::handleAction const QString actionName  )  [virtual]
 

Handles action having standard name actionName. Action could be: "edit_cut", "edit_paste", etc.

Reimplemented from KexiDataItemInterface.

Reimplemented in KexiComboBoxTableEdit, KexiDateTableEdit, KexiDateTimeTableEdit, and KexiTimeTableEdit.

Definition at line 345 of file kexiinputtableedit.cpp.

References KexiTableEdit::editRequested(), and m_lineedit.

Referenced by KexiTimeTableEdit::handleAction(), KexiDateTimeTableEdit::handleAction(), KexiDateTableEdit::handleAction(), and KexiComboBoxTableEdit::handleAction().

void KexiInputTableEdit::handleCopyAction const QVariant &  value,
const QVariant &  visibleValue
[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.

Implements KexiTableEdit.

Reimplemented in KexiComboBoxTableEdit, KexiDateTableEdit, KexiDateTimeTableEdit, and KexiTimeTableEdit.

Definition at line 338 of file kexiinputtableedit.cpp.

References m_textFormatter, and KexiTextFormatter::valueToText().

void KexiInputTableEdit::hintClicked  )  [signal]
 

void KexiInputTableEdit::init  )  [protected]
 

Definition at line 77 of file kexiinputtableedit.cpp.

References completed(), KexiTableEdit::displayedField(), KexiTableEdit::field(), m_calculatedCell, m_decsym, m_lineedit, m_textFormatter, KexiTextFormatter::setField(), and KexiTableEdit::setViewWidget().

Referenced by KexiInputTableEdit().

void KexiInputTableEdit::moveCursorToEnd  )  [virtual, slot]
 

Implemented for KexiDataItemInterface.

mark

Reimplemented from KexiDataItemInterface.

Reimplemented in KexiComboBoxTableEdit.

Definition at line 378 of file kexiinputtableedit.cpp.

References m_lineedit.

void KexiInputTableEdit::moveCursorToStart  )  [virtual, slot]
 

Implemented for KexiDataItemInterface.

mark

Reimplemented from KexiDataItemInterface.

Reimplemented in KexiComboBoxTableEdit.

Definition at line 383 of file kexiinputtableedit.cpp.

References m_lineedit.

void KexiInputTableEdit::paintEvent QPaintEvent *  e  )  [protected, virtual]
 

Definition at line 222 of file kexiinputtableedit.cpp.

void KexiInputTableEdit::selectAll  )  [virtual, slot]
 

Implemented for KexiDataItemInterface.

Reimplemented from KexiDataItemInterface.

Reimplemented in KexiComboBoxTableEdit.

Definition at line 388 of file kexiinputtableedit.cpp.

References m_lineedit.

void KexiInputTableEdit::setRestrictedCompletion  )  [protected, slot]
 

Definition at line 230 of file kexiinputtableedit.cpp.

void KexiInputTableEdit::setValueInternal const QVariant &  add,
bool  removeOld
[protected, virtual]
 

initializes this editor with add value

Implements KexiDataItemInterface.

Reimplemented in KexiComboBoxTableEdit, KexiDateTableEdit, KexiDateTimeTableEdit, and KexiTimeTableEdit.

Definition at line 119 of file kexiinputtableedit.cpp.

References KexiTableEdit::field(), m_lineedit, KexiDataItemInterface::m_origValue, m_textFormatter, and KexiTextFormatter::valueToText().

void KexiInputTableEdit::showHintButton  )  [protected]
 

bool KexiInputTableEdit::showToolTipIfNeeded const QVariant &  value,
const QRect &  rect,
const QFontMetrics &  fm,
bool  focused
[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 QToolTip,) 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.

References kexidbg, KexiTableEdit::leftMargin(), m_textFormatter, KexiTableEdit::rightMargin(), and KexiTextFormatter::valueToText().

QSize KexiInputTableEdit::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.

References m_lineedit, and size.

QVariant KexiInputTableEdit::value  )  [virtual]
 

js

Todo:
PRESERVE PRECISION!
Todo:
check constraints

Implements KexiDataItemInterface.

Reimplemented in KexiComboBoxTableEdit, KexiDateTableEdit, KexiDateTimeTableEdit, and KexiTimeTableEdit.

Definition at line 277 of file kexiinputtableedit.cpp.

References KexiDB::Field::BigInteger, KexiTableEdit::field(), KexiDB::Field::Integer, m_decsym, and m_lineedit.

bool KexiInputTableEdit::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.

References KexiDataItemInterface::valueChanged().

Referenced by KexiComboBoxTableEdit::valueChanged().

bool KexiInputTableEdit::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.

References m_lineedit.

bool KexiInputTableEdit::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.

References m_lineedit.


Member Data Documentation

bool KexiInputTableEdit::m_calculatedCell [protected]
 

Definition at line 115 of file kexiinputtableedit.h.

Referenced by init().

QString KexiInputTableEdit::m_decsym [protected]
 

Definition at line 116 of file kexiinputtableedit.h.

Referenced by init(), and value().

KLineEdit* KexiInputTableEdit::m_lineedit [protected]
 

orig. Line Edit's text after conversion - for easy comparing

Definition at line 118 of file kexiinputtableedit.h.

Referenced by clear(), KexiComboBoxTableEdit::clear(), completed(), KexiComboBoxTableEdit::createInternalEditor(), cursorAtEnd(), cursorAtStart(), KexiDateTableEdit::dateValue(), KexiTimeTableEdit::handleAction(), handleAction(), KexiDateTimeTableEdit::handleAction(), KexiDateTableEdit::handleAction(), KexiComboBoxTableEdit::handleAction(), init(), KexiComboBoxTableEdit::internalEditor(), KexiComboBoxTableEdit::KexiComboBoxTableEdit(), KexiDateTableEdit::KexiDateTableEdit(), KexiDateTimeTableEdit::KexiDateTimeTableEdit(), KexiTimeTableEdit::KexiTimeTableEdit(), moveCursorToEnd(), KexiComboBoxTableEdit::moveCursorToEnd(), moveCursorToStart(), KexiComboBoxTableEdit::moveCursorToStart(), KexiComboBoxTableEdit::popupWidthHint(), selectAll(), KexiComboBoxTableEdit::selectAll(), KexiTimeTableEdit::setValueInInternalEditor(), KexiDateTimeTableEdit::setValueInInternalEditor(), KexiDateTableEdit::setValueInInternalEditor(), KexiComboBoxTableEdit::setValueInInternalEditor(), KexiTimeTableEdit::setValueInternal(), setValueInternal(), KexiDateTimeTableEdit::setValueInternal(), KexiDateTableEdit::setValueInternal(), KexiDateTimeTableEdit::textIsEmpty(), KexiTimeTableEdit::timeValue(), totalSize(), KexiTimeTableEdit::value(), value(), KexiDateTimeTableEdit::value(), KexiDateTableEdit::value(), KexiComboBoxTableEdit::valueFromInternalEditor(), valueIsEmpty(), KexiTimeTableEdit::valueIsNull(), valueIsNull(), KexiDateTimeTableEdit::valueIsNull(), KexiDateTableEdit::valueIsNull(), KexiTimeTableEdit::valueIsValid(), KexiDateTimeTableEdit::valueIsValid(), and KexiDateTableEdit::valueIsValid().

QString KexiInputTableEdit::m_origText [protected]
 

decimal symbol

Definition at line 117 of file kexiinputtableedit.h.

KexiTextFormatter KexiInputTableEdit::m_textFormatter [protected]
 

Definition at line 114 of file kexiinputtableedit.h.

Referenced by handleCopyAction(), init(), setValueInternal(), and showToolTipIfNeeded().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:50:04 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003