libopie API Documentation

OCheckItem Class Reference

This class represents a checkable QTableItem. An checkable QTableItem. More...

#include <ocheckitem.h>

Inheritance diagram for OCheckItem:

Inheritance graph
[legend]
Collaboration diagram for OCheckItem:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Size { BoxSize = 10 }
 The size of a box currently unused. More...


Public Member Functions

 OCheckItem (QTable *t, const QString &sortkey)
 Constructs an CheckItem with a QTable as parent and a sort key for.

virtual void setChecked (bool b)
 This method can check or uncheck the item.

virtual void toggle ()
 This will toggle the item.

bool isChecked () const
 This will return the state of the item.

void setKey (const QString &key)
 Set the sort key .

virtual QString key () const
 reimplemted for internal reasons

void paint (QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected)
 foo


Detailed Description

This class represents a checkable QTableItem. An 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.

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 24 of file ocheckitem.cpp.


Member Function Documentation

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 45 of file ocheckitem.cpp.

References QTableItem::col(), QTableItem::row(), and QTableItem::table().

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 55 of file ocheckitem.cpp.

bool OCheckItem::isChecked  )  const
 

This will return the state of the item.

Returns:
Returns true if the item is checked

Definition at line 65 of file ocheckitem.cpp.

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

Set the sort key .

Definition at line 43 of file ocheckitem.h.

QString OCheckItem::key  )  const [virtual]
 

reimplemted for internal reasons

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

Reimplemented from QTableItem.

Definition at line 34 of file ocheckitem.cpp.

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

foo

Reimplemented from QTableItem.

Definition at line 74 of file ocheckitem.cpp.

References QColorGroup::brush(), QPainter::drawLineSegments(), QPainter::drawRect(), QPainter::fillRect(), QRect::height(), QPainter::setPen(), QPointArray::setPoint(), QColorGroup::text(), and QRect::width().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for OPIE Version 1.1.
Documentation copyright © 1997-2003 the KDE developers. 2003 OPIE developers
Generated on Tue Feb 10 20:24:47 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001