Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::plugins::PluginScanManager Class Referencefinal

Scans for plugins and manages the scanning process. More...

#include <src/plugins/plugin_scan_manager.h>

Inheritance diagram for zrythm::plugins::PluginScanManager:
Collaboration diagram for zrythm::plugins::PluginScanManager:

Public Member Functions

 PluginScanManager (std::shared_ptr< juce::KnownPluginList > known_plugins, std::shared_ptr< juce::AudioPluginFormatManager > format_manager, ProtocolPluginPathsProvider plugin_paths_provider, QObject *parent=nullptr)
 Constructs a PluginScanManager object.
Q_INVOKABLE void requestStop ()
 Request the worker thread to stop gracefully.
Q_INVOKABLE void beginScan ()
 To be called by QML to begin scanning.
QString getCurrentlyScanningPlugin () const
 Get the currently scanning plugin (property accessor).
Q_SIGNAL void scanningFinished ()
 Emitted after the scan has finished and after this instance has been moved to the main thread.
Q_SIGNAL void currentlyScanningPluginChanged (const QString &plugin)
 Emitted from the scan thread (not the main thread) when a new (not known) plugin is added to the list.

Properties

QML_ELEMENT QString currentlyScanningPlugin

Friends

class scanner_private::Worker

Detailed Description

Scans for plugins and manages the scanning process.

The PluginScanManager class is responsible for scanning the system for available plugins and managing the scanning process. It uses a worker thread to perform the actual scanning, in order to avoid blocking the main thread.

The PluginScanManager class provides a QML-friendly API for initiating the scanning process and retrieving information about the currently scanning plugin. It also emits signals to notify the rest of the application when the scanning process has finished and when new plugins have been discovered.

The PluginScanManager class is designed to be used in a Qt/QML-based application, and it uses the Qt threading and signal/slot mechanisms to manage the scanning process.

Definition at line 127 of file plugin_scan_manager.h.

Constructor & Destructor Documentation

◆ PluginScanManager()

zrythm::plugins::PluginScanManager::PluginScanManager ( std::shared_ptr< juce::KnownPluginList > known_plugins,
std::shared_ptr< juce::AudioPluginFormatManager > format_manager,
ProtocolPluginPathsProvider plugin_paths_provider,
QObject * parent = nullptr )
explicit

Constructs a PluginScanManager object.

Parameters
known_pluginsA shared pointer to a juce::KnownPluginList containing previously discovered plugins. A scanner must already be set to it (eg, via setCustomScanner()).
parentThe parent QObject for memory management (optional, defaults to nullptr).

This constructor initializes a PluginScanManager with a list of known plugins.

Member Function Documentation

◆ currentlyScanningPluginChanged()

Q_SIGNAL void zrythm::plugins::PluginScanManager::currentlyScanningPluginChanged ( const QString & plugin)

Emitted from the scan thread (not the main thread) when a new (not known) plugin is added to the list.

Note
Currently unused.

Connected to by PluginManager to relay the signal.

Warning
Do not use directly in other places.

◆ scanner_private::Worker

friend class scanner_private::Worker
friend

Definition at line 162 of file plugin_scan_manager.h.

Property Documentation

◆ currentlyScanningPlugin

QML_ELEMENT QString zrythm::plugins::PluginScanManager::currentlyScanningPlugin
read

Definition at line 131 of file plugin_scan_manager.h.


The documentation for this class was generated from the following file: