kdeui Library API Documentation

KIconViewItem Class Reference

KIconViewItem exists to improve the word-wrap functionality of QIconViewItem Use KIconViewItem instead of QIconViewItem for any iconview item you might have :) A variant of QIconViewItem that wraps words better. More...

#include <kiconview.h>

Inheritance diagram for KIconViewItem:

QIconViewItem List of all members.

Public Member Functions

 KIconViewItem (QIconView *parent)
 KIconViewItem (QIconView *parent, QIconViewItem *after)
 KIconViewItem (QIconView *parent, const QString &text)
 KIconViewItem (QIconView *parent, QIconViewItem *after, const QString &text)
 KIconViewItem (QIconView *parent, const QString &text, const QPixmap &icon)
 KIconViewItem (QIconView *parent, QIconViewItem *after, const QString &text, const QPixmap &icon)
 KIconViewItem (QIconView *parent, const QString &text, const QPicture &picture)
 KIconViewItem (QIconView *parent, QIconViewItem *after, const QString &text, const QPicture &picture)
void setPixmapSize (const QSize &size)
QSize pixmapSize () const

Protected Member Functions

void init ()
virtual void calcRect (const QString &text_=QString::null)
virtual void paintItem (QPainter *p, const QColorGroup &c)
KWordWrapwordWrap ()
void paintPixmap (QPainter *p, const QColorGroup &c)
void paintText (QPainter *p, const QColorGroup &c)

Detailed Description

KIconViewItem exists to improve the word-wrap functionality of QIconViewItem Use KIconViewItem instead of QIconViewItem for any iconview item you might have :) A variant of QIconViewItem that wraps words better.

Author:
David Faure <david@mandrakesoft.com>

Definition at line 207 of file kiconview.h.


Member Function Documentation

void KIconViewItem::setPixmapSize const QSize size  ) 
 

Using this function, you can specify a custom size for the pixmap.

The geometry of the item will be calculated to let a pixmap of the given size fit in the iconView without needing an update. This may be useful if you want to change the pixmap later without breaking the layout. A possible use of this function is to replace a fileItem icon by a larger pixmap (preview).

Since:
3.3
Parameters:
size The size to use
Definition at line 721 of file kiconview.cpp.

QSize KIconViewItem::pixmapSize  )  const
 

Returns:
The size set by setPixmapSize() or QSize( 0, 0 )
Since:
3.3
Definition at line 716 of file kiconview.cpp.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdeui Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Sep 29 09:43:32 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003