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 class QCloseEvent;
15
16 /**\class XGUI_MainWindow
17  * \ingroup GUI
18  * \brief Main window of the application (Desktop).
19  * It contains: Object Browser, 3d Viewer, Python console, property panel, main menu
20  */
21 class XGUI_EXPORT XGUI_MainWindow: public QMainWindow
22 {
23 Q_OBJECT
24
25 public:
26   XGUI_MainWindow(QWidget* parent = 0);
27   virtual ~XGUI_MainWindow();
28
29   //! Returns main menu object
30   XGUI_MainMenu* menuObject() const
31   {
32     return myMenuBar;
33   }
34
35   //! Returns MDI area
36   QMdiArea* mdiArea() const;
37
38   //! Returns 3d viewer
39   XGUI_Viewer* viewer() const
40   {
41     return myViewer;
42   }
43
44 public slots:
45   void showPythonConsole();
46   void hidePythonConsole();
47
48   void createSubWindow();
49   
50 private slots:
51   void cascadeWindows();
52   void onViewCreated(XGUI_ViewWindow* theWindow);
53   void onDeleteView(XGUI_ViewWindow* theWindow);
54   void activateView();
55   void onViewActivated(QMdiSubWindow* theSubWnd);
56
57 signals:
58   void exitKeySequence();
59
60 protected:
61   void closeEvent(QCloseEvent* event);
62
63 private:
64   XGUI_MainMenu* myMenuBar;
65   XGUI_Viewer* myViewer;
66
67   PyConsole_EnhConsole* myPythonConsole;
68 };
69
70 #endif