MCPcopy Create free account
hub / github.com/analogdevicesinc/scopy / getCompatiblePlugins

Method getCompatiblePlugins

core/src/pluginmanager.cpp:122–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122QList<Plugin *> PluginManager::getCompatiblePlugins(QString param, QString category)
123{
124 QList<Plugin *> comp;
125 const QList<PluginInfo> loaded = getLoadedPlugins();
126 for(const PluginInfo &pluginInfo : loaded) {
127 Plugin *plugin = pluginInfo.pluginInstance();
128 if(!PluginFilter::pluginInCategory(plugin, category)) {
129 continue;
130 }
131 bool enable = (!PluginFilter::pluginInExclusionList(comp, plugin));
132 bool forcedInclusion = (PluginFilter::pluginForcedInclusionList(comp, plugin));
133
134 if(plugin->compatible(param, category) || forcedInclusion) {
135 Plugin *p = plugin->clone();
136 p->setParam(param, category);
137 p->setEnabled(enable);
138 comp.append(p);
139 }
140 }
141 return comp;
142}
143
144QList<PluginInfo> PluginManager::getPluginsInfo() const { return m_plugins; }
145

Callers 8

loadLibsMethod · 0.45
exclusionMethod · 0.45
exclusionExceptMethod · 0.45
availablePluginsMethod · 0.45

Calls 6

pluginInstanceMethod · 0.80
appendMethod · 0.80
compatibleMethod · 0.45
cloneMethod · 0.45
setParamMethod · 0.45
setEnabledMethod · 0.45

Tested by 7

loadLibsMethod · 0.36
exclusionMethod · 0.36
exclusionExceptMethod · 0.36