Salome HOME
PAL10491. Add messages used by GetMessageOnAlgoStateErrors()
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_Utils.cxx
index 3b4976ea61c16e7e7de373eed84a403734b14a11..94714bcd7aabd3cae95a7ded77c6adf0f6d266db 100644 (file)
@@ -28,7 +28,7 @@
 #include "SUIT_Application.h"
 #include "SUIT_Session.h"
 
-#include "SalomeApp_SelectionMgr.h"
+#include "LightApp_SelectionMgr.h"
 #include "SalomeApp_Application.h"
 #include "SalomeApp_Module.h"
 #include "SalomeApp_Study.h"
@@ -50,12 +50,17 @@ namespace SMESH{
     return theModule->application()->desktop();
   }
 
-  SalomeApp_SelectionMgr*
+  LightApp_SelectionMgr*
   GetSelectionMgr(const SalomeApp_Module* theModule)
   {
     return theModule->getApp()->selectionMgr();
   }
 
+  SUIT_ResourceMgr*
+  GetResourceMgr( const SalomeApp_Module* )
+  {
+    return SUIT_Session::session()->resourceMgr();
+  }
 
   _PTR(Study)
   GetCStudy(const SalomeApp_Study* theStudy)
@@ -64,7 +69,7 @@ namespace SMESH{
   }
 
   CORBA::Object_var 
-  DataOwnerToObject(const SalomeApp_DataOwnerPtr& theOwner)
+  DataOwnerToObject(const LightApp_DataOwnerPtr& theOwner)
   {
     CORBA::Object_var anObj;
     if(theOwner){
@@ -94,8 +99,8 @@ namespace SMESH{
   {
     SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>
       (SUIT_Session::session()->activeApplication());
-    if (app && app->activeViewManager())
-      return app->activeViewManager()->getActiveView();
+    if (app && app->desktop() )
+      return app->desktop()->activeWindow();
     else
       return NULL;
   }
@@ -190,7 +195,7 @@ namespace SMESH{
     return app->orb()->string_to_object(theIOR);
   }
 
-  int GetNameOfSelectedIObjects(SalomeApp_SelectionMgr* theMgr, QString& theName)
+  int GetNameOfSelectedIObjects(LightApp_SelectionMgr* theMgr, QString& theName)
   {
     if (!theMgr)
       return 0;