MCPcopy Create free account
hub / github.com/ON4QZ/QSSTV / createColorToolButtonIcon

Method createColorToolButtonIcon

src/editor/editorview.cpp:509–520  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

507}
508
509QIcon 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
522QMenu *editorView::createColorMenu(const char * slot,int type,QString text)
523{

Callers

nothing calls this directly

Calls 1

fillMethod · 0.80

Tested by

no test coverage detected