summaryrefslogtreecommitdiff
path: root/src/organizercore.h
diff options
context:
space:
mode:
authorMikaƫl Capelle <capelle.mikael@gmail.com>2020-12-07 08:40:23 +0100
committerGitHub <noreply@github.com>2020-12-07 08:40:23 +0100
commit904264e231a9aef485025cb45f1eb006b017aa1a (patch)
treec3ff682de4ac4761b8d36f0e96a96dce6a034706 /src/organizercore.h
parent0a6a5eb7868dde908e07ea12c7eb674b2063b950 (diff)
parent3264d7899e2560bce4591ab2142ee9d51bc7890c (diff)
Merge pull request #1313 from Holt59/load-plugin-without-restart
Implement loading/unloading of plugins without restarting
Diffstat (limited to 'src/organizercore.h')
-rw-r--r--src/organizercore.h32
1 files changed, 20 insertions, 12 deletions
diff --git a/src/organizercore.h b/src/organizercore.h
index 23b624e8..f2b904cd 100644
--- a/src/organizercore.h
+++ b/src/organizercore.h
@@ -61,6 +61,8 @@ class OrganizerCore : public QObject, public MOBase::IPluginDiagnose
private:
+ friend class OrganizerProxy;
+
struct SignalCombinerAnd
{
typedef bool result_type;
@@ -87,7 +89,7 @@ private:
using SignalProfileRemoved = boost::signals2::signal<void(QString const&)>;
using SignalProfileChanged = boost::signals2::signal<void (MOBase::IProfile *, MOBase::IProfile *)>;
using SignalPluginSettingChanged = boost::signals2::signal<void (QString const&, const QString& key, const QVariant&, const QVariant&)>;
- using SignalPluginEnabled = boost::signals2::signal<void(MOBase::IPlugin*)>;
+ using SignalPluginEnabled = boost::signals2::signal<void(const MOBase::IPlugin*)>;
public:
@@ -199,7 +201,6 @@ public:
void setUserInterface(IUserInterface* ui);
void connectPlugins(PluginContainer *container);
- void disconnectPlugins();
void setManagedGame(MOBase::IPluginGame *game);
@@ -232,6 +233,13 @@ public:
MOBase::IPluginGame const *managedGame() const;
/**
+ * @brief Retrieve the organizer proxy of the currently managed game.
+ *
+ */
+ MOBase::IOrganizer const* managedGameOrganizer() const;
+
+
+ /**
* @return the list of contents for the currently managed game, or an empty vector
* if the game plugin does not implement the ModDataContent feature.
*/
@@ -328,16 +336,16 @@ public:
ModList *modList();
void refresh(bool saveChanges = true);
- bool onAboutToRun(const std::function<bool(const QString&)>& func);
- bool onFinishedRun(const std::function<void(const QString&, unsigned int)>& func);
- bool onUserInterfaceInitialized(std::function<void(QMainWindow*)> const& func);
- bool onProfileCreated(std::function<void(MOBase::IProfile*)> const& func);
- bool onProfileRenamed(std::function<void(MOBase::IProfile*, QString const&, QString const&)> const& func);
- bool onProfileRemoved(std::function<void(QString const&)> const& func);
- bool onProfileChanged(std::function<void(MOBase::IProfile*, MOBase::IProfile*)> const& func);
- bool onPluginSettingChanged(std::function<void(QString const&, const QString& key, const QVariant&, const QVariant&)> const& func);
- bool onPluginEnabled(std::function<void(const MOBase::IPlugin*)> const& func);
- bool onPluginDisabled(std::function<void(const MOBase::IPlugin*)> const& func);
+ boost::signals2::connection onAboutToRun(const std::function<bool(const QString&)>& func);
+ boost::signals2::connection onFinishedRun(const std::function<void(const QString&, unsigned int)>& func);
+ boost::signals2::connection onUserInterfaceInitialized(std::function<void(QMainWindow*)> const& func);
+ boost::signals2::connection onProfileCreated(std::function<void(MOBase::IProfile*)> const& func);
+ boost::signals2::connection onProfileRenamed(std::function<void(MOBase::IProfile*, QString const&, QString const&)> const& func);
+ boost::signals2::connection onProfileRemoved(std::function<void(QString const&)> const& func);
+ boost::signals2::connection onProfileChanged(std::function<void(MOBase::IProfile*, MOBase::IProfile*)> const& func);
+ boost::signals2::connection onPluginSettingChanged(std::function<void(QString const&, const QString& key, const QVariant&, const QVariant&)> const& func);
+ boost::signals2::connection onPluginEnabled(std::function<void(const MOBase::IPlugin*)> const& func);
+ boost::signals2::connection onPluginDisabled(std::function<void(const MOBase::IPlugin*)> const& func);
bool getArchiveParsing() const
{