Salome HOME
Join modifications from branch BR_DEBUG_3_2_0b1
[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/ or email : webmaster.salome@opencascade.com
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 /*!
35   \class SUIT_Desktop
36   Provides standard desktop: main window with
37   main menu manager, toolbars manager and logo.
38 */
39 class SUIT_EXPORT SUIT_Desktop : public QtxMainWindow
40 {
41   Q_OBJECT
42
43 public:
44   SUIT_Desktop();
45   virtual ~SUIT_Desktop();
46
47   QtxActionMenuMgr*        menuMgr() const;
48   QtxActionToolMgr*        toolMgr() const;
49
50   virtual SUIT_ViewWindow* activeWindow() const = 0;
51   virtual QPtrList<SUIT_ViewWindow> windows() const = 0;
52
53   void                     addLogo( const QString&, const QPixmap& ); // Not should be used. Will be removed.
54   void                     removeLogo( const QString& );              // Not should be used. Will be removed.
55
56   int                      logoCount() const;
57
58   void                     logoClear();
59   void                     logoRemove( const QString& );
60   void                     logoInsert( const QString&, const QPixmap&, const int = -1 );
61
62 signals:
63   void                     activated();
64   void                     deactivated();
65   void                     windowActivated( SUIT_ViewWindow* );
66   void                     closing( SUIT_Desktop*, QCloseEvent* );
67
68 protected:
69   virtual bool             event( QEvent* );
70   virtual void             closeEvent( QCloseEvent* );
71   virtual void             childEvent( QChildEvent* );
72
73   virtual QWidget*         parentArea() const = 0;
74
75 private:
76   QtxActionMenuMgr*        myMenuMgr;
77   QtxActionToolMgr*        myToolMgr;
78   QtxLogoMgr*              myLogoMgr;
79 };
80
81 #endif