#include "NewGeom_SalomeViewer.h"
#include "NewGeom_OCCSelector.h"
-#include <OCCViewer_ViewWindow.h>
#include <OCCViewer_ViewPort3d.h>
#include <OCCViewer_ViewFrame.h>
void NewGeom_SalomeViewer::onViewCreated(SUIT_ViewWindow* theView)
{
myView->setCurrentView(theView);
+
+ OCCViewer_ViewFrame* aView = dynamic_cast<OCCViewer_ViewFrame*>(theView);
+
+ OCCViewer_ViewWindow* aWnd = aView->getView(OCCViewer_ViewFrame::MAIN_VIEW);
+ if (aWnd)
+ connect(aWnd, SIGNAL(vpTransformationFinished(OCCViewer_ViewWindow::OperationType)),
+ this, SLOT(onViewTransformed(OCCViewer_ViewWindow::OperationType)));
+
emit viewCreated(myView);
}
//**********************************************
-void NewGeom_SalomeViewer::onActivated(SUIT_ViewWindow*)
+void NewGeom_SalomeViewer::onActivated(SUIT_ViewWindow* theView)
{
+ myView->setCurrentView(theView);
emit activated(myView);
}
aContext->UpdateCurrentViewer();
}
}
+
+//***************************************
+void NewGeom_SalomeViewer::onViewTransformed(OCCViewer_ViewWindow::OperationType theType)
+{
+ emit viewTransformed((int) theType);
+}
#include <ModuleBase_IViewer.h>
#include <ModuleBase_IViewWindow.h>
+#include <OCCViewer_ViewWindow.h>
+
#include <V3d_View.hxx>
class SUIT_ViewWindow;
void onActivated(SUIT_ViewWindow*);
void onSelectionChanged();
+ void onViewTransformed(OCCViewer_ViewWindow::OperationType);
private:
NewGeom_OCCSelector* mySelector;
this, SIGNAL(keyRelease(ModuleBase_IViewWindow*, QKeyEvent*)));
connect(aViewer, SIGNAL(selectionChanged()), this, SIGNAL(selectionChanged()));
+
+ connect(aViewer, SIGNAL(viewTransformed(int)), this, SIGNAL(viewTransformed(int)));
+
connect(aViewer, SIGNAL(contextMenuRequested(QContextMenuEvent*)), this,
SIGNAL(contextMenuRequested(QContextMenuEvent*)));
-
- // TODO: Connect to ViewTransformation signal
} else {
AppElements_Viewer* aViewer = myWorkshop->mainWindow()->viewer();
}
}
+//***************************************
void XGUI_ViewerProxy::onViewTransformed(AppElements_ViewWindow::OperationType theType)
{
emit viewTransformed((int) theType);
-}
\ No newline at end of file
+}
+