]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
clearKnownViewManagers added
authorvsv <vsv@opencascade.com>
Fri, 27 Nov 2009 09:21:47 +0000 (09:21 +0000)
committervsv <vsv@opencascade.com>
Fri, 27 Nov 2009 09:21:47 +0000 (09:21 +0000)
src/LightApp/LightApp_Application.cxx
src/LightApp/LightApp_Application.h

index 9af3c4b082c0eb3b1b023d0ad7c6b5e1a236ba60..c0c990868c8e2d0dd27365b21cc9a8a30df8903f 100644 (file)
@@ -3091,3 +3091,34 @@ bool LightApp_Application::openAction( const int choice, const QString& aName )
 
   return res;
 }
+
+void LightApp_Application::clearKnownViewManagers()
+{
+  QStringList aTypesList;
+#ifndef DISABLE_GLVIEWER
+  aTypesList<<GLViewer_Viewer::Type();
+#endif
+#ifndef DISABLE_PLOT2DVIEWER
+  aTypesList<<Plot2d_Viewer::Type();
+#endif
+#ifndef DISABLE_QXGRAPHVIEWER
+  aTypesList<<QxScene_Viewer::Type();
+#endif
+#ifndef DISABLE_OCCVIEWER
+  aTypesList<<OCCViewer_Viewer::Type();
+#endif
+#ifndef DISABLE_VTKVIEWER
+ #ifndef DISABLE_SALOMEOBJECT
+  aTypesList<<SVTK_Viewer::Type();
+ #else
+  aTypesList<<VTKViewer_Viewer::Type();
+ #endif
+#endif
+
+  QList<SUIT_ViewManager*> aMgrList;
+  viewManagers( aMgrList );
+  foreach (SUIT_ViewManager* aMgr, aMgrList) {
+    if (aTypesList.contains(aMgr->getType()))
+      removeViewManager(aMgr);
+  }
+}
index 953947f13468d787c5c999bb25da2c0319c482fa..2095dd0977364657f47168927a3185cc3e81a2e3 100644 (file)
@@ -147,6 +147,9 @@ public:
 
   virtual void                        updateDesktopTitle();
 
+  // Removes ViewManagers only of known type
+  virtual void clearKnownViewManagers();
+
 signals:
   void                                studyOpened();
   void                                studySaved();