]> SALOME platform Git repositories - modules/gui.git/blob - src/SUIT/SUIT_ViewWindow.h
Salome HOME
ff6defde24506adfa5fd4308c278dfbe40a151cb
[modules/gui.git] / src / SUIT / SUIT_ViewWindow.h
1 // Copyright (C) 2005  OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
2 // 
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either 
6 // version 2.1 of the License.
7 // 
8 // This library is distributed in the hope that it will be useful 
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public  
14 // License along with this library; if not, write to the Free Software 
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/
18 //
19 // SUIT_ViewWindow.h: interface for the SUIT_ViewWindow class.
20 //
21 //////////////////////////////////////////////////////////////////////
22
23 #if !defined(AFX_SUIT_VIEWWINDOW_H__82C3D51A_6F10_45B0_BCFE_3CB3EF596A4D__INCLUDED_)
24 #define AFX_SUIT_VIEWWINDOW_H__82C3D51A_6F10_45B0_BCFE_3CB3EF596A4D__INCLUDED_
25
26 #if _MSC_VER > 1000
27 #pragma once
28 #endif // _MSC_VER > 1000
29
30 #include "SUIT.h"
31
32 #include <qmainwindow.h>
33 #include <qimage.h>
34
35 class SUIT_Desktop;
36 class SUIT_ViewManager;
37
38 class SUIT_EXPORT SUIT_ViewWindow: public QMainWindow 
39 {
40   Q_OBJECT
41 public:
42   SUIT_ViewWindow(SUIT_Desktop* theDesktop);
43   virtual ~SUIT_ViewWindow();
44
45   void              setViewManager(SUIT_ViewManager* theManager) { myManager = theManager;}
46   SUIT_ViewManager* getViewManager() const { return myManager; }
47
48   bool              event(QEvent*);
49
50   virtual QImage    dumpView() { return QImage(); }
51   void              onAccelAction( int );
52
53 public slots:
54   virtual void      onDumpView();
55
56 signals:
57   void              closing(SUIT_ViewWindow*);
58   void              mousePressed(SUIT_ViewWindow*, QMouseEvent*);
59   void              mouseReleased(SUIT_ViewWindow*, QMouseEvent*);
60   void              mouseDoubleClicked(SUIT_ViewWindow*, QMouseEvent*);
61   void              mouseMoving(SUIT_ViewWindow*, QMouseEvent*);
62   void              wheeling(SUIT_ViewWindow*, QWheelEvent*);
63   void              keyPressed(SUIT_ViewWindow*, QKeyEvent*);
64   void              keyReleased(SUIT_ViewWindow*, QKeyEvent*);
65   void              contextMenuRequested( QContextMenuEvent *e );
66
67 protected:
68   void              closeEvent(QCloseEvent* theEvent);
69   virtual void      contextMenuEvent( QContextMenuEvent * e );
70
71   virtual void      action( const int );
72
73   SUIT_Desktop*     myDesktop;
74   SUIT_ViewManager* myManager;
75 };
76
77 #endif // !defined(AFX_SUIT_VIEWWINDOW_H__82C3D51A_6F10_45B0_BCFE_3CB3EF596A4D__INCLUDED_)