Salome HOME
Merge branch 'master' of newgeom:newgeom
[modules/shaper.git] / src / XGUI / XGUI_MainWindow.h
1 #ifndef XGUI_MAINWINDOW_H
2 #define XGUI_MAINWINDOW_H
3
4 #include "XGUI.h"
5 #include <QMainWindow>
6
7 class XGUI_MainMenu;
8 class XGUI_Viewer;
9 class XGUI_ActionsMgr;
10 class XGUI_ViewWindow;
11 class QMdiArea;
12 class QMdiSubWindow;
13 class PyConsole_EnhConsole;
14
15 /**\class XGUI_MainWindow
16  * \ingroup GUI
17  * \brief Main window of the application (Desktop).
18  * It contains: Object Browser, 3d Viewer, Python console, property panel, main menu
19  */
20 class XGUI_EXPORT XGUI_MainWindow: public QMainWindow
21 {
22 Q_OBJECT
23
24 public:
25   XGUI_MainWindow(QWidget* parent = 0);
26   virtual ~XGUI_MainWindow();
27
28   //! Returns main menu object
29   XGUI_MainMenu* menuObject() const
30   {
31     return myMenuBar;
32   }
33
34   //! Returns MDI area
35   QMdiArea* mdiArea() const;
36
37   //! Returns 3d viewer
38   XGUI_Viewer* viewer() const
39   {
40     return myViewer;
41   }
42
43 public slots:
44   void showPythonConsole();
45   void hidePythonConsole();
46
47   void createSubWindow();
48   
49 private slots:
50   void cascadeWindows();
51   void onViewCreated(XGUI_ViewWindow* theWindow);
52   void onDeleteView(XGUI_ViewWindow* theWindow);
53   void activateView();
54   void onViewActivated(QMdiSubWindow* theSubWnd);
55
56 private:
57   XGUI_MainMenu* myMenuBar;
58   XGUI_Viewer* myViewer;
59
60   PyConsole_EnhConsole* myPythonConsole;
61 };
62
63 #endif