kexi

KexiKIconTableEdit Class Reference

#include <kexiblobtableedit.h>

Inheritance diagram for KexiKIconTableEdit:

KexiTableEdit KexiDataItemInterface List of all members.

Detailed Description

Cell editor for displaying kde icon (using icon name provided as string). Read only.

Definition at line 126 of file kexiblobtableedit.h.


Public Member Functions

 KexiKIconTableEdit (KexiTableViewColumn &column, QWidget *parent=0)
virtual ~KexiKIconTableEdit ()
virtual bool valueIsNull ()
virtual bool valueIsEmpty ()
virtual QVariant value ()
virtual bool cursorAtStart ()
virtual bool cursorAtEnd ()
virtual void clear ()
virtual void setupContents (QPainter *p, bool focused, const QVariant &val, QString &txt, int &align, int &x, int &y_offset, int &w, int &h)
virtual void handleCopyAction (const QVariant &value, const QVariant &visibleValue)

Protected Member Functions

virtual void setValueInternal (const QVariant &add, bool removeOld)
void showHintButton ()
void init ()

Protected Attributes

Private * d

Member Function Documentation

bool KexiKIconTableEdit::valueIsNull (  )  [virtual]

Returns:
true if editor's value is null (not empty)

Implements KexiDataItemInterface.

Definition at line 662 of file kexiblobtableedit.cpp.

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

Definition at line 667 of file kexiblobtableedit.cpp.

QVariant KexiKIconTableEdit::value (  )  [virtual]

Returns:
value currently represented by this item.

Implements KexiDataItemInterface.

Definition at line 672 of file kexiblobtableedit.cpp.

bool KexiKIconTableEdit::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 682 of file kexiblobtableedit.cpp.

bool KexiKIconTableEdit::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 687 of file kexiblobtableedit.cpp.

void KexiKIconTableEdit::clear (  )  [virtual]

clears item's data, so the data will contain NULL data

Implements KexiDataItemInterface.

Definition at line 677 of file kexiblobtableedit.cpp.

void KexiKIconTableEdit::setupContents ( QPainter *  p,
bool  focused,
const QVariant &  val,
QString &  txt,
int &  align,
int &  x,
int &  y_offset,
int &  w,
int &  h 
) [virtual]

For reimplementation. Sets up and paints cell's contents using context of val value. focused is true if the cell is focused. align is set using Qt::AlignmentFlags. Some additional things may be painted using p, but it is not needed to paint the text (this is done automatically outside of this method).

Before calling, x, y_offset, w, h parameters are initialized, but you can tune these values depending on the context. You should set txt to a text representation of val, otherwise no text will be painted.

p can be 0 - in this case no painting should be performed, becasue caller only expects that x, y_offset, w, h, txt paramaters are tuned, if needed. p painter's pen is set to foreground color (usually black) that should be used to paint foreground information, if needed. For example boolean editor widget paints a rectangle using this color.

Todo:
ADD OPTION to displaying NULL VALUES as e.g. "(null)"

Reimplemented from KexiTableEdit.

Definition at line 692 of file kexiblobtableedit.cpp.

void KexiKIconTableEdit::handleCopyAction ( const QVariant &  value,
const QVariant &  visibleValue 
) [virtual]

Handles copy action for value. Does nothing. visibleValue is unused here. Reimplemented after KexiTableEdit.

Implements KexiTableEdit.

Definition at line 732 of file kexiblobtableedit.cpp.

void KexiKIconTableEdit::setValueInternal ( const QVariant &  add,
bool  removeOld 
) [protected, virtual]

initializes this editor with add value

Implements KexiDataItemInterface.

Definition at line 657 of file kexiblobtableedit.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys