# class toResultViewItem

An item to display in a toListView or toResultView. More...

Definition | `#include <toresultview.h>`
Inherits | QListViewItem (qt) [public ]
Inherited by | toResultViewMLine, toTemplateItem, toTemplateSQL, toTemplateText
List of all Methods

Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- toResultViewItem (QListView *parent,QListViewItem *after,const QString &buf=QString::null)
- toResultViewItem (QListViewItem *parent,QListViewItem *after,const QString &buf=QString::null)
- virtual ~toResultViewItem ()
- virtual void setText (int col,const QString &txt)
- virtual void setText (int col,const toQValue &val)
- virtual void paintCell (QPainter * p,const QColorGroup & cg,int column,int width,int align)
- virtual QString text (int col) const
- virtual QString key (int col,bool asc) const
- virtual int width (const QFontMetrics &, const QListView *, int col) const
- virtual QString allText (int col) const
- virtual QString tooltip (int col) const

#### Protected Methods

- virtual int realWidth (const QFontMetrics &fm, const QListView *top, int column,const QString &txt) const

## Detailed Description

An item to display in a toListView or toResultView. They differ from normal QListViewItems in that they can have a tooltip and actually contain more text than is displayed in the cell of the listview.

int realWidth (const QFontMetrics &fm, const QListView *top, int column,const QString &txt)

### realWidth

[protected const virtual]

toResultViewItem (QListView *parent,QListViewItem *after,const QString &buf=QString::null)

### toResultViewItem

Create a new item.

Parameters:

parent | Parent list view.
after | Insert after this item.
buffer | String to set as first column

toResultViewItem (QListViewItem *parent,QListViewItem *after,const QString &buf=QString::null)

### toResultViewItem

Create a new item.

Parameters:

parent | Parent to this item.
after | Insert after this item.
buffer | String to set as first column

~toResultViewItem ()

### ~toResultViewItem

[virtual]

Reimplemented for internal reasons.

void setText (int col,const QString &txt)

### setText

[virtual]

Reimplemented for internal reasons.

void setText (int col,const toQValue &val)

### setText

[virtual]

Set from database.

void paintCell (QPainter * p,const QColorGroup & cg,int column,int width,int align)

### paintCell

[virtual]

Reimplemented for internal reasons.

QString text (int col)

### text

[const virtual]

Reimplemented for internal reasons.

QString key (int col,bool asc)

### key

[const virtual]

String to sort the data on. This is reimplemented so that numbers are sorted as numbers and not as strings.

Parameters:

col | Column
asc | Wether to sort ascending or not.

int width (const QFontMetrics &, const QListView *, int col)

### width

[const virtual]

Reimplemented for internal reasons.

QString allText (int col)

### allText

[const virtual]

Get all text for this item. This is used for copying, drag & drop and memo editing etc.

Parameters:

col | Column.

Returns: All of the text.

QString tooltip (int col)

### tooltip

[const virtual]

Get the text to be displayed as tooltip for this item.

Parameters:

col | Column.

Returns: The text to display as tooltip.

Generated by: nneul on skyhawk on Wed Feb 23 19:49:58 2005, using kdoc 2.0a54.