Salome HOME
OCC functionality moving out from the widget
[modules/hydro.git] / src / HYDROCurveCreator / OCCViewer_Utilities.cxx
index c683c014814018e020ce852a8cfb0f1421c39dce..425179f9c48acbb74eca1fb262958b44f275a45e 100644 (file)
@@ -1,6 +1,5 @@
 
 #include "OCCViewer_Utilities.h"
-#include "OCCViewer_ViewWidget.h"
 
 #include <OCCViewer_ViewFrame.h>
 #include <OCCViewer_ViewModel.h>
@@ -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<OCCViewer_ViewWidget::ButtonsType> 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;
-  }
-}