]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
add synchronization with "Dependency Tree" view
authormpa <mpa@opencascade.com>
Tue, 24 Jun 2014 06:07:59 +0000 (10:07 +0400)
committermpa <mpa@opencascade.com>
Tue, 24 Jun 2014 06:07:59 +0000 (10:07 +0400)
src/DependencyTree/CMakeLists.txt
src/DependencyTree/DependencyTree_ViewModel.cxx
src/DependencyTree/DependencyTree_ViewModel.h
src/DependencyTree/resources/DependencyTree_msg_en.ts
src/DependencyTree/resources/DependencyTree_msg_fr.ts
src/DependencyTree/resources/DependencyTree_msg_ja.ts
src/GEOMToolsGUI/GEOMToolsGUI_1.cxx

index b57dce943666815c9f79b8f30b6b1d1e361d880d..91580628d20a5f5fcb136779f174cacc338ca4cd 100644 (file)
@@ -31,6 +31,7 @@ INCLUDE_DIRECTORIES(
   ${PROJECT_SOURCE_DIR}/src/OBJECT
   ${PROJECT_SOURCE_DIR}/src/GEOMUtils
   ${PROJECT_SOURCE_DIR}/src/GEOMClient
+  ${PROJECT_SOURCE_DIR}/src/GEOMToolsGUI
   ${PROJECT_BINARY_DIR}/idl 
   )
 
index 74bf9f2c419dd4d270f8edb6413eed695d39e7b3..3c03d67acd88f7d2e847d3ec905f04d487eda13a 100644 (file)
@@ -31,6 +31,7 @@
 
 // GEOM includes
 #include <GEOM_Displayer.h>
+#include <GEOMToolsGUI_ReduceStudyDlg.h>
 
 // QT includes
 #include <QMenu>
@@ -112,6 +113,18 @@ void DependencyTree_ViewModel::onShowOnlySelected()
   }
 }
 
+//=================================================================================
+// function : onReduceStudy()
+// purpose  : slot for showing dialog box "Reduce Study"
+//=================================================================================
+void DependencyTree_ViewModel::onReduceStudy()
+{
+  DependencyTree_View* viewPort = dynamic_cast<DependencyTree_View*>( getActiveViewPort() );
+  QDialog* dlg = new GEOMToolsGUI_ReduceStudyDlg( viewPort );
+  if( dlg != NULL )
+    dlg->show();
+}
+
 //=================================================================================
 // function : contextMenuPopup()
 // purpose  : process calling of context menu popup
@@ -127,7 +140,9 @@ void DependencyTree_ViewModel::contextMenuPopup( QMenu* theMenu )
       theMenu->clear();
       theMenu->addAction( tr( "MEN_DISPLAY" ), this, SLOT( onShowSelected() ) );
       theMenu->addAction( tr( "MEN_DISPLAY_ONLY" ), this, SLOT( onShowOnlySelected() ) );
-      theMenu->addAction( tr( "REBUILD_THE_TREE"), viewPort, SLOT( onRebuildModel() ) );
+      theMenu->addAction( tr( "MEN_REBUILD_THE_TREE"), viewPort, SLOT( onRebuildModel() ) );
+      theMenu->addSeparator();
+      theMenu->addAction( tr( "MEN_REDUCE_STUDY" ), this, SLOT( onReduceStudy() ) );
     }
   }
 }
index 910afb236083c367e87ef0a03b4b635134a7410e..afbfc0da03049ef21cc7882213d78b94ece034f3 100644 (file)
@@ -39,6 +39,7 @@ private slots:
 
   void          onShowSelected();
   void          onShowOnlySelected();
+  void          onReduceStudy();
 
 };
 
index a4a7637814f435e5da9ebe4fd32a3ef85012d4c5..c1c04a16d8554b1e8d3b48d0343d765ac56db2b5 100644 (file)
     </message>
   <name>DependencyTree_ViewModel</name>
     <message>
-      <source>REBUILD_THE_TREE</source>
+      <source>MEN_REBUILD_THE_TREE</source>
       <translation>Rebuild the tree</translation>
     </message>
+    <message>
+      <source>MEN_REDUCE_STUDY</source>
+      <translation>Reduce study</translation>
+    </message>
 </context>
 </TS>
index ab3e0824677b4be41d628a044efa07f4e7611fc8..ffeb404bc57e121e1ce2d5369d0f0fce89d24869 100644 (file)
     </message>
   <name>DependencyTree_ViewModel</name>
     <message>
-      <source>REBUILD_THE_TREE</source>
+      <source>MEN_REBUILD_THE_TREE</source>
       <translation type="unfinished">Rebuild the tree</translation>
     </message>
+    <message>
+      <source>MEN_REDUCE_STUDY</source>
+      <translation type="unfinished">Reduce study</translation>
+    </message>
 </context>
 </TS>
index 1f3400058732350091717b097cefd4060394afa4..642f04c6a7f36116eae786442980c670ab75e4c7 100644 (file)
     </message>
   <name>DependencyTree_ViewModel</name>
     <message>
-      <source>REBUILD_THE_TREE</source>
+      <source>MEN_REBUILD_THE_TREE</source>
       <translation type="unfinished">Rebuild the tree</translation>
     </message>
+    <message>
+      <source>MEN_REDUCE_STUDY</source>
+      <translation type="unfinished">Reduce study</translation>
+    </message>
 </context>
 </TS>
\ No newline at end of file
index 68ed621335ee34952071176b47714933c55b4604..2ca503aaea33e1b344f142748bf04b3ebab8728c 100644 (file)
@@ -904,7 +904,6 @@ void GEOMToolsGUI::OnShowDependencyTree()
 void GEOMToolsGUI::OnReduceStudy()
 {
   QDialog* dlg = new GEOMToolsGUI_ReduceStudyDlg( SUIT_Session::session()->activeApplication()->desktop() );
-  if ( dlg != NULL )
+  if( dlg != NULL )
     dlg->show();
-
 }