diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2020-07-23 01:32:53 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2020-11-03 11:39:03 -0500 |
| commit | 5b13704275fc3cf02f6c3f4d4bd77d32425ad2c9 (patch) | |
| tree | 27362fc36d32843d7ce68534511e539e2a16f9d4 /src/instancemanager.h | |
| parent | 2c915429d84a9df0e9c512db248fb5c8ec6663f7 (diff) | |
moved profile, current game and game edition checks to InstanceManager
trying to centralize all of this stuff
Diffstat (limited to 'src/instancemanager.h')
| -rw-r--r-- | src/instancemanager.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/instancemanager.h b/src/instancemanager.h index 649c2195..2331ebfd 100644 --- a/src/instancemanager.h +++ b/src/instancemanager.h @@ -24,18 +24,26 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include <QString> #include <QSettings> +namespace MOBase { class IPluginGame; } + +class Settings; +class PluginContainer; class InstanceManager { public: - static InstanceManager &instance(); - QString determineDataPath(); - void clearCurrentInstance(); - void overrideInstance(const QString& instanceName); + void overrideProfile(const QString& profileName); + + QString determineDataPath(); + QString determineProfile(const Settings &settings); + bool determineGameEdition(Settings& settings, MOBase::IPluginGame* game); + MOBase::IPluginGame* determineCurrentGame( + const QString& moPath, Settings& settings, const PluginContainer &plugins); + void clearCurrentInstance(); QString currentInstance() const; bool allowedToChangeInstance() const; @@ -69,4 +77,6 @@ private: bool m_Reset {false}; bool m_overrideInstance{false}; QString m_overrideInstanceName; + bool m_overrideProfile{false}; + QString m_overrideProfileName; }; |
