RPluginLoader
Class in Core Module
Header: #include <src/core/RPluginLoader.h>
Description
Section titled “Description”All rights reserved.
This file is part of the QCAD project.
QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with QCAD. Loads and registers plugins.
Scriptable: This class is available in script environments.
Static Public Functions
Section titled “Static Public Functions”| static bool | checkPluginLicense(QObject *plugin) |
| static bool | checkPluginLicenses() |
| static int | countPlugins() |
| static QStringList | getPluginFiles() |
| static RPluginInfo | getPluginInfo(const QString &id) |
| static RPluginInfo | getPluginInfo(int i) |
| static QString | getPluginsPath() |
| static QString | getPluginSuffix() |
| static bool | hasPlugin(const QString &id) |
| static void | initScriptExtensions(QObject *plugin, QScriptEngine &engine) |
| static void | initScriptExtensions(QScriptEngine &engine) |
| static void | initTranslations() |
| static void | initTranslations(QObject *plugin) |
| static void | loadPlugin(QObject *plugin, bool init, const QString &fileName=QString(), const QString &errorString=QString()) |
| static void | loadPlugins(bool init)Tries to loads all QCAD plugins located in . |
| static void | postInitPlugin(QObject *plugin, RPluginInterface::InitStatus status) |
| static void | postInitPlugins(RPluginInterface::InitStatus status) |
| static void | unloadPlugin(const QString &fileName, bool remove=false) |
| static void | unloadPlugin(QObject *plugin, bool remove=false) |
| static void | unloadPlugins() |
Static Private Functions
Section titled “Static Private Functions”| static QList< QObject * > | getPluginObjects() |
Static Private Attributes
Section titled “Static Private Attributes”| static QStringList | pluginFiles |
| static QList< QObject * > | plugins Instances of the dynamically loaded plugins (see loadPlugins). |
| static QList< RPluginInfo > | pluginsInfo |
Member Documentation
Section titled “Member Documentation”checkPluginLicense
Section titled “checkPluginLicense”static bool RPluginLoader::checkPluginLicense(QObject *plugin)static
checkPluginLicenses
Section titled “checkPluginLicenses”static bool RPluginLoader::checkPluginLicenses()static
countPlugins
Section titled “countPlugins”static int RPluginLoader::countPlugins()static inline
getPluginFiles
Section titled “getPluginFiles”static QStringList RPluginLoader::getPluginFiles()static
getPluginInfo
Section titled “getPluginInfo”static RPluginInfo RPluginLoader::getPluginInfo(const QString &id)static
getPluginInfo
Section titled “getPluginInfo”static RPluginInfo RPluginLoader::getPluginInfo(int i)static
getPluginsPath
Section titled “getPluginsPath”static QString RPluginLoader::getPluginsPath()static
getPluginSuffix
Section titled “getPluginSuffix”static QString RPluginLoader::getPluginSuffix()static
hasPlugin
Section titled “hasPlugin”static bool RPluginLoader::hasPlugin(const QString &id)static
initScriptExtensions
Section titled “initScriptExtensions”static void RPluginLoader::initScriptExtensions(QObject *plugin, QScriptEngine &engine)static
Non-Scriptable: This function is not available in script environments.
initScriptExtensions
Section titled “initScriptExtensions”static void RPluginLoader::initScriptExtensions(QScriptEngine &engine)static
Non-Scriptable: This function is not available in script environments.
initTranslations
Section titled “initTranslations”static void RPluginLoader::initTranslations()static
initTranslations
Section titled “initTranslations”static void RPluginLoader::initTranslations(QObject *plugin)static
Non-Scriptable: This function is not available in script environments.
loadPlugin
Section titled “loadPlugin”static void RPluginLoader::loadPlugin(QObject *plugin, bool init, const QString &fileName=QString(), const QString &errorString=QString())static
loadPlugins
Section titled “loadPlugins”static void RPluginLoader::loadPlugins(bool init)static
Tries to loads all QCAD plugins located in .
/plugins.
postInitPlugin
Section titled “postInitPlugin”static void RPluginLoader::postInitPlugin(QObject *plugin, RPluginInterface::InitStatus status)static
Non-Scriptable: This function is not available in script environments.
postInitPlugins
Section titled “postInitPlugins”static void RPluginLoader::postInitPlugins(RPluginInterface::InitStatus status)static
unloadPlugin
Section titled “unloadPlugin”static void RPluginLoader::unloadPlugin(const QString &fileName, bool remove=false)static
unloadPlugin
Section titled “unloadPlugin”static void RPluginLoader::unloadPlugin(QObject *plugin, bool remove=false)static
unloadPlugins
Section titled “unloadPlugins”static void RPluginLoader::unloadPlugins()static
getPluginObjects
Section titled “getPluginObjects”static QList< QObject * > RPluginLoader::getPluginObjects()static private
Returns: The plugin objects loaded by loadPlugins (dynamically loaded plugins in load order, then the statically linked plugins).
pluginFiles
Section titled “pluginFiles”static QStringList RPluginLoader::pluginFilesstatic private
plugins
Section titled “plugins”static QList< QObject * > RPluginLoader::pluginsstatic private
Instances of the dynamically loaded plugins (see loadPlugins).
Used by postInitPlugins, initScriptExtensions and initTranslations instead of loading the plugins again by file name: a plugin file that has been removed from the plugins directory since the start (e.g. by a launcher script of another QCAD process that cleans the plugins directory) cannot be found by QPluginLoader anymore, although the plugin is loaded, and its script extensions would be missing in every script engine created later (document engines are created on demand).
pluginsInfo
Section titled “pluginsInfo”static QList< RPluginInfo > RPluginLoader::pluginsInfostatic private
All rights reserved.
This file is part of the QCAD project.
QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with QCAD.