Manages plugins and their associated functionality.
More...
#include <plugin_manager.h>
|
| VoidResult | loadPlugin (const QDir &pluginDir, const maki::Manifest &path, HostServices *services, PluginSettings::Status status) |
| | Loads a plugin from a directory and populates the menu, combo box, and services.
|
| bool | setPlugin (const QString &language) |
| | Sets the current plugin based on a language identifier.
|
| Result< maki::Manifest > | getPluginManifest (const QDir &path) const |
| | Retrieves the manifest of a plugin from a directory.
|
| VoidResult | loadPluginLibraryDir (const maki::Manifest &manifest) |
| | Loads a plugin library directory.
|
| VoidResult | installPlugin (const maki::Manifest &manifest) |
| | Run the plugin installation steps.
|
| int | getPluginIndex (const QString &pluginName) const |
| | Retrieves the index of a plugin in the manager's list by name.
|
| VoidResult | deregisterPlugin (const Plugin &plugin) |
| | Deregisters a plugin from the manager and updates the menu and combo box.
|
|
|
QVector< Plugin > | mPlugins |
| | Pointer to the currently selected plugin.
|
|
maki::PipelineActionRegistry * | mRegistry |
| | List of all plugins managed by this manager.
|
|
Pipeline * | mPipeline |
| | Holds information regarding the current generation pipeline.
|
|
QString | mProgressId |
| | Pipeline responsible for installation processes.
|
|
bool | mIsRunning |
| | Holds the id of the progress widget.
|
Manages plugins and their associated functionality.
◆ PluginManager()
Constructs a new PluginManager object.
- Parameters
-
| parent | The parent QObject. |
◆ currentPlugin()
| maki::IPlugin * PluginManager::currentPlugin |
( |
| ) |
const |
Retrieves the currently selected plugin.
- Returns
- The current maki::IPlugin pointer.
◆ deregisterPlugin()
| VoidResult PluginManager::deregisterPlugin |
( |
const Plugin & | plugin | ) |
|
|
private |
Deregisters a plugin from the manager and updates the menu and combo box.
- Parameters
-
| plugin | The Plugin object to deregister. |
| menu | The QMenu to update. |
| comboBox | The QComboBox to update. |
◆ getPluginIndex()
| int PluginManager::getPluginIndex |
( |
const QString & | pluginName | ) |
const |
|
private |
Retrieves the index of a plugin in the manager's list by name.
- Parameters
-
| pluginName | The name of the plugin to find. |
- Returns
- The index of the plugin if found; -1 otherwise.
◆ getPluginManifest()
| Result< maki::Manifest > PluginManager::getPluginManifest |
( |
const QDir & | path | ) |
const |
|
private |
Retrieves the manifest of a plugin from a directory.
- Parameters
-
| path | The QDir object representing the plugin directory. |
- Returns
- A Result<Manifest> containing the manifest or an error if not found.
◆ installPlugin()
| VoidResult PluginManager::installPlugin |
( |
const maki::Manifest & | manifest | ) |
|
|
private |
Run the plugin installation steps.
- Parameters
-
| manifest | The Manifest object containing the plugin information. |
- Returns
- A VoidResult indicating success or failure.
◆ loadPlugin()
Loads a plugin from a directory and populates the menu, combo box, and services.
- Parameters
-
| pluginDir | The QDir object representing the plugin directory. |
| path | The Manifest object containing the plugin information. |
| menu | The QMenu to populate with plugins. |
| comboBox | The QComboBox to populate with plugin options. |
| services | The HostServices object for plugin interaction. |
- Returns
- A VoidResult indicating success or failure.
◆ loadPluginLibraryDir()
| VoidResult PluginManager::loadPluginLibraryDir |
( |
const maki::Manifest & | manifest | ) |
|
|
private |
Loads a plugin library directory.
- Parameters
-
| manifest | The Manifest object containing the plugin information. |
- Returns
- A VoidResult indicating success or failure.
◆ pluginByLanguage()
| maki::IPlugin * PluginManager::pluginByLanguage |
( |
const QString & | language | ) |
const |
Retrieves a plugin by its language.
- Parameters
-
| language | The language of the plugin to retrieve. |
- Returns
- The corresponding maki::IPlugin pointer, or nullptr if not found.
◆ reloadPlugin()
| VoidResult PluginManager::reloadPlugin |
( |
const QString & | pluginName, |
|
|
HostServices * | services ) |
Reloads a given plugin.
- Parameters
-
| pluginName | The name of the plugin to be reloaded. |
| menu | The QMenu to populate with plugins. |
| comboBox | The QComboBox to populate with plugin options. |
| services | The HostServices object for plugin interaction. |
- Returns
- A VoidResult indicating success or failure.
◆ setPlugin()
| bool PluginManager::setPlugin |
( |
const QString & | language | ) |
|
|
private |
Sets the current plugin based on a language identifier.
- Parameters
-
| language | The language identifier for the plugin to set. |
- Returns
- true if the plugin was successfully set, false otherwise.
◆ start()
Starts the plugin manager and populates the menu, combo box, and services.
- Parameters
-
| menu | The QMenu to populate with plugins. |
| comboBox | The QComboBox to populate with plugin options. |
| services | The HostServices object for plugin interaction. |
- Returns
- A VoidResult indicating success or failure.
The documentation for this class was generated from the following files:
- /__w/maki/maki/app/system/plugin_manager.h
- /__w/maki/maki/app/system/plugin_manager.cpp