Salome HOME
Fix for bug 10438: Crash during Explode on Blocks operation (Global selection on...
[modules/gui.git] / src / SUIT / SUIT_ViewWindow.h
1 // SUIT_ViewWindow.h: interface for the SUIT_ViewWindow class.
2 //
3 //////////////////////////////////////////////////////////////////////
4
5 #if !defined(AFX_SUIT_VIEWWINDOW_H__82C3D51A_6F10_45B0_BCFE_3CB3EF596A4D__INCLUDED_)
6 #define AFX_SUIT_VIEWWINDOW_H__82C3D51A_6F10_45B0_BCFE_3CB3EF596A4D__INCLUDED_
7
8 #if _MSC_VER > 1000
9 #pragma once
10 #endif // _MSC_VER > 1000
11
12 #include "SUIT.h"
13
14 #include <qmainwindow.h>
15 #include <qimage.h>
16
17 class SUIT_Desktop;
18 class SUIT_ViewManager;
19
20 class SUIT_EXPORT SUIT_ViewWindow: public QMainWindow 
21 {
22   Q_OBJECT
23 public:
24   SUIT_ViewWindow(SUIT_Desktop* theDesktop);
25   virtual ~SUIT_ViewWindow();
26
27   void              setViewManager(SUIT_ViewManager* theManager) { myManager = theManager;}
28   SUIT_ViewManager* getViewManager() const { return myManager; }
29
30   bool              event(QEvent*);
31
32   virtual QImage    dumpView() { return QImage(); }
33   void              onAccelAction( int );
34
35 public slots:
36   virtual void      onDumpView();
37
38 signals:
39   void              closing(SUIT_ViewWindow*);
40   void              mousePressed(SUIT_ViewWindow*, QMouseEvent*);
41   void              mouseReleased(SUIT_ViewWindow*, QMouseEvent*);
42   void              mouseDoubleClicked(SUIT_ViewWindow*, QMouseEvent*);
43   void              mouseMoving(SUIT_ViewWindow*, QMouseEvent*);
44   void              wheeling(SUIT_ViewWindow*, QWheelEvent*);
45   void              keyPressed(SUIT_ViewWindow*, QKeyEvent*);
46   void              keyReleased(SUIT_ViewWindow*, QKeyEvent*);
47   void              contextMenuRequested( QContextMenuEvent *e );
48
49 protected:
50   void              closeEvent(QCloseEvent* theEvent);
51   virtual void      contextMenuEvent( QContextMenuEvent * e );
52
53   virtual void      action( const int );
54
55   SUIT_Desktop*     myDesktop;
56   SUIT_ViewManager* myManager;
57 };
58
59 #endif // !defined(AFX_SUIT_VIEWWINDOW_H__82C3D51A_6F10_45B0_BCFE_3CB3EF596A4D__INCLUDED_)