QCAD
Open Source 2D CAD
RPluginInterface.h
Go to the documentation of this file.
1 
20 #ifndef RPLUGININTERFACE_H
21 #define RPLUGININTERFACE_H
22 
23 #include "core_global.h"
24 
25 #include <QtPlugin>
26 #include <QMetaType>
27 
28 #include "RPluginInfo.h"
29 
30 class QString;
31 class QScriptEngine;
32 
40 public:
41  enum InitStatus {
49  AllDone
50  };
51 
52 public:
53  virtual ~RPluginInterface() {}
54 
60  virtual bool init() = 0;
61 
65  virtual void uninit(bool remove = false) = 0;
66 
72  virtual void postInit(RPluginInterface::InitStatus status) = 0;
73 
81  virtual void initScriptExtensions(QScriptEngine& engine) = 0;
82 
88  virtual void initTranslations() = 0;
89 
100  virtual RPluginInfo getPluginInfo() = 0;
101 
105  virtual bool checkLicense() = 0;
106 };
107 
108 QT_BEGIN_NAMESPACE
109 Q_DECLARE_INTERFACE(RPluginInterface, "org.qcad.QCAD.RPluginInterface/1.0")
110 QT_END_NAMESPACE
111 
115 
116 #endif
RPluginInterface::LoadedFiles
@ LoadedFiles
Loaded files given on command line.
Definition: RPluginInterface.h:47
RPluginInterface::InitStatus
InitStatus
Definition: RPluginInterface.h:41
RPluginInterface
Interface for all C++ QCAD plugins.
Definition: RPluginInterface.h:39
RPluginInterface::getPluginInfo
virtual RPluginInfo getPluginInfo()=0
RPluginInfo.h
RPluginInterface::init
virtual bool init()=0
Called immediately after the plugin has been loaded, directly after starting the application.
RPluginInterface::ScriptsExecuted
@ ScriptsExecuted
Executed scripts given on command line.
Definition: RPluginInterface.h:48
RPluginInterface::AddOnsInitialized
@ AddOnsInitialized
Add ons are initialized, actions created but not added to widgets.
Definition: RPluginInterface.h:43
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(RMath *)
RPluginInterface::GotMainWindow
@ GotMainWindow
Main window with all tools and menus has been created.
Definition: RPluginInterface.h:46
RPluginInterface::checkLicense
virtual bool checkLicense()=0
RPluginInfo
Information about a plugin.
Definition: RPluginInfo.h:42
RPluginInterface::initScriptExtensions
virtual void initScriptExtensions(QScriptEngine &engine)=0
Called whenever a new script engine is instantiated.
core_global.h
RPluginInterface::GotMainWindowBeforeShow
@ GotMainWindowBeforeShow
Main window created but not shown yet.
Definition: RPluginInterface.h:45
RPluginInterface::GotSplashWindow
@ GotSplashWindow
Splashscreen showing.
Definition: RPluginInterface.h:42
RPluginInterface::ActionsAdded
@ ActionsAdded
Actions have been added to widgets.
Definition: RPluginInterface.h:44
RPluginInterface::uninit
virtual void uninit(bool remove=false)=0
Called before a plugin is removed / unloaded.
RPluginInterface::postInit
virtual void postInit(RPluginInterface::InitStatus status)=0
Called after the application has been fully loaded, directly before entering the main event loop.
RPluginInterface::~RPluginInterface
virtual ~RPluginInterface()
Definition: RPluginInterface.h:53
RPluginInterface::initTranslations
virtual void initTranslations()=0
Called when the user chosen language changed.
QCADCORE_EXPORT
#define QCADCORE_EXPORT
Definition: core_global.h:10