diff options
| author | Mikaƫl Capelle <capelle.mikael@gmail.com> | 2020-10-21 20:08:01 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-21 20:08:01 +0200 |
| commit | 52cfb8e8a7609c8b763652e1575a769dd5fe1b02 (patch) | |
| tree | 6febde8afe518f8f33a1067b734cf2faadb760ca /src/pluginlistproxy.cpp | |
| parent | ef82ddd36ae30e654841257634b26fa563319f9b (diff) | |
| parent | 3c1f206d7d29d3b3d27082aca23dafd87a95a71b (diff) | |
Merge pull request #1260 from Holt59/iplugin-setactive-fix
Fix usage of isActive
Diffstat (limited to 'src/pluginlistproxy.cpp')
| -rw-r--r-- | src/pluginlistproxy.cpp | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/src/pluginlistproxy.cpp b/src/pluginlistproxy.cpp new file mode 100644 index 00000000..1f8dc2b4 --- /dev/null +++ b/src/pluginlistproxy.cpp @@ -0,0 +1,73 @@ +#include "pluginlistproxy.h" +#include "organizerproxy.h" +#include "proxyutils.h" + +using namespace MOBase; + +PluginListProxy::PluginListProxy(OrganizerProxy* oproxy, IPluginList* pluginlist) : + m_OrganizerProxy(oproxy), m_Proxied(pluginlist) { } + +QStringList PluginListProxy::pluginNames() const +{ + return m_Proxied->pluginNames(); +} + +IPluginList::PluginStates PluginListProxy::state(const QString& name) const +{ + return m_Proxied->state(name); +} + +void PluginListProxy::setState(const QString& name, PluginStates state) +{ + return m_Proxied->setState(name, state); +} + +int PluginListProxy::priority(const QString& name) const +{ + return m_Proxied->priority(name); +} + +bool PluginListProxy::setPriority(const QString& name, int newPriority) +{ + return m_Proxied->setPriority(name, newPriority); +} + +int PluginListProxy::loadOrder(const QString& name) const +{ + return m_Proxied->loadOrder(name); +} + +void PluginListProxy::setLoadOrder(const QStringList& pluginList) +{ + return m_Proxied->setLoadOrder(pluginList); +} + +bool PluginListProxy::isMaster(const QString& name) const +{ + return m_Proxied->isMaster(name); +} + +QStringList PluginListProxy::masters(const QString& name) const +{ + return m_Proxied->masters(name); +} + +QString PluginListProxy::origin(const QString& name) const +{ + return m_Proxied->origin(name); +} + +bool PluginListProxy::onRefreshed(const std::function<void()>& callback) +{ + return m_Proxied->onRefreshed(MOShared::callIfPluginActive(m_OrganizerProxy, callback)); +} + +bool PluginListProxy::onPluginMoved(const std::function<void(const QString&, int, int)>& func) +{ + return m_Proxied->onPluginMoved(MOShared::callIfPluginActive(m_OrganizerProxy, func)); +} + +bool PluginListProxy::onPluginStateChanged(const std::function<void(const std::map<QString, PluginStates>&)> &func) +{ + return m_Proxied->onPluginStateChanged(MOShared::callIfPluginActive(m_OrganizerProxy, func)); +} |
