| 507 | } |
| 508 | |
| 509 | QIcon editorView::createColorToolButtonIcon(const QString &imageFile, QColor color) |
| 510 | { |
| 511 | QPixmap pixmap(22, 30); |
| 512 | pixmap.fill(Qt::transparent); |
| 513 | QPainter painter(&pixmap); |
| 514 | QPixmap image(imageFile); |
| 515 | QRect target(0, 0, 22, 22); |
| 516 | QRect source(0, 0, 22, 22); |
| 517 | painter.fillRect(QRect(0, 22, 22, 8), color); |
| 518 | painter.drawPixmap(target, image, source); |
| 519 | return QIcon(pixmap); |
| 520 | } |
| 521 | |
| 522 | QMenu *editorView::createColorMenu(const char * slot,int type,QString text) |
| 523 | { |