Radium Engine  1.5.20
Loading...
Searching...
No Matches
RadiumPluginInterface.hpp
1#pragma once
2
3#include <memory>
4#include <vector>
5
6#include <QObject>
7#include <QtPlugin>
8
9#include <PluginBase/PluginContext.hpp> // do not use forward declaration to ease usage in Plugin
10
11class QWidget;
12class QMenu;
13class QAction;
14class QOpenGLContext;
15class QString;
16
17namespace Ra {
18
19namespace Engine {
20namespace Rendering {
21class Renderer;
22}
23} // namespace Engine
24
25namespace Core {
26namespace Asset {
27class FileLoaderInterface;
28}
29} // namespace Core
30
31namespace Plugins {
73{
74
75 public:
76 virtual ~RadiumPluginInterface() {}
77
85 virtual void registerPlugin( const Context& context ) = 0;
86
94 virtual bool doAddWidget( QString& name ) = 0;
95
103 virtual QWidget* getWidget() = 0;
104
110 virtual bool doAddMenu() = 0;
111
117 virtual QMenu* getMenu() = 0;
118
125 virtual bool doAddAction( int& nb ) = 0;
126
133 virtual QAction* getAction( int id ) = 0;
134
139 virtual bool doAddRenderer() { return false; }
140
148 virtual void addRenderers(
150
155 virtual bool doAddFileLoader() { return false; }
156
163
184 virtual void openGlInitialize( [[maybe_unused]] const Context& context ) {}
185
191 virtual bool doAddROpenGLInitializer() { return false; }
192};
193} // namespace Plugins
194} // namespace Ra
195
196#define RadiumPluginInterface_IID "RadiumEngine.PluginInterface"
197Q_DECLARE_INTERFACE( Ra::Plugins::RadiumPluginInterface, RadiumPluginInterface_IID )
Data passed to the plugin constructor.
Interface class for Radiums plugins.
virtual void registerPlugin(const Context &context)=0
Pass arguments for plugin initialization. This method must create and register all the services that ...
virtual void addRenderers(std::vector< std::shared_ptr< Ra::Engine::Rendering::Renderer > > *rds)
addRenderers
virtual QAction * getAction(int id)=0
Returns the action to be added to the ui and then returns it.
virtual QMenu * getMenu()=0
Creates to menu to be added to the ui and then returns it.
virtual QWidget * getWidget()=0
Creates the widget to be added to the ui and then returns it. If connections are needed (between plug...
virtual bool doAddWidget(QString &name)=0
Tells wether the plugin wants to add a widget (inside the UI tab widget) or not. If it does,...
virtual void addFileLoaders(std::vector< std::shared_ptr< Core::Asset::FileLoaderInterface > > *fl)
virtual bool doAddMenu()=0
Tells wether the plugin wants to add a menu or not. If it does, getMenu() will be called.
virtual void openGlInitialize(const Context &context)
openGlInitialize
virtual bool doAddAction(int &nb)=0
Tells wether the plugin wants to add actions or not. If it does, getAction() will be called for each ...
hepler function to manage enum as underlying types in VariableSet
Definition Cage.cpp:3