1 // Object Viewer Qt - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
2 // Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) <dnk-88@tut.by>
4 // This source file has been modified by the following contributors:
5 // Copyright (C) 2010 Winch Gate Property Limited
6 // Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
8 // This program is free software: you can redistribute it and/or modify
9 // it under the terms of the GNU Affero General Public License as
10 // published by the Free Software Foundation, either version 3 of the
11 // License, or (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU Affero General Public License for more details.
18 // You should have received a copy of the GNU Affero General Public License
19 // along with this program. If not, see <http://www.gnu.org/licenses/>.
25 #include "../../extension_system/iplugin_manager.h"
26 #include "plugin_view_dialog.h"
31 #include <QtGui/QMainWindow>
32 #include <QtGui/QUndoGroup>
33 #include <QtCore/QSettings>
37 class CSettingsDialog
;
44 class MainWindow
: public QMainWindow
49 MainWindow(ExtensionSystem::IPluginManager
*pluginManager
, QWidget
*parent
= 0);
52 bool initialize(QString
*errorString
);
53 void extensionsInitialized();
55 MenuManager
*menuManager() const;
56 ContextManager
*contextManager() const;
57 QSettings
*settings() const;
58 QUndoGroup
*undoGroup() const;
60 ExtensionSystem::IPluginManager
*pluginManager() const;
62 void addContextObject(IContext
*context
);
63 void removeContextObject(IContext
*context
);
66 bool showOptionsDialog(const QString
&group
= QString(),
67 const QString
&page
= QString(),
69 void updateContext(Core::IContext
*context
);
84 void setFullScreen(bool enabled
);
88 virtual void closeEvent(QCloseEvent
*event
);
93 void createStatusBar();
99 ExtensionSystem::IPluginManager
*m_pluginManager
;
100 PluginView
*m_pluginView
;
101 MenuManager
*m_menuManager
;
102 ContextManager
*m_contextManager
;
103 CoreImpl
*m_coreImpl
;
105 QPalette m_originalPalette
;
108 QDockWidget
*m_dockWidget
;
109 QUndoGroup
*m_undoGroup
;
110 QSettings
*m_settings
;
113 QTimer
*m_statusBarTimer
;
115 QTabWidget
*m_tabWidget
;
118 QMenu
*m_recentFilesMenu
;
126 QAction
*m_newAction
;
127 QAction
*m_openAction
;
128 QAction
*m_saveAction
;
129 QAction
*m_saveAsAction
;
130 QAction
*m_saveAllAction
;
131 QAction
*m_closeAction
;
132 QAction
*m_exitAction
;
133 QAction
*m_cutAction
;
134 QAction
*m_copyAction
;
135 QAction
*m_pasteAction
;
136 QAction
*m_delAction
;
137 QAction
*m_selectAllAction
;
138 QAction
*m_findAction
;
139 QAction
*m_gotoAction
;
140 QAction
*m_fullscreenAction
;
141 QAction
*m_settingsAction
;
142 QAction
*m_pluginViewAction
;
143 QAction
*m_aboutAction
;
144 QAction
*m_aboutQtAction
;
146 };/* class MainWindow */
148 } /* namespace Core */
150 #endif // MAIN_WINDOW_H