Fix game:addSpawnShapesByZone
[ryzomcore.git] / studio / src / plugins / core / core.cpp
blob60cd08cb7574eb29b589f8860e5fec47a444101d
1 // Object Viewer Qt - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
2 // Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) <dnk-88@tut.by>
3 //
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>
7 //
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/>.
21 #include "core.h"
22 #include "context_manager.h"
23 #include "main_window.h"
24 #include "../../extension_system/iplugin_manager.h"
26 static Core::CoreImpl *m_coreInstance = 0;
28 namespace Core
31 ICore *ICore::instance()
33 return m_coreInstance;
36 CoreImpl::CoreImpl(MainWindow *mainWindow)
38 m_mainWindow = mainWindow;
39 m_coreInstance = this;
42 CoreImpl::~CoreImpl()
44 m_coreInstance = 0;
47 bool CoreImpl::showOptionsDialog(const QString &group,
48 const QString &page,
49 QWidget *parent)
51 return m_mainWindow->showOptionsDialog(group, page, parent);
54 MenuManager *CoreImpl::menuManager() const
56 return m_mainWindow->menuManager();
59 ContextManager *CoreImpl::contextManager() const
61 return m_mainWindow->contextManager();
64 QSettings *CoreImpl::settings() const
66 return m_mainWindow->settings();
69 QMainWindow *CoreImpl::mainWindow() const
71 return m_mainWindow;
74 ExtensionSystem::IPluginManager *CoreImpl::pluginManager() const
76 return m_mainWindow->pluginManager();
79 } // namespace Core