Salome HOME
Documenting of classes
[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 public slots:
47   void showPythonConsole();
48   void hidePythonConsole();
49   void showPropertyPanel();
50   void hidePropertyPanel();
51   void showObjectBrowser();
52   void hideObjectBrowser();
53
54 private:
55   void createDockWidgets();
56   QDockWidget* createObjectBrowser();
57   QDockWidget* createPropertyPanel();
58
59   XGUI_MainMenu* myMenuBar;
60   XGUI_ObjectsBrowser* myObjectBrowser;
61   QDockWidget* myPropertyPanelDock;
62
63   XGUI_Viewer* myViewer;
64
65   PyConsole_EnhConsole* myPythonConsole;
66 };
67
68 #endif