Salome HOME
c437dbb1c414fd3a6ca07233f171b5e57f834516
[modules/gui.git] / src / SUIT / SUIT_Desktop.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 SUIT_DESKTOP_H
20 #define SUIT_DESKTOP_H
21
22 #include "SUIT.h"
23
24 #include <qmap.h>
25 #include <qpixmap.h>
26 #include <QtxMainWindow.h>
27
28 class QPopupMenu;
29 class QtxLogoMgr;
30 class SUIT_ViewWindow;
31 class QtxActionMenuMgr;
32 class QtxActionToolMgr;
33
34 class SUIT_EXPORT SUIT_Desktop : public QtxMainWindow
35 {
36   Q_OBJECT
37
38 public:
39   SUIT_Desktop();
40   virtual ~SUIT_Desktop();
41
42   QtxActionMenuMgr*        menuMgr() const;
43   QtxActionToolMgr*        toolMgr() const;
44
45   virtual SUIT_ViewWindow* activeWindow() const = 0;
46   virtual QPtrList<SUIT_ViewWindow> windows() const = 0;
47
48   void                     addLogo( const QString&, const QPixmap& ); // Not should be used. Will be removed.
49   void                     removeLogo( const QString& );              // Not should be used. Will be removed.
50
51   int                      logoCount() const;
52
53   void                     logoClear();
54   void                     logoRemove( const QString& );
55   void                     logoInsert( const QString&, const QPixmap&, const int = -1 );
56
57 signals:
58   void                     activated();
59   void                     deactivated();
60   void                     windowActivated( SUIT_ViewWindow* );
61   void                     closing( SUIT_Desktop*, QCloseEvent* );
62
63 protected:
64   virtual bool             event( QEvent* );
65   virtual void             closeEvent( QCloseEvent* );
66   virtual void             childEvent( QChildEvent* );
67
68   virtual QWidget*         parentArea() const = 0;
69
70 private:
71   QtxActionMenuMgr*        myMenuMgr;
72   QtxActionToolMgr*        myToolMgr;
73   QtxLogoMgr*              myLogoMgr;
74 };
75
76 #endif