All modules must use SVTK package instead VTK

This commit is contained in:
asl 2005-10-05 06:28:23 +00:00
parent a5e70eb6b7
commit c1745184cb
10 changed files with 84 additions and 72 deletions

View 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() );

View 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");

View 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();

View File

@ -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);

View 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();

View File

@ -41,11 +41,11 @@
#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 )

View 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;

View File

@ -41,13 +41,13 @@
#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 )

View File

@ -33,13 +33,13 @@
#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 );

View 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;