Linux multi-monitor fullscreen support
[ryzomcore.git] / studio / src / plugins / zone_painter / zone_painter_plugin.h
bloba3def41baca3f1cb11c60fdc796a254006e2f87a
1 #ifndef ZONE_PAINTER_PLUGIN_H
2 #define ZONE_PAINTER_PLUGIN_H
4 // Project includes
5 #include "../../extension_system/iplugin.h"
6 #include "../core/icontext.h"
7 #include "zone_painter_main_window.h"
9 // NeL includes
10 #include <nel/misc/app_context.h>
11 #include <nel/misc/singleton.h>
12 #include <nel/3d/landscape.h>
13 #include <nel/3d/patch.h>
14 #include <nel/3d/zone.h>
15 #include <nel/3d/u_scene.h>
17 // Qt includes
18 #include <QtCore/QObject>
19 #include <QtGui/QIcon>
21 namespace NLMISC
23 class CLibraryContext;
26 namespace ExtensionSystem
28 class IPluginSpec;
31 namespace Plugin
34 /* class CZoneManager
36 NLMISC_SAFE_SINGLETON_DECL(CZoneManager)
37 public:
38 //m_painterLandscape = static_cast<NL3D::CLandscapeModel *>
40 private:
41 NL3D::CLandscapeModel *m_painterLandscape;
42 NL3D::CZone *m_currentZone;
45 class ZonePainterPlugin : public QObject, public ExtensionSystem::IPlugin
47 Q_OBJECT
48 Q_INTERFACES(ExtensionSystem::IPlugin)
49 public:
51 virtual ~ZonePainterPlugin();
53 bool initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString);
54 void extensionsInitialized();
55 void setNelContext(NLMISC::INelContext *nelContext);
57 void addAutoReleasedObject(QObject *obj);
59 public Q_SLOTS:
60 void clickLoadZoneAction();
61 void clickSaveZoneAction();
62 protected:
63 NLMISC::CLibraryContext *m_LibContext;
65 private:
66 ExtensionSystem::IPluginManager *m_plugMan;
67 QList<QObject *> m_autoReleaseObjects;
69 NL3D::CLandscapeModel *m_Landscape;
72 class CZonePainterContext: public Core::IContext
74 Q_OBJECT
75 public:
76 CZonePainterContext(QObject *parent = 0): IContext(parent)
78 m_zonePainterMainWindow = new ZonePainterMainWindow();
80 virtual ~CZonePainterContext() {}
82 virtual QString id() const
84 return QLatin1String("ZonePainterContext");
86 virtual QString trName() const
88 return tr("Zone Painter");
90 virtual QIcon icon() const
92 return QIcon();
94 virtual QWidget *widget()
96 return m_zonePainterMainWindow;
99 virtual QUndoStack *undoStack()
101 return m_zonePainterMainWindow->getUndoStack();
103 virtual void open()
108 ZonePainterMainWindow *m_zonePainterMainWindow;
111 } // namespace Plugin
113 #endif // ZONE_PAINTER_PLUGIN_H