# kdeui Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# KListViewItem Class Reference

A listview item with support for alternate background colours. listview item with alternate background colour support. More...

`#include <klistview.h>`

Inheritance diagram for KListViewItem:

[legend]
Collaboration diagram for KListViewItem:

[legend]
List of all members.

## Public Member Functions

| KListViewItem (QListView *parent)
| constructors.
| KListViewItem (QListViewItem *parent)
| KListViewItem (QListView *parent, QListViewItem *after)
| KListViewItem (QListViewItem *parent, QListViewItem *after)
| KListViewItem (QListView *parent, QString, QString=QString::null, QString=QString::null, QString=QString::null, QString=QString::null, QString=QString::null, QString=QString::null, QString=QString::null)
| KListViewItem (QListViewItem *parent, QString, QString=QString::null, QString=QString::null, QString=QString::null, QString=QString::null, QString=QString::null, QString=QString::null, QString=QString::null)
| KListViewItem (QListView *parent, QListViewItem *after, QString, QString=QString::null, QString=QString::null, QString=QString::null, QString=QString::null, QString=QString::null, QString=QString::null, QString=QString::null)
| KListViewItem (QListViewItem *parent, QListViewItem *after, QString, QString=QString::null, QString=QString::null, QString=QString::null, QString=QString::null, QString=QString::null, QString=QString::null, QString=QString::null)
bool | isAlternate ()
| returns true if this item is to be drawn with the alternate background
const QColor & | backgroundColor ()
| returns the background colour for this item
virtual void | paintCell (QPainter *p, const QColorGroup &cg, int column, int width, int alignment)

## Detailed Description

A listview item with support for alternate background colours. listview item with alternate background colour support.

It is a drop-in replacement for QListViewItem

Definition at line 911 of file klistview.h.

## Constructor & Destructor Documentation

KListViewItem::KListViewItem | ( | QListView * | parent | ) |

| constructors. The semantics remain as in QListViewItem. Although they accept a QListViewItem as parent, please don't mix KListViewItem (or subclasses) with QListViewItem (or subclasses). Definition at line 1978 of file klistview.cpp.

## Member Function Documentation

bool KListViewItem::isAlternate | ( |  | ) |

returns true if this item is to be drawn with the alternate background

Definition at line 2052 of file klistview.cpp.

References KListView::alternateBackground(), KListView::d, QListView::firstChild(), QColor::isValid(), QListViewItem::itemAbove(), QListViewItem::itemBelow(), QListViewItem::listView(), m_known, m_odd, QListViewItem::nextSibling(), and QListViewItem::parent().

Referenced by backgroundColor().

const QColor & KListViewItem::backgroundColor | ( |  | ) |

| returns the background colour for this item Definition at line 2045 of file klistview.cpp. References isAlternate(), and QListViewItem::listView().

The documentation for this class was generated from the following files:

- klistview.h
- klistview.cpp

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:02:26 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001