Fix game:addSpawnShapesByZone
[ryzomcore.git] / studio / src / plugins / core / core_plugin.h
blobaeddb967bd9308eb87ed51bc790384b483829e4c
1 // Object Viewer Qt - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
2 // Copyright (C) 2010 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 #ifndef CORE_PLUGIN_H
22 #define CORE_PLUGIN_H
24 #include "../../extension_system/iplugin.h"
25 #include "main_window.h"
27 #include "nel/misc/app_context.h"
29 #include <QtCore/QObject>
31 namespace NLMISC
33 class CLibraryContext;
36 namespace ExtensionSystem
38 class IPluginSpec;
41 namespace Core
44 class CorePlugin : public QObject, public ExtensionSystem::IPlugin
46 Q_OBJECT
47 Q_INTERFACES(ExtensionSystem::IPlugin)
48 public:
50 CorePlugin();
51 virtual ~CorePlugin();
53 bool initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString);
54 void extensionsInitialized();
55 void shutdown();
57 void setNelContext(NLMISC::INelContext *nelContext);
59 void addAutoReleasedObject(QObject *obj);
61 ExtensionSystem::IPluginManager *pluginManager() const
63 return m_plugMan;
66 protected:
67 NLMISC::CLibraryContext *m_libContext;
69 private:
70 ExtensionSystem::IPluginManager *m_plugMan;
71 MainWindow *m_mainWindow;
72 QList<QObject *> m_autoReleaseObjects;
75 } // namespace Core
77 #endif // CORE_PLUGIN_H