/* mainwindow.h This file is part of the Project::OSiRiON zone editor and is distributed under the terms and conditions of the GNU General Public License version 2 */ #ifndef __INCLUDED_EDITOR_MAINWINDOW__ #define __INCLUDED_EDITOR_MAINWINDOW__ #include #include #include #include #include #include namespace editor { class EditorWindow; class MainWindow : public QMainWindow { Q_OBJECT public: MainWindow(); private slots: void slot_new(); void slot_open(); void slot_save(); void slot_save_as(); void slot_add(); void slot_delete(); void slot_duplicate(); void updateMenus(); private: void initActions(); void initMenus(); void initStatus(); /// add a new child window EditorWindow *add_child(); /// find an already open file QMdiSubWindow *find_child(const QString &filename); /// return the active child window, NULL if none EditorWindow *active_child(); QMdiArea *mainwindow_mdiarea; QMenu *mainwindow_filemenu; QMenu *mainwindow_editmenu; QAction *action_new; QAction *action_open; QAction *action_save; QAction *action_save_as; QAction *action_quit; QAction *action_add; QAction *action_delete; QAction *action_duplicate; }; } #endif // __INCLUDED_EDITOR_MAINWINDOW__