diff options
| author | Tom Tanner <thosrtanner2@users.sourceforge.net> | 2015-06-20 15:37:32 +0100 |
|---|---|---|
| committer | Tom Tanner <thosrtanner2@users.sourceforge.net> | 2015-06-20 15:37:32 +0100 |
| commit | 81ef3d0a8150fc90c35fd31b64fb58da7dc41090 (patch) | |
| tree | 9bd3ee2e06106e04ba9bb2d80cbffdc3413b67aa /src/settings.h | |
| parent | c95de1b3aa628a13193565f44648d509cd35a132 (diff) | |
Factor out general, nexis, plugins tab code into individual classes
Add some code and page to control what is/isn't significant in overwrite
Diffstat (limited to 'src/settings.h')
| -rw-r--r-- | src/settings.h | 84 |
1 files changed, 82 insertions, 2 deletions
diff --git a/src/settings.h b/src/settings.h index 7e784a99..e7d0e3c4 100644 --- a/src/settings.h +++ b/src/settings.h @@ -33,6 +33,8 @@ namespace MOBase { class IPluginGame; } +class SettingsDialog; +class QCheckBox; /** * manages the settings for Mod Organizer. The settings are not cached @@ -301,8 +303,8 @@ public slots: private: - QString obfuscate(const QString &password) const; - QString deObfuscate(const QString &password) const; + static QString obfuscate(const QString &password); + static QString deObfuscate(const QString &password); void addLanguages(QComboBox *languageBox); void addStyles(QComboBox *styleBox); @@ -310,6 +312,84 @@ private: void writePluginBlacklist(); QString getConfigurablePath(const QString &key, const QString &def) const; + class GeneralTab + { + public: + GeneralTab(Settings *m_parent, SettingsDialog &m_dialog); + ~GeneralTab(); + + private: + Settings *m_parent; + QSettings &m_Settings; + SettingsDialog &m_dialog; + QComboBox *m_languageBox; + QComboBox *m_styleBox; + QComboBox *m_logLevelBox; + QLineEdit *m_downloadDirEdit; + QLineEdit *m_modDirEdit; + QLineEdit *m_cacheDirEdit; + QCheckBox *m_compactBox; + QCheckBox *m_showMetaBox; + }; + + class NexusTab + { + public: + NexusTab(Settings *m_parent, SettingsDialog &m_dialog); + /*: + m_parent(m_parent), + m_settings(m_parent->m_Settings), + m_dialog(m_dialog) + {} + */ + ~NexusTab(); + /* + { + if (m_dialog.result() != QDialog::Accepted) { + return; + } + } +*/ + private: + Settings *m_parent; + QSettings &m_Settings; + SettingsDialog &m_dialog; + QCheckBox *m_loginCheckBox; + QLineEdit *m_usernameEdit; + QLineEdit *m_passwordEdit; + QCheckBox *m_offlineBox; + QCheckBox *m_proxyBox; + QListWidget *m_knownServersList; + QListWidget *m_preferredServersList; + }; + + class PluginsTab + { + public: + PluginsTab(Settings *m_parent, SettingsDialog &m_dialog); + /*: + m_parent(m_parent), + m_Settings(m_parent->m_Settings), + m_dialog(m_dialog) + { + } + */ + ~PluginsTab(); + /* + { + if (m_dialog.result() != QDialog::Accepted) { + return; + } + } +*/ + private: + Settings *m_parent; + QSettings &m_Settings; + SettingsDialog &m_dialog; + QListWidget *m_pluginsList; + QListWidget *m_pluginBlacklistList; + }; + private slots: void resetDialogs(); |
