X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROCurveCreator%2FOCCViewer_Utilities.cxx;h=425179f9c48acbb74eca1fb262958b44f275a45e;hb=8edd427af3997521bda72ca3c416cc1d490565d5;hp=c683c014814018e020ce852a8cfb0f1421c39dce;hpb=32fa2c8f9f80e7d33fdb7efeff53a1a12f54083f;p=modules%2Fhydro.git diff --git a/src/HYDROCurveCreator/OCCViewer_Utilities.cxx b/src/HYDROCurveCreator/OCCViewer_Utilities.cxx index c683c014..425179f9 100644 --- a/src/HYDROCurveCreator/OCCViewer_Utilities.cxx +++ b/src/HYDROCurveCreator/OCCViewer_Utilities.cxx @@ -1,6 +1,5 @@ #include "OCCViewer_Utilities.h" -#include "OCCViewer_ViewWidget.h" #include #include @@ -58,44 +57,3 @@ void OCCViewer_Utilities::setViewer2DMode( OCCViewer_Viewer* theViewer, break; } } - -void OCCViewer_Utilities::setViewWidget2DMode( OCCViewer_ViewWidget* theViewWidget, - const OCCViewer_ViewWidget::Mode2dType& theMode ) -{ - if ( !theViewWidget ) - return; - - // set a view mode - theViewWidget->set2dMode( theMode ); - bool is2dMode = theMode != OCCViewer_ViewWindow::No2dMode; - - // enable/disable view actions - QList aNo2dActions; - aNo2dActions << OCCViewer_ViewWidget::RotationId - << OCCViewer_ViewWidget::FrontId - << OCCViewer_ViewWidget::BackId - << OCCViewer_ViewWidget::TopId - << OCCViewer_ViewWidget::BottomId - << OCCViewer_ViewWidget::LeftId - << OCCViewer_ViewWidget::RightId; - - QAction* anAction; - for ( int i = 0, aNb = aNo2dActions.size(); i < aNb; i++ ) { - anAction = theViewWidget->action( aNo2dActions[i] ); - if ( anAction ) - anAction->setVisible( !is2dMode ); - } - - // change view position - switch ( theMode ) { - case OCCViewer_ViewWindow::XYPlane: - theViewWidget->onTopView(); - break; - case OCCViewer_ViewWindow::XZPlane: - theViewWidget->onLeftView(); - break; - case OCCViewer_ViewWindow::YZPlane: - theViewWidget->onFrontView(); - break; - } -}