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