Salome HOME
sources v1.2
[modules/kernel.git] / src / SALOMEGUI / QAD_Menus.h
1 //  SALOME SALOMEGUI : implementation of desktop and GUI kernel
2 //
3 //  Copyright (C) 2003  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 //
24 //  File   : QAD_Menus.h
25 //  Author : Nicolas REJNERI
26 //  Module : SALOME
27 //  $Header$
28
29 #ifndef QAD_MENUS_H
30 #define QAD_MENUS_H
31
32 #include "QAD_ListMenuIdAction.h"
33 #include "QAD_ListPopupMenu.h"
34
35 #include <qlist.h>
36 #include <qmenubar.h>
37 #include <qtoolbar.h>
38 #include <qpopupmenu.h>
39
40 class QAD_MainWindow;
41
42 class QAD_Menus
43
44
45 public:
46   QAD_Menus(QMainWindow*);
47   virtual ~QAD_Menus();
48
49   QMenuBar*   myActiveMenuBar;
50   QToolBar*   myActiveToolBar;
51   QStatusBar* myActiveStatusBar;
52   QPopupMenu* myActivePopupMenu;
53   
54   QMainWindow*                 getMainWindow()      {return myMainWindow;}
55   QList<QMenuBar>              getMenuBarList()     {return myMenuBarList;}
56   QList<QToolBar>              getToolBarList()     {return myToolBarList;}
57   QPopupMenu*                  getActivePopupMenu() {return myActivePopupMenu;}
58   QList<QAD_ListMenuIdAction>  getMenuList()        {return myMenuList;}
59   QList<QAD_ListPopupMenu>     getPopupMenuList()   {return myPopupMenuList;}
60
61   void              setActiveMenuBar(QMenuBar*);
62   void              setActivePopupMenu(int);
63   void              setActivePopupMenu(QPopupMenu*);
64   void              setActiveToolBar(int);
65   void              setActiveToolBar(QToolBar*);
66   
67   void              append(QMenuBar*);
68   void              append(QToolBar*);
69   void              append(QAD_ListPopupMenu*);
70   void              append(QAD_ListMenuIdAction*);
71   void              clearToolBar() {myToolBarList.clear();}
72   void              clearPopupMenu() {myPopupMenuList.clear();}
73   void              showToolBar(QToolBar*);
74   void              showAllToolBars();
75   void              hideToolBar(QToolBar*);
76   void              hideAllToolBars();
77
78 protected:
79   QMainWindow*                myMainWindow;
80   QList<QMenuBar>             myMenuBarList;
81   QList<QToolBar>             myToolBarList;
82   QList<QAD_ListMenuIdAction> myMenuList;
83   QList<QAD_ListPopupMenu>    myPopupMenuList;
84
85 };
86
87 #endif