|
lmms
Cross-platform music production software
|
#include <Plugin.h>
Classes | |
| struct | Descriptor |
Public Types | |
| enum class | Type { Instrument , Effect , ImportFilter , ExportFilter , Tool , Library , Other , Undefined = 255 } |
| using | DescriptorList = QList<Descriptor*> |
Public Member Functions | |
| Plugin (const Descriptor *descriptor, Model *parent, const Descriptor::SubPluginFeatures::Key *key=nullptr) | |
| Constructor of a plugin. | |
| ~Plugin () override=default | |
| QString | displayName () const override |
| Return display-name out of sub plugin or descriptor. | |
| const PixmapLoader * | logo () const |
| Return logo out of sub plugin or descriptor. | |
| Type | type () const |
| Return plugin type. | |
| const Descriptor * | descriptor () const |
| Return plugin Descriptor. | |
| const Descriptor::SubPluginFeatures::Key & | key () const |
| virtual void | loadFile (const QString &file) |
| gui::PluginView * | createView (QWidget *parent) |
| Create a view for the model. | |
| Public Member Functions inherited from lmms::Model | |
| Model (Model *parent, QString displayName=QString(), bool defaultConstructed=false) | |
| ~Model () override=default | |
| bool | isDefaultConstructed () const |
| Model * | parentModel () const |
| virtual void | setDisplayName (const QString &displayName) |
| virtual QString | fullDisplayName () const |
| Public Member Functions inherited from lmms::JournallingObject | |
| JournallingObject () | |
| ~JournallingObject () override | |
| jo_id_t | id () const |
| void | saveJournallingState (const bool newState) |
| void | restoreJournallingState () |
| void | addJournalCheckPoint () |
| QDomElement | saveState (QDomDocument &_doc, QDomElement &_parent) override |
| void | restoreState (const QDomElement &_this) override |
| bool | isJournalling () const |
| void | setJournalling (const bool _sr) |
| bool | testAndSetJournalling (const bool newState) |
| bool | isJournallingStateStackEmpty () const |
| Public Member Functions inherited from lmms::SerializingObject | |
| SerializingObject () | |
| virtual | ~SerializingObject () |
| virtual QString | nodeName () const =0 |
| void | setHook (SerializingObjectHook *_hook) |
| SerializingObjectHook * | hook () |
Static Public Member Functions | |
| static Plugin * | instantiateWithKey (const QString &pluginName, Model *parent, const Descriptor::SubPluginFeatures::Key *key, bool keyFromDnd=false) |
| static Plugin * | instantiate (const QString &pluginName, Model *parent, void *data) |
Protected Member Functions | |
| virtual gui::PluginView * | instantiateView (QWidget *)=0 |
| Create a view for the model. | |
| void | collectErrorForUI (QString errMsg) |
| Protected Member Functions inherited from lmms::JournallingObject | |
| void | changeID (jo_id_t _id) |
| Protected Member Functions inherited from lmms::SerializingObject | |
| virtual void | saveSettings (QDomDocument &doc, QDomElement &element)=0 |
| virtual void | loadSettings (const QDomElement &element)=0 |
Private Types | |
| using | InstantiationHook = Plugin* (*)(Model*, void*) |
Private Attributes | |
| const Descriptor * | m_descriptor |
| Descriptor::SubPluginFeatures::Key | m_key |
Additional Inherited Members | |
| Signals inherited from lmms::Model | |
| void | dataChanged () |
| void | dataUnchanged () |
| void | propertiesChanged () |
Abstract representation of a plugin
Such a plugin can be an Instrument, Effect, Tool plugin etc.
Plugins have descriptors, containing meta info, which is used especially by PluginFactory and friends.
There are also Plugin keys (class Key, confusingly under SubPluginFeatures), which contain pointers to the plugin descriptor.
Some plugins have sub plugins, e.g. there is one CALF Plugin and for each CALF effect, there is a CALF sub plugin. For those plugins, there are keys for each sub plugin. These keys also link to the superior Plugin::Descriptor. Additionally, they contain attributes that help the superior Plugin saving them and recognizing them when loading.
In case of sub plugins, the Descriptor has SubPluginFeatures. Those are a bit like values to the sub plugins' keys (in terms of a key-value- map).
| using lmms::Plugin::DescriptorList = QList<Descriptor*> |
|
private |
|
strong |
| lmms::Plugin::Plugin | ( | const Descriptor * | descriptor, |
| Model * | parent, | ||
| const Descriptor::SubPluginFeatures::Key * | key = nullptr ) |
Constructor of a plugin.
| descriptor | The plugin Descriptor |
| parent | The parent Model |
| key | Sub plugins must pass a key here, optional otherwise. See the key() function |
|
overridedefault |
|
protected |
| gui::PluginView * lmms::Plugin::createView | ( | QWidget * | parent | ) |
Create a view for the model.
|
inline |
Return plugin Descriptor.
|
overridevirtual |
Return display-name out of sub plugin or descriptor.
Reimplemented from lmms::Model.
|
static |
Return an instance of a plugin whose name matches to given one.
If specified plugin couldn't be loaded, it creates a dummy-plugin.
| pluginName | The name of the desired plugin to search for |
| parent | The parent Model |
| data | Anything the plugin expects. If this is a pointer to a sub plugin key, use instantiateWithKey instead |
|
protectedpure virtual |
Create a view for the model.
Implemented in lmms::AudioFileProcessor, lmms::BitInvader, lmms::CarlaInstrument, lmms::DummyInstrument, lmms::DummyPlugin, lmms::Effect, lmms::FreeBoyInstrument, lmms::GigInstrument, lmms::HydrogenImport, lmms::KickerInstrument, lmms::LadspaBrowser, lmms::Lb302Synth, lmms::Lv2Instrument, lmms::MalletsInstrument, lmms::MidiExport, lmms::MidiImport, lmms::MonstroInstrument, lmms::NesInstrument, lmms::OpulenzInstrument, lmms::OrganicInstrument, lmms::PatmanInstrument, lmms::Sf2Instrument, lmms::SfxrInstrument, lmms::SidInstrument, lmms::SlicerT, lmms::TapTempo, lmms::TripleOscillator, lmms::VestigeInstrument, lmms::Vibed, lmms::WatsynInstrument, lmms::Xpressive, and lmms::ZynAddSubFxInstrument.
|
static |
Overload if the argument passed to the plugin is a subPluginKey If you can not pass the key and are aware that it's stored in Engine::pickDndPluginKey(), use this function, too
|
inline |
Return the key referencing this plugin. If the Plugin has no sub plugin features, the key is pretty useless. If it has, this key will also contain the sub plugin attributes, and will be a key to those SubPluginFeatures.
|
virtual |
Can be called if a file matching supportedFileTypes should be loaded/processed with the help of this plugin
Reimplemented in lmms::AudioFileProcessor, lmms::GigInstrument, lmms::Lv2Instrument, lmms::OpulenzInstrument, lmms::PatmanInstrument, lmms::Sf2Instrument, lmms::SlicerT, lmms::VestigeInstrument, and lmms::ZynAddSubFxInstrument.
| const PixmapLoader * lmms::Plugin::logo | ( | ) | const |
Return logo out of sub plugin or descriptor.
|
inline |
Return plugin type.
|
private |
|
private |