1 #ifndef XGUI_VIEWERPROXY_H
2 #define XGUI_VIEWERPROXY_H
5 #include "XGUI_SalomeViewer.h"
11 * Proxy class which repersents or XGUI_Viewer or Salome Viewer
12 * dependently on current launching environment.
13 * It is reccomennded to use this class in operation for accessing to viewer
14 * functionality instead of direct access to a viewer
16 class XGUI_EXPORT XGUI_ViewerProxy: public XGUI_SalomeViewer
20 XGUI_ViewerProxy(XGUI_Workshop* theParent);
22 //! Returns AIS_InteractiveContext from current OCCViewer
23 virtual Handle(AIS_InteractiveContext) AISContext() const;
25 //! Retrurns V3d_Vioewer from current viewer
26 virtual Handle(V3d_Viewer) v3dViewer() const;
28 //! Returns Vsd_View object from currently active view window
29 virtual Handle(V3d_View) activeView() const;
31 //! Sets the view projection
32 /// \param theX the X projection value
33 /// \param theY the Y projection value
34 /// \param theZ the Z projection value
35 void setViewProjection(double theX, double theY, double theZ);
37 /// Connects to a viewer according to current environment
38 void connectToViewer();
41 void onMousePress(XGUI_ViewWindow*, QMouseEvent*);
42 void onMouseRelease(XGUI_ViewWindow*, QMouseEvent*);
43 void onMouseDoubleClick(XGUI_ViewWindow*, QMouseEvent*);
44 void onMouseMove(XGUI_ViewWindow*, QMouseEvent*);
45 void onKeyPress(XGUI_ViewWindow*, QKeyEvent*);
46 void onKeyRelease(XGUI_ViewWindow*, QKeyEvent*);
49 XGUI_Workshop* myWorkshop;