Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/gui.git] / src / LightApp / LightApp_DataSubOwner.cxx
index aaf1d3613ab45707fb33cf6ce8e211b0bf98e565..c64c739ebf48dfa1c2f85484627db7f2047113cd 100644 (file)
 
 #include "LightApp_DataObject.h"
 
-#ifdef WNT
-#include <typeinfo.h>
-#endif
-
 /*!Constructor.Initialize by \a entry and \a index*/
 LightApp_DataSubOwner::LightApp_DataSubOwner( const QString& entry, const int index )
 : LightApp_DataOwner( entry ),
@@ -36,14 +32,12 @@ LightApp_DataSubOwner::~LightApp_DataSubOwner()
 {
 }
 
-/*!Checks: Is current data sub owner equal \a obj.*/
-bool LightApp_DataSubOwner::isEqual( const SUIT_DataOwner& obj ) const
-{  
-  if (LightApp_DataOwner::isEqual(obj)) {
-    const LightApp_DataSubOwner* other = dynamic_cast<const LightApp_DataSubOwner*>( &obj );
-    return other && index() == other->index();
-  }
-  return false;
+/*!Gets key string, used for data owners comparison.*/
+QString LightApp_DataSubOwner::keyString() const
+{
+  QString aKey = LightApp_DataOwner::keyString();
+  aKey += QString("_%1").arg(index());
+  return aKey;
 }
 
 /*!Gets index.*/