From 9df612c7ca0ba4cb0b62d958df4e2745fe0c04ec Mon Sep 17 00:00:00 2001 From: Tannin Date: Wed, 2 Mar 2016 21:28:17 +0100 Subject: more configuration options - overwrite path configurable - one can now set a base directory for all configurable paths - user can now opt in/out of receiving pre-release updates (not functional yet) --- src/settings.h | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'src/settings.h') diff --git a/src/settings.h b/src/settings.h index 85a3dac0..9676df70 100644 --- a/src/settings.h +++ b/src/settings.h @@ -105,10 +105,16 @@ public: **/ QString getSteamAppID() const; + /** + * retrieves the base directory under which the other directories usually + * reside + */ + QString getBaseDirectory() const; + /** * retrieve the directory where downloads are stored (with native separators) **/ - QString getDownloadDirectory() const; + QString getDownloadDirectory(bool resolve = true) const; /** * retrieve a sorted list of preferred servers @@ -118,7 +124,7 @@ public: /** * retrieve the directory where mods are stored (with native separators) **/ - QString getModDirectory() const; + QString getModDirectory(bool resolve = true) const; /** * returns the version of nmm to impersonate when connecting to nexus @@ -128,12 +134,18 @@ public: /** * retrieve the directory where the web cache is stored (with native separators) **/ - QString getCacheDirectory() const; + QString getCacheDirectory(bool resolve = true) const; /** * retrieve the directory where profiles stored (with native separators) **/ - QString getProfileDirectory() const; + QString getProfileDirectory(bool resolve = true) const; + + /** + * retrieve the directory were new files are stored that can't be assigned + * to a mod (with native separators) + */ + QString getOverwriteDirectory(bool resolve = true) const; /** * @return true if the user has set up automatic login to nexus @@ -295,6 +307,8 @@ public: */ std::vector plugins() const { return m_Plugins; } + bool usePrereleases() const; + /** * @brief register MO as the handler for nxm links * @param force set to true to enforce the registration dialog to show up, @@ -315,7 +329,7 @@ private: void addStyles(QComboBox *styleBox); void readPluginBlacklist(); void writePluginBlacklist(); - QString getConfigurablePath(const QString &key, const QString &def) const; + QString getConfigurablePath(const QString &key, const QString &def, bool resolve) const; class SettingsTab { @@ -346,6 +360,7 @@ private: QComboBox *m_logLevelBox; QCheckBox *m_compactBox; QCheckBox *m_showMetaBox; + QCheckBox *m_usePrereleaseBox; }; class PathsTab : public SettingsTab @@ -356,10 +371,12 @@ private: void update(); private: + QLineEdit *m_baseDirEdit; QLineEdit *m_downloadDirEdit; QLineEdit *m_modDirEdit; QLineEdit *m_cacheDirEdit; QLineEdit *m_profilesDirEdit; + QLineEdit *m_overwriteDirEdit; }; /** Display/store the configuration in the 'nexus' tab of the settings dialogue */ -- cgit v1.3.1