From f66cf4ad99219716e221f2a6717b910e531bc7d3 Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Mon, 15 Jun 2020 22:47:21 +0200 Subject: Update for new organizer callbacks. --- src/organizercore.h | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'src/organizercore.h') diff --git a/src/organizercore.h b/src/organizercore.h index 81119866..ae4a34c4 100644 --- a/src/organizercore.h +++ b/src/organizercore.h @@ -78,9 +78,12 @@ private: private: - typedef boost::signals2::signal SignalAboutToRunApplication; - typedef boost::signals2::signal SignalFinishedRunApplication; - typedef boost::signals2::signal SignalModInstalled; + using SignalAboutToRunApplication = boost::signals2::signal; + using SignalFinishedRunApplication = boost::signals2::signal; + using SignalModInstalled = boost::signals2::signal; + using SignalUserInterfaceInitialized = boost::signals2::signal; + using SignalProfileChanged = boost::signals2::signal; + using SignalPluginSettingChanged = boost::signals2::signal; 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 enabledArchives(); @@ -315,12 +318,17 @@ public: DownloadManager *downloadManager(); PluginList *pluginList(); ModList *modList(); - bool onModInstalled(const std::function &func); - bool onAboutToRun(const std::function &func); - bool onFinishedRun(const std::function &func); void refreshModList(bool saveChanges = true); QStringList modsSortedByProfilePriority() const; + + bool onModInstalled(const std::function& func); + bool onAboutToRun(const std::function& func); + bool onFinishedRun(const std::function& func); + bool onUserInterfaceInitialized(std::function const& func); + bool onProfileChanged(std::function const& func); + bool onPluginSettingChanged(std::function 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(QMainWindow *); + bool nexusApi(bool retry = false); signals: @@ -422,7 +432,7 @@ private: MOBase::IPluginGame *m_GamePlugin; ModDataContentHolder m_Contents; - Profile *m_CurrentProfile; + std::unique_ptr 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; -- cgit v1.3.1