1 #ifndef OBJECT_VIEWER_PLUGIN_H
2 #define OBJECT_VIEWER_PLUGIN_H
5 #include "../../extension_system/iplugin.h"
6 #include "../core/icontext.h"
9 #include "nel/misc/app_context.h"
12 #include <QtCore/QObject>
13 #include <QtGui/QIcon>
17 class CLibraryContext
;
20 namespace ExtensionSystem
28 class ObjectViewerPlugin
: public QObject
, public ExtensionSystem::IPlugin
31 Q_INTERFACES(ExtensionSystem::IPlugin
)
34 virtual ~ObjectViewerPlugin();
36 bool initialize(ExtensionSystem::IPluginManager
*pluginManager
, QString
*errorString
);
37 void extensionsInitialized();
39 void setNelContext(NLMISC::INelContext
*nelContext
);
41 void addAutoReleasedObject(QObject
*obj
);
44 NLMISC::CLibraryContext
*_LibContext
;
47 ExtensionSystem::IPluginManager
*_plugMan
;
48 QList
<QObject
*> _autoReleaseObjects
;
51 class CObjectViewerContext
: public Core::IContext
55 CObjectViewerContext(QObject
*parent
= 0): IContext(parent
) {}
56 virtual ~CObjectViewerContext() {}
58 virtual QString
id() const
60 return QLatin1String("ObjectViewer");
63 virtual QString
trName() const
65 return tr("Object Viewer");
68 virtual QIcon
icon() const
70 return QIcon(":/icons/ic_nel_pill.png");
73 virtual QUndoStack
*undoStack();
77 virtual QWidget
*widget();
82 #endif // OBJECT_VIEWER_PLUGIN_H