#include <item.h>
Definition at line 27 of file item.h.
§ Item()
Item::Item |
( |
Q3IconView * |
parent, |
|
|
QPixmap |
icon, |
|
|
QString |
text |
|
) |
| |
§ paintFocus()
void Item::paintFocus |
( |
QPainter * |
, |
|
|
const QColorGroup & |
|
|
) |
| |
|
inline |
§ paintItem()
void Item::paintItem |
( |
QPainter * |
p, |
|
|
const QColorGroup & |
cg |
|
) |
| |
Definition at line 26 of file item.cpp.
References height, and mousedOver.
35 p->fillRect( r, QColor(193, 210, 238) );
38 p->setPen( QColor(49, 106, 197) );
45 p->fillRect( r, QColor(224, 232, 246) );
48 p->setPen( QColor(152, 180, 226) );
54 p->drawPixmap( x() , y() + (
height() - pixmap()->
height() ) / 2, *pixmap());
56 int align = Qt::AlignLeft | Qt::TextWordWrap | Qt::TextWrapAnywhere;
57 p->drawText( textRect( FALSE ), align, text());
§ setMousedOver()
void Item::setMousedOver |
( |
bool |
val | ) |
|
§ setTextWidth()
void Item::setTextWidth |
( |
int |
w | ) |
|
Definition at line 63 of file item.cpp.
References height, and topLeft.
Referenced by paintFocus().
65 QRect pr = pixmapRect();
69 QRect tr = textRect();
71 tr.setRight( tr.left() + w);
74 int newW = pixmapRect().width() + 6 + w;
75 int newH = QMAX( textRect().
height(), pixmapRect().
height() ) + 6;
77 setItemRect( QRect( rect().
topLeft(), QSize(newW, newH)) );
§ mousedOver
The documentation for this class was generated from the following files: