Salome HOME
57d5195ad8fa5a2cf61db0363156b0570864f60d
[modules/gui.git] / src / STD / STD_TabDesktop.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 #ifndef STD_TABDESKTOP_H
23 #define STD_TABDESKTOP_H
24
25 #include "STD.h"
26
27 #include <SUIT_Desktop.h>
28
29 class QtxWorkstack;
30 class QtxWorkstackAction;
31
32 #if defined WIN32
33 #pragma warning( disable: 4251 )
34 #endif
35
36 class STD_EXPORT STD_TabDesktop: public SUIT_Desktop 
37 {
38   Q_OBJECT
39
40 public:
41   enum { SplitVertical, SplitHorizontal };
42
43 public:
44   STD_TabDesktop();
45   virtual ~STD_TabDesktop();
46
47   virtual SUIT_ViewWindow* activeWindow() const;
48   virtual QList<SUIT_ViewWindow*> windows() const;
49
50   void                     windowOperation( const int );
51
52   void                     setWindowOperations( const int, ... );
53   void                     setWindowOperations( const QList<int>& );
54
55   QtxWorkstack*            workstack() const;
56
57 private slots:
58   void                     onWindowActivated( QWidget* );
59
60 protected:
61   void                     createActions();
62   virtual void             addWindow( QWidget* );
63
64 private:
65   int                      operationFlag( const int ) const;
66
67 private:
68   QtxWorkstack*            myWorkstack;
69   QtxWorkstackAction*      myWorkstackAction;
70 };
71
72 #if defined WIN32
73 #pragma warning( default: 4251 )
74 #endif
75
76 #endif