Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

OCheckItem Class Reference

An checkable QTableItem. More...

#include </home/clem/local/src/opie/noncore/unsupported/libopie/ocheckitem.h>

Collaboration diagram for OCheckItem:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Size { BoxSize = 10 }

Public Member Functions

 OCheckItem (QTable *t, const QString &sortkey)
virtual void setChecked (bool b)
virtual void toggle ()
bool isChecked () const
void setKey (const QString &key)
 Set the sort key .
virtual QString key () const
void paint (QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected)

Private Attributes

OCheckItemPrivate * d
bool m_checked: 1
QString m_sortKey

Detailed Description

An checkable QTableItem.

This class represents a checkable QTableItem. This can be added to any QTable.

See also:
QTable

QTableItem

Version:
1.0
Author:
Stefan Eilers ( eilers@handhelds.org )

Definition at line 29 of file ocheckitem.h.


Member Enumeration Documentation

enum OCheckItem::Size
 

The size of a box currently unused

Enumeration values:
BoxSize 

Definition at line 33 of file ocheckitem.h.


Constructor & Destructor Documentation

OCheckItem::OCheckItem QTable t,
const QString key
 

Constructs an CheckItem with a QTable as parent and a sort key for. The sort key will be used by QTable to sort the table later

Parameters:
t The parent QTable where the check item belongs
key A sort key

Definition at line 23 of file ocheckitem.cpp.


Member Function Documentation

bool OCheckItem::isChecked  )  const
 

This will return the state of the item.

Returns:
Returns true if the item is checked

Definition at line 64 of file ocheckitem.cpp.

References m_checked.

QString OCheckItem::key  )  const [virtual]
 

reimplemted for internal reasons

Returns:
Returns the sort key of the Item
See also:
QTableItem

Definition at line 33 of file ocheckitem.cpp.

References m_sortKey.

void OCheckItem::paint QPainter *  p,
const QColorGroup &  cg,
const QRect &  cr,
bool  selected
 

foo

For internal use only.

Definition at line 73 of file ocheckitem.cpp.

References BoxSize, i, m_checked, Opie::MM::x, and Opie::MM::y.

void OCheckItem::setChecked bool  b  )  [virtual]
 

This method can check or uncheck the item. It will call QTable to update the cell.

Parameters:
b Whether to check or uncheck the item

Definition at line 44 of file ocheckitem.cpp.

References col, m_checked, and row.

void OCheckItem::setKey const QString key  )  [inline]
 

Set the sort key .

Definition at line 43 of file ocheckitem.h.

References m_sortKey.

void OCheckItem::toggle  )  [virtual]
 

This will toggle the item. If it is checked it'll get unchecked by this method or vice versa.

Definition at line 54 of file ocheckitem.cpp.

References m_checked.


Member Data Documentation

OCheckItemPrivate* OCheckItem::d [private]
 

Definition at line 55 of file ocheckitem.h.

bool OCheckItem::m_checked [private]
 

Definition at line 57 of file ocheckitem.h.

Referenced by isChecked(), paint(), setChecked(), and toggle().

QString OCheckItem::m_sortKey [private]
 

Definition at line 58 of file ocheckitem.h.

Referenced by key(), and setKey().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:41:48 2005 for OPIE by  doxygen 1.4.2