}
}
+void HYDROGUI_OrderedListWidget::setBackgroundColor (QString theName, QColor theColor)
+{
+ HYDROGUI_ListModel* aModel = getSourceModel();
+ if (aModel)
+ {
+ QList<Handle(HYDROData_Entity)> anObjects = aModel->getObjects();
+ int ind = -1;
+ int cur_ind = 0;
+ foreach (Handle(HYDROData_Entity) ent, anObjects)
+ {
+ if (ent->GetName() == theName)
+ {
+ ind = cur_ind;
+ break;
+ }
+ cur_ind++;
+ }
+ if (ind != -1)
+ aModel->setBackgroundColor( ind, theColor );
+ }
+}
+
void HYDROGUI_OrderedListWidget::clearAllBackgroundColors ()
{
HYDROGUI_ListModel* aModel = getSourceModel();