kexi

KexiBoolTableEdit Class Reference

#include <kexibooltableedit.h>

Inheritance diagram for KexiBoolTableEdit:

KexiTableEdit KexiDataItemInterface List of all members.

Detailed Description

Cell editor for boolean type.

Definition at line 30 of file kexibooltableedit.h.


Signals

void hintClicked ()

Public Member Functions

 KexiBoolTableEdit (KexiTableViewColumn &column, QScrollView *parent=0)
virtual ~KexiBoolTableEdit ()
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, QVariant val, QString &txt, int &align, int &x, int &y_offset, int &w, int &h)
virtual void clickedOnContents ()

Protected Member Functions

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

Protected Attributes

QVariant m_currentValue

Member Function Documentation

void KexiBoolTableEdit::clear  )  [virtual]
 

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

Implements KexiDataItemInterface.

Definition at line 79 of file kexibooltableedit.cpp.

void KexiBoolTableEdit::clickedOnContents  )  [virtual]
 

Allows to define reaction for clicking on cell's contents. Currently it's used for editor of type boolean, where we want to toggle true/false on single mouse click.

See also:
hasFocusableWidget(), KexiBoolTableEdit. Default implementation does nothing.

Reimplemented from KexiDataItemInterface.

Definition at line 126 of file kexibooltableedit.cpp.

bool KexiBoolTableEdit::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 89 of file kexibooltableedit.cpp.

bool KexiBoolTableEdit::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 84 of file kexibooltableedit.cpp.

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

For reimplementation. Sets up anmd 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, it's not needed to paint the text (this is done automatically outside.

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.

Reimplemented from KexiTableEdit.

Definition at line 101 of file kexibooltableedit.cpp.

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

initializes this editor with add value

Implements KexiDataItemInterface.

Definition at line 50 of file kexibooltableedit.cpp.

QVariant KexiBoolTableEdit::value  )  [virtual]
 

Returns:
value currently represented by this item.

Implements KexiDataItemInterface.

Definition at line 73 of file kexibooltableedit.cpp.

bool KexiBoolTableEdit::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 68 of file kexibooltableedit.cpp.

bool KexiBoolTableEdit::valueIsNull  )  [virtual]
 

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

Implements KexiDataItemInterface.

Definition at line 63 of file kexibooltableedit.cpp.


Member Data Documentation

QVariant KexiBoolTableEdit::m_currentValue [protected]
 

We've no editor widget that would store current value, so we do this here.

Definition at line 69 of file kexibooltableedit.h.


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