15 #include <q3iconview.h> 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());
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)) );
void setMousedOver(bool val)
void paintItem(QPainter *p, const QColorGroup &cg)
Item(Q3IconView *parent, QPixmap icon, QString text)