| 120 | } |
| 121 | |
| 122 | QList<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 | |
| 144 | QList<PluginInfo> PluginManager::getPluginsInfo() const { return m_plugins; } |
| 145 | |