Salome HOME
Image positioning by two points.
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_Module.cxx
index cb2cd1c7564d79ad315971940c7d5c00085f4b9e..ff3959f267518b6b619f3cc291fb039f2afd1913 100644 (file)
@@ -39,7 +39,7 @@
 #include <HYDROData_Image.h>
 #include <HYDROData_Lambert93.h>
 
-#include <HYDROOperations_Factory.h>
+#include <HYDROData_OperationsFactory.h>
 
 #include <GraphicsView_ViewFrame.h>
 #include <GraphicsView_ViewManager.h>
@@ -206,14 +206,14 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
   bool anIsMustBeUpdatedImage = false;
   bool anIsPolyline = false;
   bool anIsCalculation = false;
-  bool anIsZone = false;
+  bool anIsImmersibleZone = false;
   bool anIsVisualState = false;
 
   // check the selected data model objects
   HYDROData_SequenceOfObjects aSeq = HYDROGUI_Tool::GetSelectedObjects( this );
   for( Standard_Integer anIndex = 1, aLength = aSeq.Length(); anIndex <= aLength; anIndex++ )
   {
-    Handle(HYDROData_Object) anObject = aSeq.Value( anIndex );
+    Handle(HYDROData_Entity) anObject = aSeq.Value( anIndex );
     if( !anObject.IsNull() )
     {
       anIsSelectedDataObjects = true;
@@ -228,9 +228,9 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
         Handle(HYDROData_Image) anImage = Handle(HYDROData_Image)::DownCast( anObject );
         if( !anImage.IsNull() )
         {
-          anIsImportedImage = anImage->HasTrsfPoints() && !anImage->IsSelfSplitted();
+          anIsImportedImage = anImage->HasLocalPoints() && !anImage->IsSelfSplitted();
           anIsCompositeImage = anImage->NbReferences() > 0;
-          if( HYDROOperations_Factory* aFactory = HYDROOperations_Factory::Factory() )
+          if( HYDROData_OperationsFactory* aFactory = HYDROData_OperationsFactory::Factory() )
           {
             if( ImageComposer_Operator* anOperator = aFactory->Operator( anImage ) )
             {
@@ -250,8 +250,8 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
         anIsPolyline = true;
       else if( anObject->GetKind() == KIND_CALCULATION )
         anIsCalculation = true;
-      else if( anObject->GetKind() == KIND_ZONE )
-        anIsZone = true;
+      else if( anObject->GetKind() == KIND_IMMERSIBLE_ZONE )
+        anIsImmersibleZone = true;
       else if( anObject->GetKind() == KIND_VISUAL_STATE )
         anIsVisualState = true;
     }
@@ -280,8 +280,8 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
         case KIND_CALCULATION:
           theMenu->addAction( action( CreateCalculationId ) );
           break;
-        case KIND_ZONE:
-          theMenu->addAction( action( CreateZoneId ) );
+        case KIND_IMMERSIBLE_ZONE:
+          theMenu->addAction( action( CreateImmersibleZoneId ) );
           break;
       }
       theMenu->addSeparator();
@@ -329,9 +329,9 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
       theMenu->addAction( action( EditCalculationId ) );
       theMenu->addSeparator();
     }
-    else if( anIsZone )
+    else if( anIsImmersibleZone )
     {
-      theMenu->addAction( action( EditZoneId ) );
+      theMenu->addAction( action( EditImmersibleZoneId ) );
       theMenu->addSeparator();
     }
     else if( anIsVisualState && anIsObjectBrowser )
@@ -348,7 +348,7 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
     theMenu->addSeparator();
   }
 
-  if( anIsSelectedDataObjects && ( anIsImage || anIsPolyline || anIsZone ) )
+  if( anIsSelectedDataObjects && ( anIsImage || anIsPolyline || anIsImmersibleZone ) )
   {
     if( anIsHiddenInSelection )
       theMenu->addAction( action( ShowId ) );
@@ -396,7 +396,7 @@ void HYDROGUI_Module::update( const int flags )
     // the selection in the object browser.
     // Note: processEvents() should be called after updateGV(),
     // otherwise the application crashes from time to time.
-    qApp->processEvents(); 
+    //RKV: qApp->processEvents(); 
     getApp()->updateObjectBrowser( true );
   }
 
@@ -508,7 +508,7 @@ void HYDROGUI_Module::setViewManagerRole( SUIT_ViewManager* theViewManager,
 }
 
 bool HYDROGUI_Module::isObjectVisible( const int theViewId,
-                                       const Handle(HYDROData_Object)& theObject ) const
+                                       const Handle(HYDROData_Entity)& theObject ) const
 {
   if( theObject.IsNull() )
     return false;
@@ -528,7 +528,7 @@ bool HYDROGUI_Module::isObjectVisible( const int theViewId,
 }
 
 void HYDROGUI_Module::setObjectVisible( const int theViewId,
-                                        const Handle(HYDROData_Object)& theObject,
+                                        const Handle(HYDROData_Entity)& theObject,
                                         const bool theState )
 {
   if( !theObject.IsNull() )
@@ -540,7 +540,7 @@ void HYDROGUI_Module::setObjectVisible( const int theViewId,
 }
 
 HYDROGUI_Shape* HYDROGUI_Module::getObjectShape( const int                       theViewId,
-                                                 const Handle(HYDROData_Object)& theObject ) const
+                                                 const Handle(HYDROData_Entity)& theObject ) const
 {
   HYDROGUI_Shape* aResShape = NULL;
   if( theObject.IsNull() )
@@ -563,7 +563,7 @@ HYDROGUI_Shape* HYDROGUI_Module::getObjectShape( const int
 }
 
 void HYDROGUI_Module::setObjectShape( const int                       theViewId,
-                                      const Handle(HYDROData_Object)& theObject,
+                                      const Handle(HYDROData_Entity)& theObject,
                                       HYDROGUI_Shape*                 theShape )
 {
   if( theObject.IsNull() )
@@ -574,7 +574,7 @@ void HYDROGUI_Module::setObjectShape( const int                       theViewId,
 }
 
 void HYDROGUI_Module::removeObjectShape( const int                       theViewId,
-                                         const Handle(HYDROData_Object)& theObject )
+                                         const Handle(HYDROData_Entity)& theObject )
 {
   if ( !myShapesMap.contains( theViewId ) )
     return;