X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_ViewerProxy.cpp;h=6233d28ff80940973c70c6920d1df3752944f42e;hb=5544702339b340e6e612420ecbab44a033828d87;hp=053a87abe71513c1335cfbbcef4ca9de7ea1284f;hpb=cbde248859fb0072f6012907391ea90cfc254574;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_ViewerProxy.cpp b/src/XGUI/XGUI_ViewerProxy.cpp index 053a87abe..6233d28ff 100644 --- a/src/XGUI/XGUI_ViewerProxy.cpp +++ b/src/XGUI/XGUI_ViewerProxy.cpp @@ -22,6 +22,17 @@ XGUI_ViewerProxy::XGUI_ViewerProxy(XGUI_Workshop* theParent) { } +void XGUI_ViewerProxy::connectViewProxy() +{ +#ifdef HAVE_SALOME + connect(myWorkshop->salomeConnector()->viewer(), SIGNAL(trihedronVisibilityChanged(bool)), + SIGNAL(trihedronVisibilityChanged(bool))); +#else + connect(myWorkshop->mainWindow()->viewer(), SIGNAL(trihedronVisibilityChanged(bool)), + SIGNAL(trihedronVisibilityChanged(bool))); +#endif +} + Handle(AIS_InteractiveContext) XGUI_ViewerProxy::AISContext() const { #ifdef HAVE_SALOME @@ -31,6 +42,15 @@ Handle(AIS_InteractiveContext) XGUI_ViewerProxy::AISContext() const #endif } +Handle(AIS_Trihedron) XGUI_ViewerProxy::trihedron() const +{ +#ifdef HAVE_SALOME + return myWorkshop->salomeConnector()->viewer()->trihedron(); +#else + return myWorkshop->mainWindow()->viewer()->trihedron(); +#endif +} + Handle(V3d_Viewer) XGUI_ViewerProxy::v3dViewer() const { #ifdef HAVE_SALOME @@ -52,6 +72,17 @@ Handle(V3d_View) XGUI_ViewerProxy::activeView() const #endif } +QWidget* XGUI_ViewerProxy::activeViewPort() const +{ +#ifdef HAVE_SALOME + return myWorkshop->salomeConnector()->viewer()->activeViewPort(); +#else + AppElements_Viewer* aViewer = myWorkshop->mainWindow()->viewer(); + return (aViewer->activeViewWindow()) ? + aViewer->activeViewWindow()->viewPortApp(): 0; +#endif +} + void XGUI_ViewerProxy::setViewProjection(double theX, double theY, double theZ, double theTwist) { Handle(V3d_View) aView3d = activeView();