15 #include <q3iconview.h> 23 QString text,
QWidget* settingsWidget) :
43 p->fillRect( r, QColor(193, 210, 238) );
46 p->setPen( QColor(49, 106, 197) );
53 p->fillRect( r, QColor(224, 232, 246) );
56 p->setPen( QColor(152, 180, 226) );
62 p->drawPixmap( x()+3 , y() + (
height() - pixmap()->
height() ) / 2, *pixmap());
64 int align = Qt::AlignLeft | Qt::TextWordWrap | Qt::TextWrapAnywhere;
65 p->drawText( textRect( FALSE ), align, text());
77 QRect pr = pixmapRect();
78 int prWidth = pr.width();
79 int prHeight = pr.height();
80 pr.setTopLeft( QPoint(3,3) );
81 pr.setBottomRight( QPoint(pr.left()+prWidth, pr.top()+prHeight) );
86 QRect tr = textRect();
87 tr.setTop( pixmapRect().top() );
88 tr.setBottom( pixmapRect().bottom() );
89 tr.setLeft( pixmapRect().right() + 2 );
90 tr.setRight( tr.left() + textWidth );
94 int itemW = 3 + pixmapRect().width() + (tr.left() - pr.right()) + textRect().width() + 3;
95 int itemH = 3 + pixmapRect().height() + 3;
96 setItemRect( QRect( pixmapRect().left() - 3, pixmapRect().top() - 3, itemW, itemH ) );
void initializeItemRect()
void setMousedOver(bool val)
QWidget * getSettingsWidget()
void paintFocus(QPainter *p, const QColorGroup &cg)
void paintItem(QPainter *p, const QColorGroup &cg)
GroupIcon(Q3IconView *parent, QPixmap icon, QString text, QWidget *settingsWidget)