- if status_data == tag_status['in']: # already in the slice
- painter.fillPath(path, QColor.fromRgb(0, 250, 250))
- painter.setPen(QColor.fromRgb(0, 0, 0))
- painter.drawText(rect, 0, QString(data))
-
- elif status_data == tag_status['add']: # newly added to the slice
- painter.fillPath(path, QColor.fromRgb(0, 250, 0))
- painter.setPen(QColor.fromRgb(0, 0, 0))
- painter.drawText(rect, 0, QString(data))
-
- elif status_data == tag_status['remove']: # removed from the slice
- painter.fillPath(path, QColor.fromRgb(250, 0, 0))
- painter.setPen(QColor.fromRgb(0, 0, 0))
- painter.drawText(rect, 0, QString(data))
+ for x in tag_status.keys():
+ if (tag_status[x] == status_data) and (x in color_status):
+ painter.fillPath(path, color_status[x])