Salome HOME
Merge branch 'BR_v14_rc' of ssh://git.salome-platform.org/modules/hydro into BR_v14_rc
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_Module.cxx
index 2fadc91100629997bd96d46f12c3e9e606e4539f..60ed49748807addbd54781018c0757ef7bb86522 100644 (file)
@@ -337,6 +337,7 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
   bool anIsZone = false;
   bool anIsObstacle = false;
   bool anIsStricklerTable = false;
+  bool anIsLandCover = false;
   bool anIsStream = false;
   bool anIsChannel = false;
   bool anIsDigue = false;
@@ -457,6 +458,8 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
         anIsObstacle = true;
       else if( anObjectKind == KIND_STRICKLER_TABLE )
         anIsStricklerTable = true;
+      else if( anObjectKind == KIND_LAND_COVER )
+        anIsLandCover = true;
       else if( anObjectKind == KIND_STREAM )
       {
         anIsStream = true;
@@ -513,6 +516,9 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
         case KIND_STRICKLER_TABLE:
           theMenu->addAction( action( ImportStricklerTableFromFileId ) );          
           break;
+        case KIND_LAND_COVER:
+          theMenu->addAction( action( CreateLandCoverId ) );          
+          break;
         case KIND_CALCULATION:
           theMenu->addAction( action( CreateCalculationId ) );
           break;
@@ -579,6 +585,8 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
         theMenu->addAction( action( CutImagesId ) );
         theMenu->addAction( action( SplitImageId ) );
         theMenu->addSeparator();
+        theMenu->addAction( action( RecognizeContoursId ) );
+        theMenu->addSeparator();
       }
       else if( anIsBathymetry )
       {
@@ -642,9 +650,15 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
       else if( anIsStricklerTable )
       {
         theMenu->addAction( action( EditStricklerTableId ) );
-               theMenu->addAction( action( ExportStricklerTableFromFileId ) );
+        theMenu->addAction( action( ExportStricklerTableFromFileId ) );
+        theMenu->addAction( action( DuplicateStricklerTableId ) );
         theMenu->addSeparator();
       }
+      else if( anIsLandCover )
+      {
+        theMenu->addAction( action( EditLandCoverId ) );
+        theMenu->addSeparator();
+      }      
       else if( anIsVisualState && anIsObjectBrowser )
       {
         theMenu->addAction( action( SaveVisualStateId ) );
@@ -663,6 +677,9 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
       theMenu->addSeparator();
     }
 
+    if (anIsPolyline || anIsPolyline3D)
+      theMenu->addAction( action( ExportPolylineId ) );
+
     // Add copy action
     QAction* aCopyAction = action( CopyId );
     if( aCopyAction && aCopyAction->isEnabled() ) {
@@ -680,7 +697,7 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
         anIsImmersibleZone || anIsZone || anIsRegion ||
         anIsBathymetry || anIsObstacle || anIsStream ||
         anIsChannel || anIsDigue || anIsDummyObject3D ||
-        anIsValidProfile || anIsGroup )
+        anIsValidProfile || anIsGroup || anIsLandCover )
     {
       if( anIsHiddenInSelection )
         theMenu->addAction( action( ShowId ) );
@@ -761,6 +778,14 @@ void HYDROGUI_Module::createPreferences()
   int viewerGroup = addPreference( tr( "PREF_GROUP_VIEWER" ), genTab );
   addPreference( tr( "PREF_VIEWER_AUTO_FITALL" ), viewerGroup,
                  LightApp_Preferences::Bool, "HYDRO", "auto_fit_all" );
+
+  int StricklerTableGroup = addPreference( tr( "PREF_GROUP_STRICKLER_TABLE" ), genTab );
+  int defaultStricklerCoef = addPreference( tr( "PREF_DEFAULT_STRICKLER_COEFFICIENT" ), StricklerTableGroup,
+                                            LightApp_Preferences::DblSpin, "preferences", "default_strickler_coefficient" );
+  setPreferenceProperty( defaultStricklerCoef, "precision", 2 );
+  setPreferenceProperty( defaultStricklerCoef, "min", 0.00 );
+  setPreferenceProperty( defaultStricklerCoef, "max", 1000000.00 );
+  setPreferenceProperty( defaultStricklerCoef, "step", 0.01 );
 }
 
 QCursor HYDROGUI_Module::getPrefEditCursor() const