Salome HOME
Merge branch 'master' of newgeom:newgeom.git
[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_ObjectsBrowser;
10 class QMdiArea;
11 class PyConsole_EnhConsole;
12
13 /**\class XGUI_MainWindow
14  * \ingroup GUI
15  * \brief Main window of the application (Desktop).
16  * It contains: Object Browser, 3d Viewer, Python console, property panel, main menu
17  */
18 class XGUI_EXPORT XGUI_MainWindow: public QMainWindow
19 {
20 Q_OBJECT
21
22 public:
23   XGUI_MainWindow(QWidget* parent = 0);
24   virtual ~XGUI_MainWindow();
25
26   //! Returns main menu object
27   XGUI_MainMenu* menuObject() const
28   {
29     return myMenuBar;
30   }
31
32   //! Returns Object browser
33   XGUI_ObjectsBrowser* objectBrowser() const
34   {
35     return myObjectBrowser;
36   }
37
38   //! Returns MDI area
39   QMdiArea* mdiArea() const;
40
41   //! Returns 3d viewer
42   XGUI_Viewer* viewer() const
43   {
44     return myViewer;
45   }
46
47   // Creates Dock widgets: Object broewser and Property panel
48   void createDockWidgets();
49   void setPropertyPannelTitle(const QString& theTitle);
50
51 public slots:
52   void showPythonConsole();
53   void hidePythonConsole();
54   void showPropertyPanel();
55   void hidePropertyPanel();
56   void showObjectBrowser();
57   void hideObjectBrowser();
58
59 private:
60   QDockWidget* createObjectBrowser();
61   QDockWidget* createPropertyPanel();
62
63   XGUI_MainMenu* myMenuBar;
64   XGUI_ObjectsBrowser* myObjectBrowser;
65   QDockWidget* myPropertyPanelDock;
66
67   XGUI_Viewer* myViewer;
68
69   PyConsole_EnhConsole* myPythonConsole;
70 };
71
72 #endif