]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
All modules must use SVTK package instead VTK
authorasl <asl@opencascade.com>
Wed, 5 Oct 2005 06:28:23 +0000 (06:28 +0000)
committerasl <asl@opencascade.com>
Wed, 5 Oct 2005 06:28:23 +0000 (06:28 +0000)
src/DisplayGUI/DisplayGUI.cxx
src/EntityGUI/EntityGUI.cxx
src/GEOMBase/GEOMBase.cxx
src/GEOMBase/GEOMBase_Helper.cxx
src/GEOMGUI/GEOMGUI_Selection.cxx
src/GEOMGUI/GeometryGUI.cxx
src/GEOMGUI/GeometryGUI_Swig.cxx
src/GEOMToolsGUI/GEOMToolsGUI_1.cxx
src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx
src/OperationGUI/OperationGUI_ClippingDlg.cxx

index c8775f09637b6132d69d722e0909425135732a47..4f7f9485fa2ddd9dd98459625fb5831ad7323224 100644 (file)
@@ -35,8 +35,6 @@
 #include <SUIT_ViewWindow.h>
 #include <SUIT_OverrideCursor.h>
 
-#include <VTKViewer_ViewWindow.h>
-#include <VTKViewer_RenderWindowInteractor.h>
 #include <OCCViewer_ViewManager.h>
 #include <OCCViewer_ViewModel.h>
 #include <OCCViewer_ViewWindow.h>
@@ -201,7 +199,7 @@ void DisplayGUI::EraseAll()
       SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
       SUIT_ViewManager* vman = vw->getViewManager();
       if ( vman->getType() == OCCViewer_Viewer::Type() || 
-          vman->getType() == VTKViewer_Viewer::Type() ) {
+          vman->getType() == SVTK_Viewer::Type() ) {
        GEOM_Displayer( appStudy ).EraseAll();
       }
     }
@@ -340,9 +338,11 @@ void DisplayGUI::SetDisplayMode( const int mode, SUIT_ViewWindow* viewWindow )
 
   if ( !viewWindow ) 
     viewWindow = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
-  if ( viewWindow->getViewManager()->getType() == VTKViewer_Viewer::Type() ) {
-    VTKViewer_RenderWindowInteractor* myRenderInter= ((VTKViewer_ViewWindow*)viewWindow)->getRWInteractor();
-    myRenderInter->SetDisplayMode( mode );
+  if ( viewWindow->getViewManager()->getType() == SVTK_Viewer::Type() ) {
+    SVTK_ViewWindow* wnd = dynamic_cast<SVTK_ViewWindow*>( viewWindow );
+    SVTK_RenderWindowInteractor* myRenderInter = wnd ? wnd->getRWInteractor() : 0;
+    if( myRenderInter )
+      myRenderInter->SetDisplayMode( mode );
   } 
   else if ( viewWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() ) {
     OCCViewer_Viewer* v3d = ((OCCViewer_ViewManager*)(viewWindow->getViewManager()))->getOCCViewer();
@@ -376,9 +376,11 @@ int DisplayGUI::GetDisplayMode( SUIT_ViewWindow* viewWindow )
   int dispMode = 0;
   if ( !viewWindow ) 
     viewWindow = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
-  if ( viewWindow->getViewManager()->getType() == VTKViewer_Viewer::Type() ) {
-    VTKViewer_RenderWindowInteractor* myRenderInter= ((VTKViewer_ViewWindow*)viewWindow)->getRWInteractor();
-    dispMode = myRenderInter->GetDisplayMode();
+  if ( viewWindow->getViewManager()->getType() == SVTK_Viewer::Type() ) {
+    SVTK_ViewWindow* wnd = dynamic_cast<SVTK_ViewWindow*>( viewWindow );
+    SVTK_RenderWindowInteractor* myRenderInter = wnd ? wnd->getRWInteractor() : 0;
+    if( myRenderInter )
+      dispMode = myRenderInter->GetDisplayMode();
   } 
   else if ( viewWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() ) {
     OCCViewer_Viewer* v3d = ((OCCViewer_ViewManager*)(viewWindow->getViewManager()))->getOCCViewer();
@@ -419,16 +421,19 @@ void DisplayGUI::ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindow
 
   SALOME_ListIO aList;
   
-  if ( viewWindow->getViewManager()->getType() == VTKViewer_Viewer::Type() ) {
+  if ( viewWindow->getViewManager()->getType() == SVTK_Viewer::Type() ) {
     SVTK_ViewWindow* vw = dynamic_cast<SVTK_ViewWindow*>( viewWindow );
-    SVTK_RenderWindowInteractor* rwi = vw->getRWInteractor();
+    SVTK_RenderWindowInteractor* rwi = vw ? vw->getRWInteractor() : 0;
+
+    if( !rwi )
+      return;
 
     aSelMgr->selectedObjects( aList );
     SALOME_ListIteratorOfListIO It( aList );
 
     for( ;It.More(); It.Next() ) {
-      SVTK_Viewer* stvkViewer = (SVTK_Viewer*)(vw->getViewManager()->getViewModel());
-      SVTK_Prs* vtkPrs = dynamic_cast<SVTK_Prs*>( stvkViewer->CreatePrs( It.Value()->getEntry() ) );
+      SVTK_Viewer* stvkViewer = dynamic_cast<SVTK_Viewer*>(vw->getViewManager()->getViewModel());
+      SVTK_Prs* vtkPrs = stvkViewer ? dynamic_cast<SVTK_Prs*>( stvkViewer->CreatePrs( It.Value()->getEntry() ) ) : 0;
       if ( vtkPrs && !vtkPrs->IsNull() ) {
        if ( mode == 0 )
          rwi->ChangeRepresentationToWireframe( vtkPrs->GetObjects() );
index c1af4be77cf01baa0086bdf0f0881bc191855e55..82fa8a0946e79599f87dc64b635ca08a3f07b9ee 100644 (file)
@@ -35,7 +35,7 @@
 #include "SUIT_ViewWindow.h"
 #include "OCCViewer_ViewModel.h"
 #include "OCCViewer_ViewManager.h"
-#include "VTKViewer_ViewModel.h"
+//#include "SVTK_ViewModel.h"
 #include "SalomeApp_Study.h"
 #include "SalomeApp_Tools.h"
 //#include "SALOMEGUI_ImportOperation.h"
@@ -399,10 +399,11 @@ bool EntityGUI::OnSubShapeGetAll(const TopoDS_Shape& ShapeTopo, const char* Shap
       
     }
     else if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_VTK) {
-      VTKViewer_RenderWindowInteractor* myRenderInter= ((VTKViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRWInteractor();
+      SVTK_ViewFrame* vf = dynamic_cast<SVTK_ViewFrame*>( QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame() );
+      SVTK_RenderWindowInteractor* myRenderInter= vf ? vf->getRWInteractor() : 0;
       
       int themode = myRenderInter->GetDisplayMode();
-      vtkRenderer *theRenderer = ((VTKViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRenderer();
+      vtkRenderer *theRenderer = vf->getRenderer();
       vtkRenderWindow *renWin = theRenderer->GetRenderWindow();
       
       Handle(GEOM_InteractiveObject) IO = new GEOM_InteractiveObject(aResult->Name(), myGeomGUI->GetFatherior(), "GEOM");
index 194a81c96d63f86225d10d76414fb41d88f6d355..04943203122a2aa7d6e00e8f7a93cacc1f25c532 100644 (file)
@@ -40,9 +40,9 @@
 
 #include "GEOM_AssemblyBuilder.h"
 #include "GEOM_Actor.h"
-#include "VTKViewer_RenderWindowInteractor.h"
-#include "VTKViewer_ViewModel.h"
-#include "VTKViewer_ViewWindow.h"
+#include "SVTK_RenderWindowInteractor.h"
+#include "SVTK_ViewModel.h"
+#include "SVTK_ViewWindow.h"
 #include "OCCViewer_ViewPort3d.h"
 #include "OCCViewer_ViewModel.h"
 #include "OCCViewer_ViewWindow.h"
@@ -402,8 +402,10 @@ GEOM_Actor* GEOMBase::ConvertIORinGEOMActor(const char* IOR, Standard_Boolean& t
   QPtrList<SUIT_ViewWindow> aViewWindowsList = SUIT_Session::session()->activeApplication()->desktop()->windows();
 
   for ( QPtrListIterator<SUIT_ViewWindow> it( aViewWindowsList ); it.current(); ++it ) {
-    if (it.current()->getViewManager()->getType() == VTKViewer_Viewer::Type()) {
-      VTKViewer_ViewWindow* aVTKViewWindow = (VTKViewer_ViewWindow*)it.current();
+    if (it.current()->getViewManager()->getType() == SVTK_Viewer::Type()) {
+      SVTK_ViewWindow* aVTKViewWindow = dynamic_cast<SVTK_ViewWindow*>( it.current() );
+      if( !aVTKViewWindow )
+       continue;
       vtkRenderer* Renderer = aVTKViewWindow->getRenderer();
       vtkActorCollection* theActors = Renderer->GetActors();
       theActors->InitTraversal();
index 7c2707cab2e42924564d415708edd2224c9888b0..c2e7114d335a8a75a1b20b150a445a8c83d6343c 100755 (executable)
@@ -49,7 +49,7 @@
 #include <SalomeApp_Module.h>
 
 #include <OCCViewer_ViewModel.h>
-#include <VTKViewer_ViewModel.h>
+#include <SVTK_ViewModel.h>
 
 #include <OB_Browser.h>
 
@@ -337,7 +337,7 @@ void GEOMBase_Helper::displayPreview( const SALOME_Prs* prs,
   // Display prs
   SUIT_ViewManager* aViewManager = myViewWindow->getViewManager();
   if ( aViewManager->getType() == OCCViewer_Viewer::Type() ||
-       aViewManager->getType() == VTKViewer_Viewer::Type() )
+       aViewManager->getType() == SVTK_Viewer::Type() )
     {
       SUIT_ViewModel* aViewModel = aViewManager->getViewModel();
       SALOME_View* aView = dynamic_cast<SALOME_View*>(aViewModel);
@@ -367,7 +367,7 @@ void GEOMBase_Helper::erasePreview( const bool update )
       {
         SUIT_ViewManager* aViewManager = myViewWindow->getViewManager();
         if ( aViewManager->getType() == OCCViewer_Viewer::Type() ||
-             aViewManager->getType() == VTKViewer_Viewer::Type() )
+             aViewManager->getType() == SVTK_Viewer::Type() )
           {
             SUIT_ViewModel* aViewModel = aViewManager->getViewModel();
             SALOME_View* aView = dynamic_cast<SALOME_View*>(aViewModel);
index 234f1c6a4bc334f38521ba4c1aaa347eef922460..bc44c2b0bb4677d829f11e7dc6b9c0575df107b3 100644 (file)
@@ -24,7 +24,7 @@
 #include <SALOME_Actor.h>
 
 #include <OCCViewer_ViewModel.h>
-#include <VTKViewer_ViewModel.h>
+#include <SVTK_ViewModel.h>
 
 #include "GEOMImpl_Types.hxx"
 
@@ -94,7 +94,7 @@ QString GEOMGUI_Selection::displayMode( const int index ) const
 {
   SALOME_View* view = GEOM_Displayer::GetActiveView();
   QString viewType = activeViewType();
-  if ( view /*fix for 9320==>*/&& ( viewType == OCCViewer_Viewer::Type() || viewType == VTKViewer_Viewer::Type() ) ) {
+  if ( view /*fix for 9320==>*/&& ( viewType == OCCViewer_Viewer::Type() || viewType == SVTK_Viewer::Type() ) ) {
     SALOME_Prs* prs = view->CreatePrs( entry( index ) );
     if ( prs ) {
       if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC
@@ -122,9 +122,9 @@ QString GEOMGUI_Selection::displayMode( const int index ) const
          }
        }
       }
-      else if ( viewType == VTKViewer_Viewer::Type() ) { // assuming VTK
-       SVTK_Prs* vtkPrs = (SVTK_Prs*) prs;
-       vtkActorCollection* lst = vtkPrs->GetObjects();
+      else if ( viewType == SVTK_Viewer::Type() ) { // assuming VTK
+       SVTK_Prs* vtkPrs = dynamic_cast<SVTK_Prs*>( prs );
+       vtkActorCollection* lst = vtkPrs ? vtkPrs->GetObjects() : 0;
        if ( lst ) {
          lst->InitTraversal();
          vtkActor* actor = lst->GetNextActor();
index 221972bde08009bbbe25ac70df7610eb72cd0a0b..759e40e15b11186fc2d4bab4c36c669a36d4dd43 100644 (file)
 #include <OCCViewer_ViewModel.h>
 #include <OCCViewer_ViewManager.h>
 
-#include <VTKViewer_ViewWindow.h>
+#include <SVTK_ViewWindow.h>
 #include <SVTK_RenderWindowInteractor.h>
 #include <SVTK_InteractorStyle.h>
 #include <SVTK_ViewModel.h>
-#include <VTKViewer_ViewManager.h>
+#include <SVTK_ViewManager.h>
 
 #include <SalomeApp_Application.h>
 #include <SalomeApp_SelectionMgr.h>
@@ -250,7 +250,7 @@ void GeometryGUI::ActiveWorkingPlane()
 
   SUIT_ViewWindow* window = application()->desktop()->activeWindow();
   bool ViewOCC = ( window && window->getViewManager()->getType() == OCCViewer_Viewer::Type() );
-  bool ViewVTK = ( window && window->getViewManager()->getType() == VTKViewer_Viewer::Type() );
+  bool ViewVTK = ( window && window->getViewManager()->getType() == SVTK_Viewer::Type() );
 
   if( ViewOCC ) {
     OCCViewer_ViewWindow* vw = dynamic_cast<OCCViewer_ViewWindow*>( window );
@@ -264,7 +264,7 @@ void GeometryGUI::ActiveWorkingPlane()
     }
   }
   else if( ViewVTK ) {
-    VTKViewer_ViewWindow* vw = dynamic_cast<VTKViewer_ViewWindow*>( window );
+    SVTK_ViewWindow* vw = dynamic_cast<SVTK_ViewWindow*>( window );
     if ( vw ) {
       vtkCamera* camera = vw->getRenderer()->GetActiveCamera();
 
@@ -339,7 +339,7 @@ void GeometryGUI::OnGUIEvent( int id )
   // check type of the active viewframe
   SUIT_ViewWindow* window = desk->activeWindow();
   bool ViewOCC = ( window && window->getViewManager()->getType() == OCCViewer_Viewer::Type() );
-  bool ViewVTK = ( window && window->getViewManager()->getType() == VTKViewer_Viewer::Type() );
+  bool ViewVTK = ( window && window->getViewManager()->getType() == SVTK_Viewer::Type() );
   // if current viewframe is not of OCC and not of VTK type - return immediately
   // fix for IPAL8958 - allow some commands to execute even when NO viewer is active (rename for example)
   bool NotViewerDependentCommand = ( id == 901 || id == 216 || id == 213 ); 
@@ -597,9 +597,9 @@ static void UpdateVtkSelection()
   SUIT_ViewWindow* win = 0;
   for ( win = winList.first(); win; win = winList.next() ) {
     if ( win->getViewManager()->getTypeView() == VIEW_VTK ) {
-      VTKViewer_ViewWindow* vw = dynamic_cast<VTKViewer_ViewWindow*>( window );
+      SVTK_ViewWindow* vw = dynamic_cast<SVTK_ViewWindow*>( window );
       if ( vw ) {
-       VTKViewer_RenderWindowInteractor* anInteractor = vw->getRWInteractor();
+       SVTK_RenderWindowInteractor* anInteractor = vw->getRWInteractor();
        anInteractor->SetSelectionProp();
        anInteractor->SetSelectionTolerance();
        SVTK_InteractorStyleSALOME* aStyle = anInteractor->GetInteractorStyleSALOME();
@@ -633,9 +633,9 @@ bool GeometryGUI::SetSettings()
     }
   }
   else if ( ViewVTK ) {
-    VTKViewer_ViewWindow* vw = dynamic_cast<VTKViewer_ViewWindow*>( window );
+    SVTK_ViewWindow* vw = dynamic_cast<SVTK_ViewWindow*>( window );
     if ( vw ) {
-      VTKViewer_RenderWindowInteractor* myRenderInter = vw->getRWInteractor();
+      SVTK_RenderWindowInteractor* myRenderInter = vw->getRWInteractor();
       DisplayMode = myRenderInter->GetDisplayMode();
     }
   }
@@ -1111,9 +1111,9 @@ bool GeometryGUI::activateModule( SUIT_Study* study )
   application()->viewManagers( OCCViewer_Viewer::Type(), OCCViewManagers );
   for ( vm = OCCViewManagers.first(); vm; vm = OCCViewManagers.next() )
     myOCCSelectors.append( new GEOMGUI_OCCSelector( ((OCCViewer_ViewManager*)vm)->getOCCViewer(), sm ) );
-  application()->viewManagers( VTKViewer_Viewer::Type(), VTKViewManagers );
+  application()->viewManagers( SVTK_Viewer::Type(), VTKViewManagers );
   for ( vm = VTKViewManagers.first(); vm; vm = VTKViewManagers.next() )
-    myVTKSelectors.append( new SalomeApp_VTKSelector( (SVTK_Viewer*)vm->getViewModel(), sm ) );
+    myVTKSelectors.append( new SalomeApp_VTKSelector( dynamic_cast<SVTK_Viewer*>( vm->getViewModel() ), sm ) );
 
   // disable OCC selectors
   getApp()->selectionMgr()->setEnabled( false, OCCViewer_Viewer::Type() );
@@ -1121,7 +1121,7 @@ bool GeometryGUI::activateModule( SUIT_Study* study )
     sr->setEnabled(true);
   
   // disable VTK selectors
-  getApp()->selectionMgr()->setEnabled( false, VTKViewer_Viewer::Type() );
+  getApp()->selectionMgr()->setEnabled( false, SVTK_Viewer::Type() );
   for ( SalomeApp_VTKSelector* sr = myVTKSelectors.first(); sr; sr = myVTKSelectors.next() )
     sr->setEnabled(true);
   
@@ -1153,7 +1153,7 @@ bool GeometryGUI::deactivateModule( SUIT_Study* study )
   getApp()->selectionMgr()->setEnabled( true, OCCViewer_Viewer::Type() );
 
   myVTKSelectors.clear();
-  getApp()->selectionMgr()->setEnabled( true, VTKViewer_Viewer::Type() );
+  getApp()->selectionMgr()->setEnabled( true, SVTK_Viewer::Type() );
 
   return SalomeApp_Module::deactivateModule( study );
 }
@@ -1228,7 +1228,7 @@ bool GeometryGUI::CustomPopup(QAD_Desktop* parent, QPopupMenu* popup, const QStr
   if ( aViewFrame->getTypeView() == VIEW_OCC )
     aDisplayMode = ((OCCViewer_ViewFrame*)aViewFrame)->getViewer()->getAISContext()->DisplayMode();
   else if ( aViewFrame->getTypeView() == VIEW_VTK )
-    aDisplayMode = ((VTKViewer_ViewFrame*)aViewFrame)->getRWInteractor()->GetDisplayMode();
+    aDisplayMode = (dynamic_cast<SVTK_ViewFrame*>( aViewFrame )->getRWInteractor()->GetDisplayMode();
 
   int nbSel = Sel->IObjectCount();
 
@@ -1312,7 +1312,7 @@ bool GeometryGUI::CustomPopup(QAD_Desktop* parent, QPopupMenu* popup, const QStr
            else {
              ////// VTK viewer only
              popup->removeItem( 8034 ); // "Isos"
-             VTKViewer_Prs* vtkPrs = dynamic_cast<VTKViewer_Prs*>( prs );
+             SVTK_Prs* vtkPrs = dynamic_cast<SVTK_Prs*>( prs );
              if ( vtkPrs && !vtkPrs->IsNull() ) {
                vtkActorCollection* actorList = vtkPrs->GetObjects();
                actorList->InitTraversal();
@@ -1479,7 +1479,7 @@ void GeometryGUI::onWindowActivated( SUIT_ViewWindow* win )
     return;
 
   const bool ViewOCC = ( win->getViewManager()->getType() == OCCViewer_Viewer::Type() );
-//  const bool ViewVTK = ( win->getViewManager()->getType() == VTKViewer_Viewer::Type() );
+//  const bool ViewVTK = ( win->getViewManager()->getType() == SVTK_Viewer::Type() );
   
   // disable non-OCC viewframe menu commands
 //  action( 404 )->setEnabled( ViewOCC ); // SKETCHER
@@ -1520,13 +1520,13 @@ void GeometryGUI::onViewManagerAdded( SUIT_ViewManager* vm )
     for ( GEOMGUI_OCCSelector* sr = myOCCSelectors.first(); sr; sr = myOCCSelectors.next() )
       sr->setEnabled(true);
   }
-  else if ( vm->getType() == VTKViewer_Viewer::Type() )
+  else if ( vm->getType() == SVTK_Viewer::Type() )
   {
     SalomeApp_SelectionMgr* sm = getApp()->selectionMgr();
-    myVTKSelectors.append( new SalomeApp_VTKSelector( (SVTK_Viewer*)vm->getViewModel(), sm ) );
+    myVTKSelectors.append( new SalomeApp_VTKSelector( dynamic_cast<SVTK_Viewer*>( vm->getViewModel() ), sm ) );
     
     // disable VTK selectors
-    getApp()->selectionMgr()->setEnabled( false, VTKViewer_Viewer::Type() );
+    getApp()->selectionMgr()->setEnabled( false, SVTK_Viewer::Type() );
     for ( SalomeApp_VTKSelector* sr = myVTKSelectors.first(); sr; sr = myVTKSelectors.next() )
       sr->setEnabled(true);
   }
@@ -1544,7 +1544,7 @@ void GeometryGUI::onViewManagerRemoved( SUIT_ViewManager* vm )
        break;
       }
   }
-  if ( vm->getType() == VTKViewer_Viewer::Type() )
+  if ( vm->getType() == SVTK_Viewer::Type() )
   {
     for ( SalomeApp_VTKSelector* sr = myVTKSelectors.first(); sr; sr = myVTKSelectors.next() )
       if ( sr->viewer() == viewer )
index fe9ff55a41e1571797f72d60194647feb95f2af6..f5f82f8f257db35ca5666791bda881fb8685e221 100644 (file)
@@ -42,9 +42,7 @@
 #include <OCCViewer_ViewManager.h>
 #include <SOCC_ViewModel.h>
 
-#include <VTKViewer_ViewWindow.h>
-#include <VTKViewer_ViewModel.h>
-#include <VTKViewer_RenderWindowInteractor.h>
+#include <SVTK_ViewModel.h>
 #include <SVTK_ViewWindow.h>
 #include <SVTK_RenderWindowInteractor.h>
 
@@ -98,7 +96,7 @@ inline OCCViewer_Viewer* GetOCCViewer(SUIT_Application* theApp){
 
 inline SVTK_ViewWindow* GetSVTKViewWindow(SUIT_Application* theApp){
   SUIT_ViewWindow* window = theApp->desktop()->activeWindow();
-  if(window && window->getViewManager()->getType() == VTKViewer_Viewer::Type())
+  if(window && window->getViewManager()->getType() == SVTK_Viewer::Type())
     return dynamic_cast<SVTK_ViewWindow*>( window );
 
   return 0;
index ed15e2ad0573f641c206240f841a000457664cf3..8c2d260307cfe799492168184a420a788e5da75b 100644 (file)
 #include <SALOME_ListIO.hxx>
 #include <SALOME_ListIteratorOfListIO.hxx>
 
-#include <VTKViewer_ViewModel.h>
-#include <OCCViewer_ViewModel.h>
-#include <OCCViewer_ViewWindow.h>
-
+#include <SVTK_ViewModel.h>
 #include <SVTK_ViewWindow.h>
 #include <SVTK_RenderWindowInteractor.h>
 
+#include <OCCViewer_ViewModel.h>
+#include <OCCViewer_ViewWindow.h>
+
 #include <SUIT_ViewManager.h>
 #include <SUIT_Application.h>
 #include <SUIT_Desktop.h>
@@ -100,7 +100,7 @@ void GEOMToolsGUI::OnSettingsColor()
   if( aDialogColor.isValid() )
   {
     QString type = desk->activeWindow()->getViewManager()->getType();
-    if( type != OCCViewer_Viewer::Type() && type != VTKViewer_Viewer::Type() )
+    if( type != OCCViewer_Viewer::Type() && type != SVTK_Viewer::Type() )
       MESSAGE("Settings Color is not supported for current Viewer");
 
     resMgr->setValue( "Geometry", "SettingsShadingColor", aDialogColor );
@@ -231,7 +231,7 @@ void GEOMToolsGUI::OnColor()
       if ( !selected.IsEmpty() ) {
        SUIT_ViewWindow* window = app->desktop()->activeWindow();
        bool isOCC = ( window && window->getViewManager()->getType() == OCCViewer_Viewer::Type() );
-       bool isVTK = ( window && window->getViewManager()->getType() == VTKViewer_Viewer::Type() );
+       bool isVTK = ( window && window->getViewManager()->getType() == SVTK_Viewer::Type() );
        if ( isVTK ) {
          SVTK_ViewWindow* vtkVW = dynamic_cast<SVTK_ViewWindow*>( window );
          if ( !vtkVW )
index 1610f9149b9602d83a5653aadaed3b7459b64815..eb642a433fbbf481a241151f22d327a2a57ec0ae 100644 (file)
 #include <SALOME_ListIO.hxx>
 #include <SALOME_ListIteratorOfListIO.hxx>
 
-#include <VTKViewer_ViewModel.h>
-#include <OCCViewer_ViewModel.h>
-#include <OCCViewer_ViewWindow.h>
-
+#include <SVTK_ViewModel.h>
 #include <SVTK_ViewWindow.h>
 #include <SVTK_RenderWindowInteractor.h>
 
+#include <OCCViewer_ViewModel.h>
+#include <OCCViewer_ViewWindow.h>
+
 #include <SUIT_ViewManager.h>
 #include <SUIT_Application.h>
 #include <SUIT_Desktop.h>
@@ -199,7 +199,7 @@ void GEOMToolsGUI_TransparencyDlg::ValueHasChanged( int newValue )
        
   SUIT_ViewWindow* window = app->desktop()->activeWindow();
   bool isOCC = ( window && window->getViewManager()->getType() == OCCViewer_Viewer::Type() );
-  bool isVTK = ( window && window->getViewManager()->getType() == VTKViewer_Viewer::Type() );
+  bool isVTK = ( window && window->getViewManager()->getType() == SVTK_Viewer::Type() );
 
   if ( isVTK ) {
     SVTK_ViewWindow* vtkVW = dynamic_cast<SVTK_ViewWindow*>( window );
index bdda9f76831c02916147b81c00ebe60da61cb823..191eb88c2b10fb3fc0ac59122e4b1767d880036b 100644 (file)
@@ -31,8 +31,8 @@
 
 #include "SUIT_Session.h"
 #include "SUIT_ViewWindow.h"
-#include "VTKViewer_ViewWindow.h"
-#include "VTKViewer_ViewModel.h"
+#include "SVTK_ViewWindow.h"
+#include "SVTK_ViewModel.h"
 #include "OCCViewer_ViewWindow.h"
 #include "OCCViewer_ViewPort3d.h"
 
@@ -145,9 +145,11 @@ void OperationGUI_ClippingDlg::Init()
   if (!anActiveWindow)
     return;
   
-  if ( anActiveWindow->getViewManager()->getType() == VTKViewer_Viewer::Type() )
+  if ( anActiveWindow->getViewManager()->getType() == SVTK_Viewer::Type() )
     {
-      VTKViewer_ViewWindow* aVTKFrame = dynamic_cast<VTKViewer_ViewWindow*>( anActiveWindow );
+      SVTK_ViewWindow* aVTKFrame = dynamic_cast<SVTK_ViewWindow*>( anActiveWindow );
+      if( !aVTKFrame )
+       return;
       
       TextLabelNear->setText( tr( "Near"  ) );
       TextLabelFar->setText( tr( "Far"  ) );
@@ -223,9 +225,11 @@ bool OperationGUI_ClippingDlg::ClickOnApply()
   if (!anActiveWindow)
     return false;
   
-  if ( anActiveWindow->getViewManager()->getType() == VTKViewer_Viewer::Type() )
+  if ( anActiveWindow->getViewManager()->getType() == SVTK_Viewer::Type() )
     {
-      VTKViewer_ViewWindow* aVTKFrame = dynamic_cast<VTKViewer_ViewWindow*>( anActiveWindow );
+      SVTK_ViewWindow* aVTKFrame = dynamic_cast<SVTK_ViewWindow*>( anActiveWindow );
+      if( !aVTKFrame )
+       return false;
       
       vtkRenderer* aRenderer = aVTKFrame->getRenderer();
       if(!aRenderer) return false;
@@ -331,9 +335,11 @@ void OperationGUI_ClippingDlg::onReset()
   if (!anActiveWindow)
     return;
   
-  if ( anActiveWindow->getViewManager()->getType() == VTKViewer_Viewer::Type() )
+  if ( anActiveWindow->getViewManager()->getType() == SVTK_Viewer::Type() )
     {
-      VTKViewer_ViewWindow* aVTKFrame = dynamic_cast<VTKViewer_ViewWindow*>( anActiveWindow );
+      SVTK_ViewWindow* aVTKFrame = dynamic_cast<SVTK_ViewWindow*>( anActiveWindow );
+      if( !aVTKFrame )
+       return;
 
       vtkRenderer* aRenderer = aVTKFrame->getRenderer();
       if(!aRenderer) return;