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/modlistproxy.h | |
| parent | ef82ddd36ae30e654841257634b26fa563319f9b (diff) | |
| parent | 3c1f206d7d29d3b3d27082aca23dafd87a95a71b (diff) | |
Merge pull request #1260 from Holt59/iplugin-setactive-fix
Fix usage of isActive
Diffstat (limited to 'src/modlistproxy.h')
| -rw-r--r-- | src/modlistproxy.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/modlistproxy.h b/src/modlistproxy.h new file mode 100644 index 00000000..13399e0a --- /dev/null +++ b/src/modlistproxy.h @@ -0,0 +1,32 @@ +#ifndef MODLISTPROXY_H +#define MODLISTPROXY_H + +#include <imodlist.h> + +class OrganizerProxy; + +class ModListProxy : public MOBase::IModList +{ + +public: + + ModListProxy(OrganizerProxy* oproxy, IModList* modlist); + virtual ~ModListProxy() { } + + QString displayName(const QString& internalName) const override; + QStringList allMods() const override; + ModStates state(const QString& name) const override; + bool setActive(const QString& name, bool active) override; + int setActive(const QStringList& names, bool active) override; + int priority(const QString& name) const override; + bool setPriority(const QString& name, int newPriority) override; + bool onModStateChanged(const std::function<void(const std::map<QString, ModStates>&)>& func) override; + bool onModMoved(const std::function<void(const QString&, int, int)>& func) override; + +private: + + OrganizerProxy* m_OrganizerProxy; + IModList* m_Proxied; +}; + +#endif // ORGANIZERPROXY_H |
