1 #ifndef XGUI_MAINWINDOW_H
2 #define XGUI_MAINWINDOW_H
10 class XGUI_ViewWindow;
13 class PyConsole_EnhConsole;
16 /**\class XGUI_MainWindow
18 * \brief Main window of the application (Desktop).
19 * It contains: Object Browser, 3d Viewer, Python console, property panel, main menu
21 class XGUI_EXPORT XGUI_MainWindow : public QMainWindow
26 XGUI_MainWindow(QWidget* parent = 0);
27 virtual ~XGUI_MainWindow();
29 //! Returns main menu object
30 XGUI_MainMenu* menuObject() const
36 QMdiArea* mdiArea() const;
39 XGUI_Viewer* viewer() const
45 void showPythonConsole();
46 void hidePythonConsole();
47 //! Python console can be a dock widget
48 void dockPythonConsole();
49 //! or can be a tab in the main menu.
50 void undockPythonConsole();
52 void createSubWindow();
55 void cascadeWindows();
56 void onViewCreated(XGUI_ViewWindow* theWindow);
57 void onDeleteView(XGUI_ViewWindow* theWindow);
59 void onViewActivated(QMdiSubWindow* theSubWnd);
62 void exitKeySequence();
65 void closeEvent(QCloseEvent* event);
66 void createMainMenu();
69 XGUI_MainMenu* myMenuBar;
70 XGUI_Viewer* myViewer;
72 PyConsole_EnhConsole* myPythonConsole;
75 class XGUI_EXPORT CloseEventWatcher : public QObject
80 CloseEventWatcher(QObject* theParent);
86 bool eventFilter(QObject *obj, QEvent *);