Salome HOME
Update command status method added
[modules/shaper.git] / src / XGUI / XGUI_MainWindow.h
1 #ifndef XGUI_MAINWINDOW_H
2 #define XGUI_MAINWINDOW_H
3
4 #include <QMainWindow>
5
6 class XGUI_MainMenu;
7 class XGUI_Viewer;
8 class XGUI_ObjectsBrowser;
9 class QMdiArea;
10 class PyConsole_EnhConsole;
11
12 /**\class XGUI_MainWindow
13  * \ingroup GUI
14  * \brief Main window of the application (Desktop).
15  * It contains: Object Browser, 3d Viewer, Python console, property panel, main menu
16  */
17 class XGUI_MainWindow: public QMainWindow
18 {
19 Q_OBJECT
20
21 public:
22   XGUI_MainWindow(QWidget* parent = 0);
23   virtual ~XGUI_MainWindow();
24
25   //! Returns main menu object
26   XGUI_MainMenu* menuObject() const
27   {
28     return myMenuBar;
29   }
30
31   //! Returns Object browser
32   XGUI_ObjectsBrowser* objectBrowser() const
33   {
34     return myObjectBrowser;
35   }
36
37   //! Returns MDI area
38   QMdiArea* mdiArea() const;
39
40   //! Returns 3d viewer
41   XGUI_Viewer* viewer() const
42   {
43     return myViewer;
44   }
45
46   // Creates Dock widgets: Object broewser and Property panel
47   void createDockWidgets();
48
49 public slots:
50   void showPythonConsole();
51   void hidePythonConsole();
52   void showPropertyPanel();
53   void hidePropertyPanel();
54   void showObjectBrowser();
55   void hideObjectBrowser();
56
57 private:
58   QDockWidget* createObjectBrowser();
59   QDockWidget* createPropertyPanel();
60
61   XGUI_MainMenu* myMenuBar;
62   XGUI_ObjectsBrowser* myObjectBrowser;
63   QDockWidget* myPropertyPanelDock;
64
65   XGUI_Viewer* myViewer;
66
67   PyConsole_EnhConsole* myPythonConsole;
68 };
69
70 #endif