Salome HOME
Join modifications from branch OCC_development_for_3_2_0a2
[modules/gui.git] / src / STD / STD_MDIDesktop.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 #ifndef STD_MDIDESKTOP_H
20 #define STD_MDIDESKTOP_H
21
22 #include "STD.h"
23
24 #include <SUIT_Desktop.h>
25
26 class QtxAction;
27 class QPopupMenu;
28 class QWorkspace;
29 class QtxWorkspaceAction;
30
31 #if defined WNT
32 #pragma warning( disable: 4251 )
33 #endif
34
35 class STD_EXPORT STD_MDIDesktop: public SUIT_Desktop 
36 {
37   Q_OBJECT
38
39 public:
40   enum { MenuWindowId = 6 };
41   enum { Cascade, Tile, HTile, VTile };
42
43 public:
44   STD_MDIDesktop();
45   virtual ~STD_MDIDesktop();
46
47   virtual SUIT_ViewWindow* activeWindow() const;
48   virtual QPtrList<SUIT_ViewWindow> windows() const;
49
50   void                     windowOperation( const int );
51
52   void                     setWindowOperations( const int, ... );
53   void                     setWindowOperations( const QValueList<int>& );
54
55   QWorkspace*              workspace() const;
56
57 private slots:
58   void                     onWindowActivated( QWidget* );
59
60 protected:
61   void                     createActions();
62   virtual QWidget*         parentArea() const;
63
64 private:
65   int                      operationFlag( const int ) const;
66
67 private:
68   QWorkspace*              myWorkspace;
69   QtxWorkspaceAction*      myWorkspaceAction;
70 };
71
72 #if defined WNT
73 #pragma warning( default: 4251 )
74 #endif
75
76 #endif