X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSVTK%2FSVTK_ViewModel.cxx;h=28bc07177cc4b7979a05a8d4d885bae60918a659;hb=refs%2Fheads%2Fngr%2Fpython3_dev_pv5.4;hp=4a257b5f7fc07edd40b46805432cf651e6308e5f;hpb=fd9620d7e90ea02ddcb5d5c39cfc8ba645d831ca;p=modules%2Fgui.git diff --git a/src/SVTK/SVTK_ViewModel.cxx b/src/SVTK/SVTK_ViewModel.cxx index 4a257b5f7..28bc07177 100644 --- a/src/SVTK/SVTK_ViewModel.cxx +++ b/src/SVTK/SVTK_ViewModel.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -94,6 +94,7 @@ SVTK_Viewer::SVTK_Viewer() mySpaceBtn[1] = 2; mySpaceBtn[2] = 9; myDefaultBackground = Qtx::BackgroundData( Qt::black ); + myQuadBufferSupport = false; } /*! @@ -196,6 +197,7 @@ SUIT_ViewWindow* SVTK_Viewer::createView( SUIT_Desktop* theDesktop ) aViewWindow->SetProjectionMode( projectionMode() ); aViewWindow->SetStereoType( stereoType() ); aViewWindow->SetAnaglyphFilter( anaglyphFilter() ); + aViewWindow->SetQuadBufferSupport( isQuadBufferSupport() ); aViewWindow->SetInteractionStyle( interactionStyle() ); aViewWindow->SetZoomingStyle( zoomingStyle() ); aViewWindow->SetPreSelectionMode( preSelectionMode() ); @@ -358,6 +360,33 @@ void SVTK_Viewer::setAnaglyphFilter( const int theFilter ) } } +/*! + \return support quad-buffered stereo +*/ +bool SVTK_Viewer::isQuadBufferSupport() const +{ + return myQuadBufferSupport; +} + +/*! + Set support quad-buffered stereo + \param theEnable - enable/disable support quad-buffered stereo +*/ +void SVTK_Viewer::setQuadBufferSupport( const bool theEnable ) +{ + if ( myQuadBufferSupport != theEnable ) { + myQuadBufferSupport = theEnable; + + if (SUIT_ViewManager* aViewManager = getViewManager()) { + QVector aViews = aViewManager->getViews(); + for ( uint i = 0; i < aViews.count(); i++ ) + { + if ( TViewWindow* aView = dynamic_cast(aViews.at( i )) ) + aView->SetQuadBufferSupport( theEnable ); + } + } + } +} /*! \return interaction style */ @@ -536,7 +565,7 @@ void SVTK_Viewer::contextMenuPopup( QMenu* thePopup ) if(TViewWindow* aView = dynamic_cast(myViewManager->getActiveView())){ //Support of several toolbars in the popup menu - QList lst = qFindChildren( aView ); + QList lst = aView->findChildren(); QList::const_iterator it = lst.begin(), last = lst.end(); for( ; it!=last; it++ ) thePopup->addAction( (*it)->toggleViewAction() );