Commit 7460bccd authored by Giacomo Strangolino's avatar Giacomo Strangolino
Browse files

color for errors

parent 72d9d989
......@@ -92,17 +92,19 @@ void AlarmTreeWidgetItem::update(const QStringList &fields)
if(text(i) != field)
setText(i, field);
if(colorField.contains("ALARM")) {
if(levelField == "medium")
setBackground(i, QColor(Qt::red));
else if(levelField == "high") {
setBackground(i, QBrush(EColor(Elettra::violet)));
}
else if(levelField == "low") {
setBackground(i, QBrush(EColor(Elettra::orange)));
}
else if(levelField == "lowest") {
setBackground(i, QBrush(EColor(Elettra::yellow)));
}
if(levelField == "highest")
setBackground(i, QColor("DarkRed").lighter());
else if(levelField == "high")
setBackground(i, QColor("Red").lighter());
else if(levelField == "medium")
setBackground(i, QColor("OrangeRed").lighter());
else if(levelField == "low")
setBackground(i, QColor("Orange").lighter());
else if(levelField == "lowest")
setBackground(i, QColor("yellow").lighter());
}
else if(colorField.contains("ERROR")) {
setBackground(i, QColor("Red").lighter(140));
}
else
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment