diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2020-06-16 15:39:59 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-16 15:39:59 -0400 |
| commit | 4ae95e21ad77256cb9fe2942a302bbcdda04ef30 (patch) | |
| tree | d6a017fe88ae98c5f478e9497c5b36db5584bb69 /src/organizercore.h | |
| parent | 7d553557a64e9a3eb6656a09cbe70103f576b3b9 (diff) | |
| parent | 8c410aff33395daf607ae8a1c62b8be70943ba4d (diff) | |
Merge pull request #1135 from Holt59/new-iorganizer-callbacks
Update for new organizer callbacks.
Diffstat (limited to 'src/organizercore.h')
| -rw-r--r-- | src/organizercore.h | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/src/organizercore.h b/src/organizercore.h index 81119866..2588d332 100644 --- a/src/organizercore.h +++ b/src/organizercore.h @@ -78,9 +78,12 @@ private: private:
- typedef boost::signals2::signal<bool (const QString&), SignalCombinerAnd> SignalAboutToRunApplication;
- typedef boost::signals2::signal<void (const QString&, unsigned int)> SignalFinishedRunApplication;
- typedef boost::signals2::signal<void (const QString&)> SignalModInstalled;
+ using SignalAboutToRunApplication = boost::signals2::signal<bool (const QString&), SignalCombinerAnd>;
+ using SignalFinishedRunApplication = boost::signals2::signal<void (const QString&, unsigned int)>;
+ using SignalModInstalled = boost::signals2::signal<void (const QString&)>;
+ using SignalUserInterfaceInitialized = boost::signals2::signal<void (QMainWindow*)>;
+ 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&)>;
public:
@@ -215,7 +218,7 @@ public: m_ExecutablesList = executablesList;
}
- Profile *currentProfile() const { return m_CurrentProfile; }
+ Profile *currentProfile() const { return m_CurrentProfile.get(); }
void setCurrentProfile(const QString &profileName);
std::vector<QString> enabledArchives();
@@ -315,12 +318,17 @@ public: DownloadManager *downloadManager();
PluginList *pluginList();
ModList *modList();
- bool onModInstalled(const std::function<void (const QString &)> &func);
- bool onAboutToRun(const std::function<bool (const QString &)> &func);
- bool onFinishedRun(const std::function<void (const QString &, unsigned int)> &func);
void refreshModList(bool saveChanges = true);
QStringList modsSortedByProfilePriority() const;
+
+ bool onModInstalled(const std::function<void(const QString&)>& func);
+ 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 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 getArchiveParsing() const
{
return m_ArchiveParsing;
@@ -357,6 +365,8 @@ public slots: void requestDownload(const QUrl &url, QNetworkReply *reply);
void downloadRequestedNXM(const QString &url);
+ void userInterfaceInitialized();
+
bool nexusApi(bool retry = false);
signals:
@@ -422,7 +432,7 @@ private: MOBase::IPluginGame *m_GamePlugin;
ModDataContentHolder m_Contents;
- Profile *m_CurrentProfile;
+ std::unique_ptr<Profile> m_CurrentProfile;
Settings& m_Settings;
@@ -431,6 +441,9 @@ private: SignalAboutToRunApplication m_AboutToRun;
SignalFinishedRunApplication m_FinishedRun;
SignalModInstalled m_ModInstalled;
+ SignalUserInterfaceInitialized m_UserInterfaceInitialized;
+ SignalProfileChanged m_ProfileChanged;
+ SignalPluginSettingChanged m_PluginSettingChanged;
ModList m_ModList;
PluginList m_PluginList;
|
