colorized empty label widget and fixed label info on insert

This commit is contained in:
Luis Ángel San Martín
2014-11-21 22:08:46 +01:00
parent dcc4745812
commit 12604854ea
9 changed files with 99 additions and 32 deletions

View File

@ -36,10 +36,10 @@ EmptyLabelWidget::EmptyLabelWidget(QWidget *parent) :
void EmptyLabelWidget::setColor(YACReader::LabelColors color)
{
//TODO tint the widget depending on color
//backgroundColor = "#FF0000";
//repaint();
QPixmap p(":/images/empty_label.png");
QImage img = p.toImage().convertToFormat(QImage::Format_ARGB32);
YACReader::colorize(img,QColor(YACReader::labelColorToRGBString(color)));
iconLabel->setPixmap(QPixmap::fromImage(img));
}
void EmptyLabelWidget::paintEvent(QPaintEvent * event)