21#include <koIconChooser.h>
22#include "kis_iconwidget.h"
24KisIconWidget::KisIconWidget(TQWidget *parent, const char *name) : super(parent, name)
29void KisIconWidget::slotSetItem(KoIconItem& item)
35void KisIconWidget::drawButtonLabel(TQPainter *p)
38 const TQPixmap& pix = m_item->pixmap();
41 TQ_INT32 pw = pix.width();
42 TQ_INT32 ph = pix.height();
43 TQ_INT32 cw = width();
44 TQ_INT32 ch = height();
45 TQ_INT32 itemWidth = 24;
46 TQ_INT32 itemHeight = 24;
53 if (!m_item->hasValidThumb() || (pw <= itemWidth && ph <= itemHeight)) {
54 p->drawPixmap(x, y, pix, 0, 0, itemWidth, itemHeight);
56 const TQPixmap& thumbpix = m_item->thumbPixmap();
60 pw = thumbpix.width();
61 ph = thumbpix.height();
71 p->drawPixmap(x, y, thumbpix, 0, 0, itemWidth, itemHeight);
75 p->drawRect(0, 0, cw + 1, ch + 1);
79#include "kis_iconwidget.moc"
|