]> SALOME platform Git repositories - modules/gui.git/blob - src/SUIT/SUIT_Desktop.h
Salome HOME
e3acceb62f3621646107c89d2d8ff995614ba576
[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   void                     emitActivated();
63   void                     emitMessage( const QString& );
64
65 signals:
66   void                     activated();
67   void                     deactivated();
68   void                     windowActivated( SUIT_ViewWindow* );
69   void                     closing( SUIT_Desktop*, QCloseEvent* );
70   void                     message( const QString& );
71
72 protected:
73   virtual bool             event( QEvent* );
74   virtual void             closeEvent( QCloseEvent* );
75   virtual void             childEvent( QChildEvent* );
76
77   virtual QWidget*         parentArea() const = 0;
78
79 private:
80   QtxActionMenuMgr*        myMenuMgr;
81   QtxActionToolMgr*        myToolMgr;
82   QtxLogoMgr*              myLogoMgr;
83 };
84
85 #endif