Salome HOME
(Issue #31) Proxy viewer created in order to provide uniform dispatching of events...
[modules/shaper.git] / src / XGUI / XGUI_SalomeViewer.h
1 #ifndef XGUI_SALOMEVIEWER_H
2 #define XGUI_SALOMEVIEWER_H
3
4 #include "XGUI.h"
5
6 #include <QObject>
7 #include <AIS_InteractiveContext.hxx>
8 #include <V3d_View.hxx>
9
10 class QMouseEvent;
11 class QKeyEvent;
12
13 /**
14 * A Base object for definition of connector object to
15 * Salome Viewer. Reimplemented in NewGeom_SalomeViewer class
16 */
17 class XGUI_EXPORT XGUI_SalomeViewer: public QObject
18 {
19   Q_OBJECT
20 public:
21   XGUI_SalomeViewer(QObject* theParent):QObject(theParent) {}
22
23   //! Returns AIS_InteractiveContext from current OCCViewer
24   virtual Handle(AIS_InteractiveContext) AISContext() const = 0;
25
26   //! Retrurns V3d_Vioewer from current viewer
27   virtual Handle(V3d_Viewer) v3dViewer() const = 0;
28
29   //! Returns Vsd_View object from currently active view window
30   virtual Handle(V3d_View) activeView() const = 0;
31
32 signals:
33   void lastViewClosed();
34   void tryCloseView();
35   void deleteView();
36   void viewCreated();
37   void mousePress(QMouseEvent* theEvent);
38   void mouseRelease(QMouseEvent* theEvent);
39   void mouseDoubleClick(QMouseEvent* theEvent);
40   void mouseMove(QMouseEvent* theEvent);
41   void keyPress(QKeyEvent* theEvent);
42   void keyRelease(QKeyEvent* theEvent);
43   void activated();
44
45 };
46
47 #endif