]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix for Bug12371
authorapo <apo@opencascade.com>
Wed, 10 May 2006 11:16:58 +0000 (11:16 +0000)
committerapo <apo@opencascade.com>
Wed, 10 May 2006 11:16:58 +0000 (11:16 +0000)
   No "Erase all" in the Gauss Viewer (MKO)

src/VISUGUI/VisuGUI_Module.cxx

index 228c24d9f278150e6fb2788396286ea4af050800..5899b7e4a805ec21c06015daba84d7235ade21cb 100644 (file)
 #include "VVTK_MainWindow.h"
 #include "VISU_View_i.hh"
 
+#ifndef DISABLE_VTKVIEWER
+#ifndef DISABLE_SALOMEOBJECT
+  #include <SVTK_ViewWindow.h>
+  #include <SVTK_ViewModel.h>
+#else
+  #include <VTKViewer_ViewWindow.h>
+#endif
+  #include <VTKViewer_ViewModel.h>
+#endif
+#ifndef DISABLE_OCCVIEWER
+  #include <OCCViewer_ViewWindow.h>
+  #include <OCCViewer_ViewPort3d.h>
+#ifndef DISABLE_SALOMEOBJECT
+  #include <SOCC_ViewModel.h>
+#else
+  #include <OCCViewer_ViewModel.h>
+#endif
+#endif
+#ifndef DISABLE_GLVIEWER
+  #include <GLViewer_ViewFrame.h>
+  #include <GLViewer_ViewPort.h>
+#endif
+#ifndef DISABLE_PLOT2DVIEWER
+  #include <Plot2d_ViewWindow.h>
+  #include <Plot2d_ViewFrame.h>
+#ifndef DISABLE_SALOMEOBJECT
+  #include <SPlot2d_ViewModel.h>
+#else
+  #include <Plot2d_ViewModel.h>
+#endif
+#endif
+
 #include <qaction.h>
 
 #include <vtkRenderer.h>
@@ -259,6 +291,42 @@ initialize( CAM_Application* theApp )
                true );
   action( GAUSS_COPY_PRS )->setEnabled(false);
 
+  QStringList viewers;
+  
+#ifndef DISABLE_OCCVIEWER
+#ifndef DISABLE_SALOMEOBJECT
+  viewers.append( SOCC_Viewer::Type() );
+#else
+  viewers.append( OCCViewer_Viewer::Type() );
+#endif
+#endif
+#ifndef DISABLE_VTKVIEWER
+#ifndef DISABLE_SALOMEOBJECT
+  viewers.append( SVTK_Viewer::Type() );
+  viewers.append( VVTK_Viewer::Type() );
+#else
+  viewers.append( VTKViewer_Viewer::Type() );
+#endif
+#endif
+#ifndef DISABLE_PLOT2DVIEWER
+#ifndef DISABLE_SALOMEOBJECT
+  viewers.append( SPlot2d_Viewer::Type() );
+#else
+  viewers.append( Plot2d_Viewer::Type() );
+#endif
+#endif
+
+  if( !viewers.isEmpty() )
+    {
+      QString strViewers = "{ ", temp = "'%1' ";
+      QStringList::const_iterator anIt = viewers.begin(), aLast = viewers.end();
+      for( ; anIt!=aLast; anIt++ )
+        strViewers+=temp.arg( *anIt );
+      strViewers+="}";
+      mgr->setRule( action(myEraseAll), QString( "client in %1" ).arg( strViewers ), true );
+      cout<<"strViewers - "<<strViewers<<endl;
+    }
+
   aRule = "(selcount>0 and type='VISU::TGAUSSPOINTS')";
 
   createAction( GAUSS_ERASE_PRS, VisuGUI::tr("MEN_ERASE"), QIconSet(),