Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
a1b3558
Allow sub plugins for instruments aswell
JohannesLorenz Dec 27, 2018
4d64c42
Fix Engine.cpp not compiling on some compilers
JohannesLorenz Dec 27, 2018
fcd1a7e
Fix or remove wrong or useless debug printfs
JohannesLorenz Dec 27, 2018
f3b2383
Fix missing IntrumentTrack header
JohannesLorenz Dec 27, 2018
a2b123e
Merge pull request #2 from LMMS/master
LostRobotMusic Jan 3, 2019
d5dcebe
Use QString for SubPluginFeatures' virtuals
JohannesLorenz Jan 18, 2019
31dc8e1
Test deployment preparation in regular builds (#4847)
jasp00 Feb 25, 2019
e34f75a
Add needed macOS shortcuts (#4851)
tresf Feb 25, 2019
ad1fa16
Move apt_mingw_cache out of build directory (#4842)
jasp00 Feb 25, 2019
a233291
Add missing include
lukas-w Feb 27, 2019
05d5e20
Fix DrumSynth sscanf (#4869)
M374LX Mar 3, 2019
0e77947
Fix failing build due to missing include
michaelgregorius Mar 3, 2019
e54969c
Add /sbin to AppImage search path
tresf Mar 5, 2019
009a451
Fix AudioFileProcessor tooltip (#4868)
M374LX Mar 5, 2019
991ffcd
Disable soundio on macOS
tresf Mar 5, 2019
9e6ce06
Blacklist $HOME as VST directory
tresf Mar 7, 2019
cdd1ddb
Sync Debian version (#4840)
jasp00 Mar 7, 2019
6b19455
Install 32-bit RemoteVstPlugin to a separate directory (#4797)
Mar 7, 2019
9ea2611
Fix loading 32bit VSTs on Linux
PhysSong Mar 9, 2019
6b23e64
Merge pull request #3 from LMMS/master
LostRobotMusic Mar 9, 2019
9148ce1
Fix loading 32bit VSTs when loading LMMS in the build directory
PhysSong Mar 10, 2019
17e87c1
Fix MidiJack crash on exit
lukas-w Mar 10, 2019
2a72808
Fix #3926: QCursor in AFP
michaelgregorius Mar 3, 2019
9a91848
Fix CONTRIBUTORS override
PhysSong Mar 11, 2019
9280568
Debian integration: update build dependencies
PhysSong Mar 11, 2019
97502a1
Debian: don't bundle CALF LADSPA library separately anymore
PhysSong Mar 11, 2019
af40c76
Better Wine detection and support
PhysSong Mar 11, 2019
8c4514f
Check if winegcc works before building RemoteVstPlugin
PhysSong Mar 11, 2019
ae4e40d
Modify VST build systems to make debian integration work correctly
PhysSong Mar 11, 2019
5eb6b13
Allow creating AppImages on systems newer than linuxdeployqt official…
PhysSong Mar 11, 2019
61c3f87
Support FX Mixer for sample tracks and add controls to sample track w…
PhysSong Mar 11, 2019
04768ee
Fix zyn pitch on project load/export
tresf Mar 11, 2019
37290ac
Add info about LadspaControls::m_noLink
JohannesLorenz Mar 11, 2019
97d5529
Fix compilation on Qt4
tresf Mar 12, 2019
295b899
Avoid shallow clones in all Debian sid builds (#4888)
jasp00 Mar 13, 2019
17f6235
Add VST always-on-top config option
DomClark Mar 3, 2019
6fef905
Ensure VST windows show properly in taskbar
DomClark Mar 3, 2019
205b575
Don't show error when loading empty VeSTige instance
DomClark Mar 3, 2019
3aeacca
Fix layout of VstSyncData struct
DomClark Mar 3, 2019
2d71d61
Rework after code reading
JohannesLorenz Mar 15, 2019
9aa997e
Allow TabWidget to be variable sized
JohannesLorenz Mar 16, 2019
dd43127
Allow instrument views to grow with contents
JohannesLorenz Mar 16, 2019
f8ba88d
Make instrument window's piano optional
JohannesLorenz Mar 16, 2019
5101aa0
Make Model class visitable
JohannesLorenz Mar 16, 2019
aac516e
Forbid copying the Knob class
JohannesLorenz Mar 16, 2019
7e75a82
Always instantiate at least a dummy plugin
JohannesLorenz Mar 16, 2019
7e7141f
Fix too small instrument tabs
JohannesLorenz Mar 17, 2019
4129be8
Add explenation for LadspaControls::m_noLink
JohannesLorenz Mar 17, 2019
ef6bac6
Merge branch 'misc-lv2-preparation'
JohannesLorenz Mar 17, 2019
0c3db10
Fix Blackman-Harris window formula (#4895)
he29-net Mar 17, 2019
dd6c18e
Automation Editor: Don't accept drag events when there's no pattern
lukas-w Mar 9, 2019
e1adfc3
TCO drag: Fix Ctrl+Drag crash
lukas-w Mar 1, 2019
7952416
Bump zyn submodule
tresf Mar 18, 2019
ea5cbe6
Allow new Zyn bank creation on Linux (#4905)
tresf Mar 18, 2019
f79c292
Fix empty editors after closing them and creating a new project (#4891)
necrashter Mar 19, 2019
1adf160
Make instrument window's piano optional
JohannesLorenz Mar 21, 2019
2061d6c
Merge branch 'master' into instr-sub-plugins
JohannesLorenz Mar 22, 2019
52d1f55
Remove useless include
JohannesLorenz Mar 22, 2019
3483581
Fix invalid display names
JohannesLorenz Mar 22, 2019
82cf453
Allow sub plugins for instruments aswell
JohannesLorenz Mar 22, 2019
032c324
Travis: use carla instead of carla-git
PhysSong Mar 25, 2019
7984bb9
Merge branch 'stable-1.2'
PhysSong Mar 26, 2019
f18efb4
Travis: fix shellcheck warnings for the Debian sid script
PhysSong Mar 26, 2019
4dce466
Remove some Qt4 compatibility code
PhysSong Mar 26, 2019
93ec816
SetupDialog: fix file dialog not opening for theme directory
PhysSong Mar 28, 2019
d52c220
Fix instrument window tab sizes
JohannesLorenz Mar 28, 2019
3ef33db
PluginBrowser: Tree layout and search bar
Mar 30, 2019
ac257f0
PluginBrowser: Tree layout and search bar (#4759)
JohannesLorenz Apr 3, 2019
82e3ba7
[Equalizer] Bright analyzer colors, opacity increased (#4772)
0xf0xx0 Apr 6, 2019
07dcea1
Replace Monstro icons
LostRobotMusic Apr 13, 2019
be31a55
Shrink ComboBox arrow section slightly
LostRobotMusic Apr 13, 2019
b3461e2
Merge pull request #4943 from RoxasKH/new-monstro-icons
LostRobotMusic Apr 13, 2019
271e20d
Merge pull request #4 from LMMS/master
LostRobotMusic Apr 14, 2019
91f9f1a
Don't try to connect to nonexistent controllers (#4939)
enp2s0 Apr 14, 2019
5a56969
Allow sample track TCOs to resize smaller than one bar (#4933)
Spekular Apr 15, 2019
5784dd6
Use local cursor for TrackContentObjectView (#4918)
Apr 15, 2019
96cc5e0
Add PluginIssue class (#4901)
JohannesLorenz Apr 17, 2019
d06f508
Move macro definition out of class
JohannesLorenz Apr 20, 2019
91099e2
Fix -1 offset in plugin tab
JohannesLorenz Apr 20, 2019
53942a1
Fix bad identation in old code
JohannesLorenz Apr 20, 2019
e1df16c
Coding conventions
JohannesLorenz Apr 20, 2019
407444e
FileBrowser: Backup expanded directories and restore that state when …
Apr 3, 2019
22fb650
Merge branch 'variable-tab-widget'
JohannesLorenz Apr 22, 2019
a685049
Allow build for Wayland w/o X11Extras, if VST off
nykula Apr 19, 2019
d537561
Document Effect::checkGate
JohannesLorenz Apr 22, 2019
7ae4e85
Document graph widget
JohannesLorenz Apr 22, 2019
b5e408d
Update wiki submodule
JohannesLorenz Apr 22, 2019
c80f0bf
Fix wiki submodule
PhysSong Apr 24, 2019
461facc
Fix notes getting stuck under high CPU conditions (#4908)
DomClark Apr 24, 2019
160d306
Record chords (#4938)
alxdttn Apr 24, 2019
ca9a956
Make more connections direct for automation (#4942)
DomClark Apr 26, 2019
0fd5693
Improve dcast
JohannesLorenz Apr 26, 2019
8d005e7
AutomatableModelTest: Improve tests
JohannesLorenz Apr 27, 2019
777da5e
Fix CI on windows
JohannesLorenz Apr 27, 2019
2c134d6
Code style + Extend for TempoSyncKnob
JohannesLorenz Apr 27, 2019
c9ed6fc
Merge pull request #4902 from JohannesLorenz/model-visitor
JohannesLorenz Apr 27, 2019
8bcdf06
Travis: fix a debootstrap error from missing keyrings
PhysSong Apr 29, 2019
32df2d7
Don't draw note detuning info over the volume/panning area (#4965)
PhysSong May 5, 2019
cb6b4ec
Show/Focus BBEditor on TrackLabelButton click #4946 (#4959)
May 5, 2019
8f4757e
Use extracted linuxdeployqt directly
PhysSong May 6, 2019
9ff882d
Fix invisible note editing handles when a note has detuning info
PhysSong May 6, 2019
6d7ce58
Merge branch 'stable-1.2'
PhysSong May 6, 2019
d54c79d
Fix the wrong merge
PhysSong May 6, 2019
3dcffbf
fix hanging mouse in piano roll (#4822) (#4960)
sharpblade4 May 6, 2019
b9503a8
Fix race conditions in NotePlayHandleManager (#4966)
PhysSong May 8, 2019
50796b2
Nescaline and Freeboy - Better default sound (#4968)
zonkmachine May 9, 2019
934ea6d
Fix controller loading error on loading projects
PhysSong May 9, 2019
4b4b470
Extend ProjectJournal docs, thx to @DomClark
JohannesLorenz May 13, 2019
ec64de0
Fixes #4781: Don't disconnect LADSPA automation on export
T0NIT0RMX May 14, 2019
28143e6
playing/recording pianoRoll's chord notes (#4963)
sharpblade4 May 24, 2019
fb1b18e
Merge pull request #4990 from sharpblade4/fix#4963_nextver
JohannesLorenz May 25, 2019
9c6e227
SampleTrack: call requestChangesInModel before unref SampleBuffer (#4…
Reflexe May 27, 2019
46c74d0
Making clearer the hierarchy. (#4967)
devnexen May 27, 2019
fad89d6
i18n: update translations from Transifex
liushuyu May 28, 2019
d683a51
Merge pull request #7 from LMMS/master
LostRobotMusic May 31, 2019
37f0c3f
SampleBuffer -> Use processingSampleRate.
Reflexe May 22, 2018
6d27f90
Bugfix - SampleTrack -> Load & Save: Fix recorded sample track not being
Reflexe Dec 16, 2017
665e503
Bugfix - SampleTrack -> Play: Fix sample track not being played in the
Reflexe Dec 16, 2017
359de20
i18n: update template strings
liushuyu Jun 6, 2019
c37228c
Travis: fix macOS build due to the old default version of Node.js
PhysSong Jun 6, 2019
47d6388
MP3 export: initialize ID3 tag with id3tag_init
PhysSong Jun 6, 2019
d194c70
updated splash (#5002)
RebeccaDeField Jun 7, 2019
6e5650c
Fixes #4996: Fix metadata when exporting multiple tracks (#5005)
JohannesLorenz Jun 7, 2019
457f2c6
Fix German translation
JohannesLorenz Jun 6, 2019
ca06b88
DMG rebranding (#5013)
tresf Jun 8, 2019
bfa8a4b
fix color profile error (#5019)
RebeccaDeField Jun 8, 2019
0fbaca4
Bump version to 1.2.0
PhysSong Jun 9, 2019
723a451
Add a save option to discard MIDI connections (#5021)
Reflexe Jun 9, 2019
df79f8c
Enable dark title bar on macOS
tresf Jun 12, 2019
4cb243b
Travis: drop unneeded prefix setting for npm
PhysSong Jun 12, 2019
12ea80d
Merge branch 'stable-1.2'
PhysSong Jun 12, 2019
f141ae6
Fix macOS builds
PhysSong Jun 12, 2019
499d425
Increase Mixer fader falloff speed
LostRobotMusic Jun 15, 2019
5431cc7
Replace tLimit() with qBound() and remove templates.h (#5040)
husamalhomsi Jun 15, 2019
2547098
Merge pull request #5038 from DouglasDGI/better-fx-mixer
LostRobotMusic Jun 22, 2019
a0c2a62
Add .editorconfig
JohannesLorenz Jun 16, 2019
7834e10
FadeButtons now remain partially lit as a note plays out (#4969)
enp2s0 Jun 25, 2019
68cb917
MDI Subwindow Decoration for VeSTige instruments closes #2824 (#2826)
BaraMGB Jun 26, 2019
d766b87
Drop sample on sampletracks (#5043)
BaraMGB Jun 28, 2019
59e186d
Closes #5050: Add Mixer threading comments (#5069)
JohannesLorenz Jul 11, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Allow sub plugins for instruments aswell
* Move m_key member of Effect into Plugin
* Pass key to Instrument ctors and instantiaters
* Add pluginKeys to all plugin selector widgets, and let them pass the keys
  when instantiating the instruments; or, if the keys must be passed over
  threads, pass the keys to the Engine using `Engine::setDndPluginKey()`
* As instrument plugin libraries now also need to get their key passed, their
  second argument, which was always the same as the first, is now used to pass
  the sub plugin keys. This affects *all* instrument plugins.
* Plugin.h: Add more virtuals to `SubPluginFeatures` in order to draw logos
  and images into instrument selector widgets
* LadspaSubPluginFeatures: Implement the `displayName` virtual because the
  new behaviour to resolve displayNames is to first look at the
  SubPluginFeatures, which, without override, returns the superior plugin's
  name (Plugin.cpp)

Additional:

* PluginFactory.h: Allow setting up search paths without discovering plugins
  yet
* Plugin.h: Add full documentation (should be checked)
  • Loading branch information
JohannesLorenz committed Dec 27, 2018
commit a1b355828e347b8e7fca8118873fc834953c1d67
7 changes: 0 additions & 7 deletions include/Effect.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,6 @@ class LMMS_EXPORT Effect : public Plugin
m_noRun = _state;
}

inline const Descriptor::SubPluginFeatures::Key & key() const
{
return m_key;
}

EffectChain * effectChain() const
{
return m_parent;
Expand Down Expand Up @@ -201,8 +196,6 @@ class LMMS_EXPORT Effect : public Plugin
sampleFrame * _dst_buf, sample_rate_t _dst_sr,
const f_cnt_t _frames );

Descriptor::SubPluginFeatures::Key m_key;

ch_cnt_t m_processors;

bool m_okay;
Expand Down
4 changes: 4 additions & 0 deletions include/Engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ class LMMS_EXPORT LmmsCore : public QObject
return s_instanceOfMe;
}

static void setDndPluginKey(void* newKey);
static void* pickDndPluginKey();

signals:
void initProgress(const QString &msg);

Expand All @@ -137,6 +140,7 @@ class LMMS_EXPORT LmmsCore : public QObject
static DummyTrackContainer * s_dummyTC;

static Ladspa2LMMS * s_ladspaManager;
static void* s_dndPluginKey;

// even though most methods are static, an instance is needed for Qt slots/signals
static LmmsCore * s_instanceOfMe;
Expand Down
15 changes: 9 additions & 6 deletions include/Instrument.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ class LMMS_EXPORT Instrument : public Plugin

Q_DECLARE_FLAGS(Flags, Flag);

Instrument( InstrumentTrack * _instrument_track,
const Descriptor * _descriptor );
Instrument(InstrumentTrack * _instrument_track,
const Descriptor * _descriptor,
const Descriptor::SubPluginFeatures::Key * key = nullptr);
virtual ~Instrument() = default;

// --------------------------------------------------------------------
Expand Down Expand Up @@ -113,10 +114,12 @@ class LMMS_EXPORT Instrument : public Plugin
// provided functions:
// --------------------------------------------------------------------

// instantiate instrument-plugin with given name or return NULL
// on failure
static Instrument * instantiate( const QString & _plugin_name,
InstrumentTrack * _instrument_track );
//! instantiate instrument-plugin with given name or return NULL
//! on failure
static Instrument * instantiate(const QString & _plugin_name,
InstrumentTrack * _instrument_track,
const Plugin::Descriptor::SubPluginFeatures::Key* key,
bool keyFromDnd = false);

virtual bool isFromTrack( const Track * _track ) const;

Expand Down
5 changes: 4 additions & 1 deletion include/InstrumentTrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "Piano.h"
#include "PianoView.h"
#include "Pitch.h"
#include "Plugin.h"
#include "Track.h"


Expand Down Expand Up @@ -146,7 +147,9 @@ class LMMS_EXPORT InstrumentTrack : public Track, public MidiEventProcessor


// load instrument whose name matches given one
Instrument * loadInstrument( const QString & _instrument_name );
Instrument * loadInstrument(const QString & _instrument_name,
const Plugin::Descriptor::SubPluginFeatures::Key* key = nullptr,
bool keyFromDnd = false);

AudioPort * audioPort()
{
Expand Down
2 changes: 2 additions & 0 deletions include/Ladspa2LMMS.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
#include "LadspaManager.h"


//! Class responsible for sorting found plugins (by LadspaManager)
//! into categories
class LMMS_EXPORT Ladspa2LMMS : public LadspaManager
{
public:
Expand Down
169 changes: 141 additions & 28 deletions include/Plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,27 @@ class PixmapLoader;
class PluginView;
class AutomatableModel;

/**
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).
*/
class LMMS_EXPORT Plugin : public Model, public JournallingObject
{
MM_OPERATORS
Expand All @@ -59,9 +79,9 @@ class LMMS_EXPORT Plugin : public Model, public JournallingObject
Undefined = 255
} ;

// descriptor holds information about a plugin - every external plugin
// has to instantiate such a descriptor in an extern "C"-section so that
// the plugin-loader is able to access information about the plugin
//! Descriptor holds information about a plugin - every external plugin
//! has to instantiate such a Descriptor in an extern "C"-section so that
//! the plugin-loader is able to access information about the plugin
struct Descriptor
{
const char * name;
Expand All @@ -71,23 +91,49 @@ class LMMS_EXPORT Plugin : public Model, public JournallingObject
int version;
PluginTypes type;
const PixmapLoader * logo;
const char * supportedFileTypes;
const char * supportedFileTypes; //!< csv list of extensions

inline bool supportsFileType( const QString& extension ) const
{
return QString( supportedFileTypes ).split( QChar( ',' ) ).contains( extension );
}

/**
Access to non-key-data of a sub plugin

If you consider sub plugin keys as keys in a
key-value-map, this is the lookup for the corresponding
values. In order to have flexibility between different
plugin APIs, this is rather an array of fixed data,
but a bunch of virtual functions taking the key and
returning some values (or modifying objects of other
classes).
*/
class LMMS_EXPORT SubPluginFeatures
{
public:
/**
Key reference a Plugin::Descriptor, and,
if the plugin has sub plugins, also reference
its sub plugin (using the attributes).
When keys are saved, those attributes are
written to XML in order to find the right sub
plugin when realoading.

@note Any data that is not required to reference
the right Plugin or sub plugin should
not be here (but rather in
SubPluginFeatures, which are like values
in a key-value map).
*/
struct Key
{
typedef QMap<QString, QString> AttributeMap;

inline Key( const Plugin::Descriptor * desc = NULL,
const QString & name = QString(),
const AttributeMap & am = AttributeMap() )
const QString & name = QString(),
const AttributeMap & am = AttributeMap()
)
:
desc( desc ),
name( name ),
Expand All @@ -101,12 +147,28 @@ class LMMS_EXPORT Plugin : public Model, public JournallingObject

inline bool isValid() const
{
return desc != NULL && name.isNull() == false;
return desc != nullptr;
}

//! Key to subplugin: reference to parent descriptor
//! Key to plugin: reference to its descriptor
const Plugin::Descriptor* desc;
//! Descriptive name like "Calf Phaser".
//! Not required for key lookup and not saved
//! only used sometimes to temporary store descriptive names
//! @todo This is a bug, there should be a function
//! in SubPluginFeatures (to get the name) instead
QString name;
//! Attributes that make up the key and identify
//! the sub plugin. They are being loaded and saved
AttributeMap attributes;

// helper functions to retrieve data that is
// not part of the key, but mapped via desc->subPluginFeatures
const char* additionalFileExtensions() const;
const char* displayName() const;
const char* description() const;
const PixmapLoader* logo() const;
} ;

typedef QList<Key> KeyList;
Expand All @@ -125,11 +187,42 @@ class LMMS_EXPORT Plugin : public Model, public JournallingObject
{
}

//! While PluginFactory only collects the plugins,
//! this function is used by widgets like EffectSelectDialog
//! to find all possible sub plugins
virtual void listSubPluginKeys( const Plugin::Descriptor *, KeyList & ) const
{
}


private:
// You can add stuff values mapped by "Key" below
// The defaults are sane, i.e. redirect to sub plugins
// supererior descriptor

virtual const char* additionalFileExtensions(const Key&) const
{
return nullptr;
}

virtual const char* displayName(const Key& k) const
{
return k.isValid()
? k.desc->displayName
: k.name.toUtf8().data();
}

virtual const char* description(const Key& k) const
{
return k.isValid() ? k.desc->description : "";
}

virtual const PixmapLoader* logo(const Key& k) const
{
Q_ASSERT(k.desc);
return k.desc->logo;
}

protected:
const Plugin::PluginTypes m_type;
} ;
Expand All @@ -140,55 +233,75 @@ class LMMS_EXPORT Plugin : public Model, public JournallingObject
// typedef a list so we can easily work with list of plugin descriptors
typedef QList<Descriptor*> DescriptorList;

// contructor of a plugin
Plugin( const Descriptor * descriptor, Model * parent );
//! Constructor of a plugin
//! @param key Sub plugins must pass a key here, optional otherwise.
//! See the key() function
Plugin(const Descriptor * descriptor, Model * parent,
const Descriptor::SubPluginFeatures::Key *key = nullptr);
virtual ~Plugin();

// returns display-name out of descriptor
virtual QString displayName() const
{
return Model::displayName().isEmpty()
? m_descriptor->displayName
: Model::displayName();
}
//! Return display-name out of sub plugin or descriptor
virtual QString displayName() const;

//! Return logo out of sub plugin or descriptor
const PixmapLoader *logo() const;

// return plugin-type
//! Return plugin type
inline PluginTypes type( void ) const
{
return m_descriptor->type;
}

// return plugin-descriptor for further information
//! Return plugin Descriptor
inline const Descriptor * descriptor() const
{
return m_descriptor;
}

// can be called if a file matching supportedFileTypes should be
// loaded/processed with the help of this plugin
//! 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.
inline const Descriptor::SubPluginFeatures::Key & key() const
{
return m_key;
}

//! Can be called if a file matching supportedFileTypes should be
//! loaded/processed with the help of this plugin
virtual void loadFile( const QString & file );

// Called if external source needs to change something but we cannot
// reference the class header. Should return null if not key not found.
//! Called if external source needs to change something but we cannot
//! reference the class header. Should return null if not key not found.
virtual AutomatableModel* childModel( const QString & modelName );

// returns an instance of a plugin whose name matches to given one
// if specified plugin couldn't be loaded, it creates a dummy-plugin
static Plugin * instantiate( const QString& pluginName, Model * parent, void * data );
//! 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
static Plugin * instantiateWithKey(const QString& pluginName, Model * parent,
const Descriptor::SubPluginFeatures::Key *key,
bool keyFromDnd = false);

// create a view for the model
PluginView * createView( QWidget * parent );
//! Return an instance of a plugin whose name matches to given one
//! if specified plugin couldn't be loaded, it creates a dummy-plugin
//! @param data Anything the plugin expects. If this is a pointer to a sub plugin key,
//! use instantiateWithKey instead
static Plugin * instantiate(const QString& pluginName, Model * parent, void *data);

//! Create a view for the model
PluginView * createView( QWidget * parent );

protected:
// create a view for the model
//! Create a view for the model
virtual PluginView* instantiateView( QWidget * ) = 0;
void collectErrorForUI( QString errMsg );


private:
const Descriptor * m_descriptor;

Descriptor::SubPluginFeatures::Key m_key;

// pointer to instantiation-function in plugin
typedef Plugin * ( * InstantiationHook )( Model * , void * );

Expand Down
5 changes: 3 additions & 2 deletions include/PluginBrowser.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ class PluginDescWidget : public QWidget
{
Q_OBJECT
public:
PluginDescWidget( const Plugin::Descriptor & _pd, QWidget * _parent );
typedef Plugin::Descriptor::SubPluginFeatures::Key PluginKey;
PluginDescWidget( const PluginKey & _pk, QWidget * _parent );


protected:
Expand All @@ -72,7 +73,7 @@ class PluginDescWidget : public QWidget
private:
constexpr static int DEFAULT_HEIGHT{24};

const Plugin::Descriptor & m_pluginDescriptor;
PluginKey m_pluginKey;
QPixmap m_logo;

bool m_mouseOver;
Expand Down
Loading