Salome HOME
New item (FontItem), allowing to show information about font setting and to select...
[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
34 public slots:
35   virtual void      onDumpView();
36
37 signals:
38   void              closing(SUIT_ViewWindow*);
39   void              mousePressed(SUIT_ViewWindow*, QMouseEvent*);
40   void              mouseReleased(SUIT_ViewWindow*, QMouseEvent*);
41   void              mouseDoubleClicked(SUIT_ViewWindow*, QMouseEvent*);
42   void              mouseMoving(SUIT_ViewWindow*, QMouseEvent*);
43   void              wheeling(SUIT_ViewWindow*, QWheelEvent*);
44   void              keyPressed(SUIT_ViewWindow*, QKeyEvent*);
45   void              keyReleased(SUIT_ViewWindow*, QKeyEvent*);
46   void              contextMenuRequested( QContextMenuEvent *e );
47
48 protected:
49   void              closeEvent(QCloseEvent* theEvent);
50   virtual void      contextMenuEvent( QContextMenuEvent * e );
51
52   SUIT_Desktop*     myDesktop;
53   SUIT_ViewManager* myManager;
54 };
55
56 #endif // !defined(AFX_SUIT_VIEWWINDOW_H__82C3D51A_6F10_45B0_BCFE_3CB3EF596A4D__INCLUDED_)