Salome HOME
Make XGUI as a shared library
[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
50 public slots:
51   void showPythonConsole();
52   void hidePythonConsole();
53   void showPropertyPanel();
54   void hidePropertyPanel();
55   void showObjectBrowser();
56   void hideObjectBrowser();
57
58 private:
59   QDockWidget* createObjectBrowser();
60   QDockWidget* createPropertyPanel();
61
62   XGUI_MainMenu* myMenuBar;
63   XGUI_ObjectsBrowser* myObjectBrowser;
64   QDockWidget* myPropertyPanelDock;
65
66   XGUI_Viewer* myViewer;
67
68   PyConsole_EnhConsole* myPythonConsole;
69 };
70
71 #endif