Salome HOME
Splash screen was implemented. Changes in packages SUIT and Session are integrated.
[modules/gui.git] / src / ObjBrowser / OB_ListItem.cxx
index 0b352d63191a9c0c3d546c5195a7b93d1c1acbe0..570d3a9e1de2d1bf54d3c4263315ad2ab0c92b83 100755 (executable)
@@ -1,5 +1,7 @@
 #include "OB_ListItem.h"
 
+#include "OB_ListView.h"
+
 #include <SUIT_DataObject.h>
 
 #include <qpainter.h>
@@ -97,6 +99,8 @@ void ListItem<T>::paintCell( QPainter* p, const QColorGroup& cg, int c, int w, i
       colorGrp.setColor( QColorGroup::Background, myObject->color( SUIT_DataObject::Background ) );
     if ( myObject->color( SUIT_DataObject::Highlight ).isValid() )
       colorGrp.setColor( QColorGroup::Highlight, myObject->color( SUIT_DataObject::Highlight ) );
+    if ( myObject->color( SUIT_DataObject::HighlightedText ).isValid() )
+      colorGrp.setColor( QColorGroup::HighlightedText, myObject->color( SUIT_DataObject::HighlightedText ) );
   }
 
   
@@ -114,6 +118,19 @@ void ListItem<T>::paintFocus( QPainter* p, const QColorGroup& cg, const QRect& r
   T::paintFocus( p, cg, rect );
 }
 
+template<class T>
+void ListItem<T>::setSelected( bool s )
+{
+  QListView* lv = T::listView();
+  if ( s && lv && lv->inherits( "OB_ListView" ) )
+  {
+    OB_ListView* objlv = (OB_ListView*)lv;
+    s = s && objlv->isOk( this );
+  }
+
+  QListViewItem::setSelected( s );
+}
+
 template<class T>
 void ListItem<T>::update()
 {