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 void dockPythonConsole();
48 void undockPythonConsole();
50 void createSubWindow();
53 void cascadeWindows();
54 void onViewCreated(XGUI_ViewWindow* theWindow);
55 void onDeleteView(XGUI_ViewWindow* theWindow);
57 void onViewActivated(QMdiSubWindow* theSubWnd);
60 void exitKeySequence();
63 void closeEvent(QCloseEvent* event);
64 void createMainMenu();
67 XGUI_MainMenu* myMenuBar;
68 XGUI_Viewer* myViewer;
70 PyConsole_EnhConsole* myPythonConsole;
71 //! Python console can be a dock widget if true, else as the tab.
72 bool myIsConsoleDocked;
75 class XGUI_EXPORT CloseEventWatcher: public QObject {
79 CloseEventWatcher(QObject* theParent);
85 bool eventFilter(QObject *obj, QEvent *);