KListViewItem Class Reference

`#include <klistview.h>`

Inherits QListViewItem.

Inherited by KKeyChooserItem.

## Public Member Functions

| KListViewItem (QListView *parent)
| 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)
virtual void | insertItem (QListViewItem *item)
virtual void | takeItem (QListViewItem *item)
bool | isAlternate ()
const QColor & | backgroundColor () KDE_DEPRECATED
QColor | backgroundColor (int column)
virtual void | paintCell (QPainter *p, const QColorGroup &cg, int column, int width, int alignment)

## Friends

class | KListView

## Detailed Description

A listview item with support for alternate background colors.

It is a drop-in replacement for QListViewItem

listview item with alternate background color support

Definition at line 1009 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 2146 of file klistview.cpp.

## Member Function Documentation

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

returns the background color for this item

Definition at line 2230 of file klistview.cpp.

QColor KListViewItem::backgroundColor | ( | int | column | ) |

returns the background color for this item at given column This can be different in the column which is sorted due to shading

### could be merged with above (column = -1) to be source compatible

### but will only work if sort-shading is not used or the listView has

### only 1 column

Since
  3.4

Definition at line 2237 of file klistview.cpp.

bool KListViewItem::isAlternate | ( |  | ) |

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

Definition at line 2263 of file klistview.cpp.

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

- klistview.h
- klistview.cpp

KDE Home | KDE Accessibility Home | Description of Access Keys