From: apo Date: Mon, 19 Sep 2005 11:54:23 +0000 (+0000) Subject: Porting to BR-D5-38-2003 branch X-Git-Tag: BR-D5-38-2003_D2005-12-10~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=369e0bc8cbb84e205472b08c55db97fee9582ba8;p=modules%2Fgeom.git Porting to BR-D5-38-2003 branch --- diff --git a/src/DisplayGUI/DisplayGUI.cxx b/src/DisplayGUI/DisplayGUI.cxx index b329a2f62..1d7aa473c 100644 --- a/src/DisplayGUI/DisplayGUI.cxx +++ b/src/DisplayGUI/DisplayGUI.cxx @@ -30,29 +30,28 @@ #include "GeometryGUI.h" #include "GEOM_Displayer.h" -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include +#include "SUIT_Desktop.h" +#include "SUIT_Session.h" +#include "SUIT_ViewWindow.h" +#include "SUIT_OverrideCursor.h" + +#include "VTKViewer_ViewWindow.h" +#include "OCCViewer_ViewManager.h" +#include "OCCViewer_ViewModel.h" +#include "OCCViewer_ViewWindow.h" + +#include "SALOME_ListIteratorOfListIO.hxx" + +#include "SVTK_ViewWindow.h" +#include "SVTK_View.h" +#include "SVTK_ViewModel.h" +#include "SOCC_ViewModel.h" +#include "SVTK_Prs.h" +#include "SOCC_Prs.h" + +#include "SalomeApp_Application.h" +#include "SalomeApp_SelectionMgr.h" +#include "SalomeApp_Study.h" #include @@ -339,8 +338,8 @@ 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 ); + SVTK_View* aView = ((SVTK_ViewWindow*)viewWindow)->getView(); + aView->SetDisplayMode( mode ); } else if ( viewWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() ) { OCCViewer_Viewer* v3d = ((OCCViewer_ViewManager*)(viewWindow->getViewManager()))->getOCCViewer(); @@ -375,8 +374,8 @@ int DisplayGUI::GetDisplayMode( 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(); - dispMode = myRenderInter->GetDisplayMode(); + SVTK_View* aView = ((SVTK_ViewWindow*)viewWindow)->getView(); + dispMode = aView->GetDisplayMode(); } else if ( viewWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() ) { OCCViewer_Viewer* v3d = ((OCCViewer_ViewManager*)(viewWindow->getViewManager()))->getOCCViewer(); @@ -419,7 +418,7 @@ void DisplayGUI::ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindow if ( viewWindow->getViewManager()->getType() == VTKViewer_Viewer::Type() ) { SVTK_ViewWindow* vw = dynamic_cast( viewWindow ); - SVTK_RenderWindowInteractor* rwi = vw->getRWInteractor(); + SVTK_View* aView = vw->getView(); aSelMgr->selectedObjects( aList ); SALOME_ListIteratorOfListIO It( aList ); @@ -429,12 +428,12 @@ void DisplayGUI::ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindow SVTK_Prs* vtkPrs = dynamic_cast( stvkViewer->CreatePrs( It.Value()->getEntry() ) ); if ( vtkPrs && !vtkPrs->IsNull() ) { if ( mode == 0 ) - rwi->ChangeRepresentationToWireframe( vtkPrs->GetObjects() ); + aView->ChangeRepresentationToWireframe( vtkPrs->GetObjects() ); else if ( mode == 1 ) - rwi->ChangeRepresentationToSurface( vtkPrs->GetObjects() ); + aView->ChangeRepresentationToSurface( vtkPrs->GetObjects() ); } } - rwi->Render(); + aView->Repaint(); } else if ( viewWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() ) { OCCViewer_Viewer* v3d = ((OCCViewer_ViewManager*)(viewWindow->getViewManager()))->getOCCViewer(); diff --git a/src/GEOMGUI/GeometryGUI_Swig.cxx b/src/GEOMGUI/GeometryGUI_Swig.cxx index fe9ff55a4..e257776b2 100644 --- a/src/GEOMGUI/GeometryGUI_Swig.cxx +++ b/src/GEOMGUI/GeometryGUI_Swig.cxx @@ -31,22 +31,22 @@ #include "GeometryGUI.h" -#include -#include -#include -#include +#include "SUIT_Session.h" +#include "SalomeApp_Application.h" +#include "SalomeApp_Study.h" +#include "SalomeApp_ImportOperation.h" -#include +#include "OB_Browser.h" -#include -#include -#include +#include "OCCViewer_ViewWindow.h" +#include "OCCViewer_ViewManager.h" +#include "SOCC_ViewModel.h" -#include -#include -#include -#include -#include +#include "VTKViewer_ViewWindow.h" +#include "VTKViewer_ViewModel.h" +#include "VTKViewer_RenderWindowInteractor.h" +#include "SVTK_ViewWindow.h" +#include "SVTK_View.h" #include "GEOM_Actor.h" #include "GEOM_Client.hxx" @@ -54,7 +54,7 @@ #include "GEOM_AssemblyBuilder.h" #include "GEOM_InteractiveObject.hxx" -#include +#include "SALOME_Event.hxx" #include "utilities.h" @@ -173,10 +173,9 @@ void GEOM_Swig::createAndDisplayGO (const char* Entry) "GEOM", const_cast( obj->GetID().c_str())); - if (SVTK_ViewWindow* svtkViewWindow = GetSVTKViewWindow(app)) { - - SVTK_RenderWindowInteractor* aRenderInter= svtkViewWindow->getRWInteractor(); - int aMode = aRenderInter->GetDisplayMode(); + if (SVTK_ViewWindow* aViewWindow = GetSVTKViewWindow(app)) { + SVTK_View* aView = aViewWindow->getView(); + int aMode = aView->GetDisplayMode(); vtkActorCollection* theActors = GEOM_AssemblyBuilder::BuildActors(Shape,0,aMode,true); @@ -185,10 +184,9 @@ void GEOM_Swig::createAndDisplayGO (const char* Entry) GEOM_Actor* GActor = GEOM_Actor::SafeDownCast(anActor); GActor->setName(const_cast(aNameValue.c_str())); GActor->setIO(anIO); - aRenderInter->Display(GActor); + aView->Display(GActor); } - aRenderInter->Update(); - cout << 8.2 << endl; + aView->Repaint(); } else if (OCCViewer_Viewer* occViewer = GetOCCViewer(app)) { Handle(AIS_InteractiveContext) ic = occViewer->getAISContext(); Handle(GEOM_AISShape) aSh = @@ -399,10 +397,10 @@ void GEOM_Swig::setDisplayMode(const char* theEntry, int theMode) myApp(theApp), myIO(theIO), myParam(theParam) {} virtual void Execute(){ - if(SVTK_ViewWindow* svtkViewWindow = GetSVTKViewWindow(myApp)){ - SVTK_RenderWindowInteractor* myRenderInter= svtkViewWindow->getRWInteractor(); - myRenderInter->SetDisplayMode(myIO,myParam); - myRenderInter->Update(); + if(SVTK_ViewWindow* aViewWindow = GetSVTKViewWindow(myApp)){ + SVTK_View* aView = aViewWindow->getView(); + aView->SetDisplayMode(myIO,myParam); + aView->Repaint(); } else if(OCCViewer_Viewer* occViewer = GetOCCViewer(myApp)) { SOCC_Viewer* soccViewer = dynamic_cast( occViewer ); @@ -433,10 +431,10 @@ void GEOM_Swig::setColor(const char* theEntry, int red, int green, int blue) myApp(theApp), myIO(theIO), myParam(theParam) {} virtual void Execute(){ - if(SVTK_ViewWindow* svtkViewWindow = GetSVTKViewWindow(myApp)){ - SVTK_RenderWindowInteractor* myRenderInter= svtkViewWindow->getRWInteractor(); - myRenderInter->SetColor(myIO,myParam); - myRenderInter->Update(); + if(SVTK_ViewWindow* aViewWindow = GetSVTKViewWindow(myApp)){ + SVTK_View* aView = aViewWindow->getView(); + aView->SetColor(myIO,myParam); + aView->Repaint(); }else if(OCCViewer_Viewer* occViewer = GetOCCViewer(myApp)){ Handle(AIS_InteractiveContext) ic = occViewer->getAISContext(); AIS_ListOfInteractive List; @@ -480,10 +478,10 @@ void GEOM_Swig::setTransparency(const char* theEntry, float transp) myApp(theApp), myIO(theIO), myParam(theParam) {} virtual void Execute(){ - if(SVTK_ViewWindow* svtkViewWindow = GetSVTKViewWindow(myApp)){ - SVTK_RenderWindowInteractor* myRenderInter= svtkViewWindow->getRWInteractor(); - myRenderInter->SetTransparency(myIO,myParam); - myRenderInter->Update(); + if(SVTK_ViewWindow* aViewWindow = GetSVTKViewWindow(myApp)){ + SVTK_View* aView = aViewWindow->getView(); + aView->SetTransparency(myIO,myParam); + aView->Repaint(); }else if(OCCViewer_Viewer* occViewer = GetOCCViewer(myApp)) { SOCC_Viewer* soccViewer = dynamic_cast( occViewer ); if (soccViewer) diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx index ed15e2ad0..6afcf7a4b 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx @@ -38,28 +38,28 @@ #include "GEOM_Actor.h" #include "GEOMBase.h" -#include -#include +#include "SALOME_ListIO.hxx" +#include "SALOME_ListIteratorOfListIO.hxx" -#include -#include -#include +#include "VTKViewer_ViewModel.h" +#include "OCCViewer_ViewModel.h" +#include "OCCViewer_ViewWindow.h" -#include -#include +#include "SVTK_ViewWindow.h" +#include "SVTK_View.h" -#include -#include -#include -#include -#include -#include -#include +#include "SUIT_ViewManager.h" +#include "SUIT_Application.h" +#include "SUIT_Desktop.h" +#include "SUIT_ResourceMgr.h" +#include "SUIT_Session.h" +#include "SUIT_OverrideCursor.h" +#include "SUIT_MessageBox.h" -#include -#include -#include -#include +#include "SalomeApp_Application.h" +#include "SalomeApp_SelectionMgr.h" +#include "SalomeApp_Study.h" +#include "SalomeApp_Module.h" #include "SALOMEDSClient.hxx" @@ -236,13 +236,13 @@ void GEOMToolsGUI::OnColor() SVTK_ViewWindow* vtkVW = dynamic_cast( window ); if ( !vtkVW ) return; - SVTK_RenderWindowInteractor* rwi = vtkVW->getRWInteractor(); - QColor initcolor = rwi->GetColor( selected.First() ); + SVTK_View* aView = vtkVW->getView(); + QColor initcolor = aView->GetColor( selected.First() ); QColor c = QColorDialog::getColor( QColor(), app->desktop() ); if ( c.isValid() ) { SUIT_OverrideCursor(); for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) { - rwi->SetColor( It.Value(), c ); + aView->SetColor( It.Value(), c ); } } } // if ( isVTK ) diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx index 1610f9149..e7e255183 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx @@ -30,25 +30,25 @@ #include "GEOMBase.h" #include "GEOM_AISShape.hxx" -#include -#include +#include "SALOME_ListIO.hxx" +#include "SALOME_ListIteratorOfListIO.hxx" -#include -#include -#include +#include "VTKViewer_ViewModel.h" +#include "OCCViewer_ViewModel.h" +#include "OCCViewer_ViewWindow.h" -#include -#include +#include "SVTK_ViewWindow.h" +#include "SVTK_View.h" -#include -#include -#include -#include -#include -#include +#include "SUIT_ViewManager.h" +#include "SUIT_Application.h" +#include "SUIT_Desktop.h" +#include "SUIT_ResourceMgr.h" +#include "SUIT_Session.h" +#include "SUIT_OverrideCursor.h" -#include -#include +#include "SalomeApp_Application.h" +#include "SalomeApp_SelectionMgr.h" #include #include @@ -205,19 +205,19 @@ void GEOMToolsGUI_TransparencyDlg::ValueHasChanged( int newValue ) SVTK_ViewWindow* vtkVW = dynamic_cast( window ); if ( !vtkVW ) return; - SVTK_RenderWindowInteractor* rwi = vtkVW->getRWInteractor(); + SVTK_View* aView = vtkVW->getView(); if ( myFirstInit ) { myFirstInit = false; - float transp = (rwi->GetTransparency(FirstIOS))*10.0; + float transp = (aView->GetTransparency(FirstIOS))*10.0; mySlider->setValue(int(transp)); return; } SUIT_OverrideCursor(); for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) { - rwi->SetTransparency( It.Value(), newValue/10.0 ); + aView->SetTransparency( It.Value(), newValue/10.0 ); } - rwi->Render(); + aView->Repaint(); } // if ( isVTK ) else if ( isOCC ) {