X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_DocumentDataModel.cpp;h=1ee46e331e9d07ca4d2c47980bf40cdea6af65a0;hb=d86c77d1c6210bbe04fbc3e5b00f9e212e1ec930;hp=9ccc7f643901885c2ec076a5274d3bd6f5e52deb;hpb=de506aa3b9f027206e84edfeb22cbb3e097e2288;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_DocumentDataModel.cpp b/src/XGUI/XGUI_DocumentDataModel.cpp index 9ccc7f643..1ee46e331 100644 --- a/src/XGUI/XGUI_DocumentDataModel.cpp +++ b/src/XGUI/XGUI_DocumentDataModel.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include @@ -19,13 +19,13 @@ XGUI_DocumentDataModel::XGUI_DocumentDataModel(QObject* theParent) : QAbstractItemModel(theParent) { // Find Document object - std::shared_ptr aMgr = ModelAPI_PluginManager::get(); + boost::shared_ptr aMgr = ModelAPI_PluginManager::get(); myDocument = aMgr->currentDocument(); // Register in event loop - Event_Loop::loop()->registerListener(this, Event_Loop::eventByName(EVENT_FEATURE_CREATED)); - Event_Loop::loop()->registerListener(this, Event_Loop::eventByName(EVENT_FEATURE_UPDATED)); - Event_Loop::loop()->registerListener(this, Event_Loop::eventByName(EVENT_FEATURE_DELETED)); + 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)); // Create a top part of data tree model myModel = new XGUI_TopDataModel(myDocument, this); @@ -38,13 +38,13 @@ XGUI_DocumentDataModel::~XGUI_DocumentDataModel() } -void XGUI_DocumentDataModel::processEvent(const Event_Message* theMessage) +void XGUI_DocumentDataModel::processEvent(const Events_Message* theMessage) { // Created object event ******************* if (QString(theMessage->eventID().eventText()) == EVENT_FEATURE_CREATED) { - const ModelAPI_FeatureUpdatedMessage* aUpdMsg = dynamic_cast(theMessage); - std::shared_ptr aDoc = aUpdMsg->document(); - std::shared_ptr aFeature = aUpdMsg->feature(); + const Model_FeatureUpdatedMessage* aUpdMsg = dynamic_cast(theMessage); + boost::shared_ptr aFeature = aUpdMsg->feature(); + boost::shared_ptr aDoc = aFeature->document(); if (aDoc == myDocument) { // If root objects if (aFeature->getGroup().compare(PARTS_GROUP) == 0) { // Updsate only Parts group @@ -79,8 +79,8 @@ void XGUI_DocumentDataModel::processEvent(const Event_Message* theMessage) // Deteted object event *********************** } else if (QString(theMessage->eventID().eventText()) == EVENT_FEATURE_DELETED) { - const ModelAPI_FeatureDeletedMessage* aUpdMsg = dynamic_cast(theMessage); - std::shared_ptr aDoc = aUpdMsg->document(); + const Model_FeatureDeletedMessage* aUpdMsg = dynamic_cast(theMessage); + boost::shared_ptr aDoc = aUpdMsg->document(); if (aDoc == myDocument) { // If root objects if (aUpdMsg->group().compare(PARTS_GROUP) == 0) { // Updsate only Parts group