Salome HOME
Initial version of redesign of working with results
[modules/shaper.git] / src / XGUI / XGUI_DocumentDataModel.cpp
index b4cc62c0c9f4d5f8bc6a6fba6cd41dffd6301903..7857bd7a41724ba2985fd82db59a256268687030 100644 (file)
@@ -26,9 +26,9 @@ XGUI_DocumentDataModel::XGUI_DocumentDataModel(QObject* theParent)
   : QAbstractItemModel(theParent), myActivePart(0)
 {
   // Register in event loop
-  Events_Loop::loop()->registerListener(this, Events_Loop::eventByName(EVENT_FEATURE_CREATED));
-  Events_Loop::loop()->registerListener(this, Events_Loop::eventByName(EVENT_FEATURE_UPDATED));
-  Events_Loop::loop()->registerListener(this, Events_Loop::eventByName(EVENT_FEATURE_DELETED));
+  Events_Loop::loop()->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_CREATED));
+  Events_Loop::loop()->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
+  Events_Loop::loop()->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_DELETED));
 
   // Create a top part of data tree model
   myModel = new XGUI_TopDataModel(this);
@@ -47,7 +47,7 @@ void XGUI_DocumentDataModel::processEvent(const Events_Message* theMessage)
   DocumentPtr aRootDoc = ModelAPI_PluginManager::get()->rootDocument();
 
   // Created object event *******************
-  if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_FEATURE_CREATED)) {
+  if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_CREATED)) {
     const Model_FeatureUpdatedMessage* aUpdMsg = dynamic_cast<const Model_FeatureUpdatedMessage*>(theMessage);
     std::set<FeaturePtr> aFeatures = aUpdMsg->features();
 
@@ -87,7 +87,7 @@ void XGUI_DocumentDataModel::processEvent(const Events_Message* theMessage)
       }
     }
   // Deleted object event ***********************
-  } else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_FEATURE_DELETED)) {
+  } else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_DELETED)) {
     const Model_FeatureDeletedMessage* aUpdMsg = dynamic_cast<const Model_FeatureDeletedMessage*>(theMessage);
     DocumentPtr aDoc = aUpdMsg->document();
     std::set<std::string> aGroups = aUpdMsg->groups();
@@ -129,7 +129,7 @@ void XGUI_DocumentDataModel::processEvent(const Events_Message* theMessage)
       }
     }
   // Deleted object event ***********************
-  } else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_FEATURE_UPDATED)) {
+  } else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_UPDATED)) {
     //const Model_FeatureUpdatedMessage* aUpdMsg = dynamic_cast<const Model_FeatureUpdatedMessage*>(theMessage);
     //FeaturePtr aFeature = aUpdMsg->feature();
     //DocumentPtr aDoc = aFeature->document();