RPluginInterface
Class in Core Module
Header: #include <src/core/RPluginInterface.h>
Inherited by: RDxfPlugin, RScriptsPlugin
Description
Section titled “Description”Interface for all C++ QCAD plugins.
Scriptable: This class is available in script environments.
Public Types
Section titled “Public Types”| enum | InitStatus { GotSplashWindow, AddOnsInitialized, ActionsAdded, GotMainWindowBeforeShow, GotMainWindow, LoadedFiles, ScriptsExecuted, AllDone } |
Public Functions
Section titled “Public Functions”| virtual | ~RPluginInterface() |
| virtual bool | checkLicense()=0 = 0 |
| virtual RPluginInfo | getPluginInfo()=0 = 0 |
| virtual bool | init()=0 = 0Called immediately after the plugin has been loaded, directly after starting the application. |
| virtual void | initScriptExtensions(QScriptEngine &engine)=0 = 0Called whenever a new script engine is instantiated. |
| virtual void | initTranslations()=0 = 0Called when the user chosen language changed. |
| virtual void | postInit(RPluginInterface::InitStatus status)=0 = 0Called after the application has been fully loaded, directly before entering the main event loop. |
| virtual void | uninit(bool remove=false)=0 = 0Called before a plugin is removed / unloaded. |
Member Documentation
Section titled “Member Documentation”InitStatus
Section titled “InitStatus”enum InitStatus~RPluginInterface
Section titled “~RPluginInterface”virtual RPluginInterface::~RPluginInterface()virtual inline
checkLicense
Section titled “checkLicense”virtual bool RPluginInterface::checkLicense()=0 = 0pure virtual
Returns: True if the plugin license is valid.
Reimplemented in checkLicense, checkLicense.
getPluginInfo
Section titled “getPluginInfo”virtual RPluginInfo RPluginInterface::getPluginInfo()=0 = 0pure virtual
Returns: An RPluginInfo object with at least the following keys:
- ‘Version’ - Version string
- ‘Name’ - Plugin name
- ‘Description’ - Longer description of the plugin
- ‘License’ - Licensing information (e.g. ‘GPLv3’, ‘proprietary’, …)
- ‘URL’ - URL where more information about the plugin can be found
This is typically used by an about dialog or debugging / developer tools.
Reimplemented in getPluginInfo, getPluginInfo.
virtual bool RPluginInterface::init()=0 = 0pure virtual
Called immediately after the plugin has been loaded, directly after starting the application.
Implementations typically perform plugin initialization, registration of file importers, exporter, etc.
initScriptExtensions
Section titled “initScriptExtensions”virtual void RPluginInterface::initScriptExtensions(QScriptEngine &engine)=0 = 0pure virtual
Called whenever a new script engine is instantiated.
Implementations may register their own script extensions by making C / C++ code scriptable.
Non-Scriptable: This function is not available in script environments.
Reimplemented in initScriptExtensions, initScriptExtensions.
initTranslations
Section titled “initTranslations”virtual void RPluginInterface::initTranslations()=0 = 0pure virtual
Called when the user chosen language changed.
Non-Scriptable: This function is not available in script environments.
Reimplemented in initTranslations, initTranslations.
postInit
Section titled “postInit”virtual void RPluginInterface::postInit(RPluginInterface::InitStatus status)=0 = 0pure virtual
Called after the application has been fully loaded, directly before entering the main event loop.
Implementations typically perform initialization that depends on the application being up and running.
Reimplemented in postInit, postInit.
uninit
Section titled “uninit”virtual void RPluginInterface::uninit(bool remove=false)=0 = 0pure virtual
Called before a plugin is removed / unloaded.