{
emit viewTransformed((int) theType);
}
+
+//***************************************
+void NewGeom_SalomeViewer::activateViewer(bool toActivate)
+{
+ if (!mySelector || !mySelector->viewer())
+ return;
+ SUIT_ViewManager* aMgr = mySelector->viewer()->getViewManager();
+ QVector<SUIT_ViewWindow*> aViews = aMgr->getViews();
+ if (toActivate) {
+ foreach (SUIT_ViewWindow* aView, aViews) {
+ OCCViewer_ViewFrame* aOCCView = dynamic_cast<OCCViewer_ViewFrame*>(aView);
+ OCCViewer_ViewWindow* aWnd = aOCCView->getView(OCCViewer_ViewFrame::MAIN_VIEW);
+ connect(aWnd, SIGNAL(vpTransformationFinished(OCCViewer_ViewWindow::OperationType)),
+ this, SLOT(onViewTransformed(OCCViewer_ViewWindow::OperationType)));
+ }
+ } else {
+ foreach (SUIT_ViewWindow* aView, aViews) {
+ OCCViewer_ViewFrame* aOCCView = dynamic_cast<OCCViewer_ViewFrame*>(aView);
+ OCCViewer_ViewWindow* aWnd = aOCCView->getView(OCCViewer_ViewFrame::MAIN_VIEW);
+ disconnect((OCCViewer_ViewWindow*)aWnd, SIGNAL(vpTransformationFinished(OCCViewer_ViewWindow::OperationType)),
+ this, SLOT(onViewTransformed(OCCViewer_ViewWindow::OperationType)));
+ }
+ }
+}
+
+void NewGeom_SalomeViewer::Zfitall()
+{
+ if (!mySelector || !mySelector->viewer())
+ return;
+ SUIT_ViewManager* aMgr = mySelector->viewer()->getViewManager();
+ OCCViewer_ViewFrame* aView = dynamic_cast<OCCViewer_ViewFrame*>(aMgr->getActiveView());
+ if (aView) {
+ OCCViewer_ViewWindow* aWnd = aView->getView(OCCViewer_ViewFrame::MAIN_VIEW);
+ aWnd->getViewPort()->getView()->ZFitAll();
+ }
+}
\ No newline at end of file