DolphinQt2: replace Settings with SConfig where possible

Changes:
- `ShowDevelopmentWarning` is now under the '[Interface]' group in
  Dolphin.ini, with other interface-related settings. So, whoever uses
  DolphinQt will have to edit that manually again. Sorry!
- Game search paths and the last file are now shared properly with
  DolphinWX
- Qt-only preferences like "Preferred View: list/table" are now
  stored using the platform's native settings storage, rather than in
  UI.ini
This commit is contained in:
Michael Maltese
2017-06-22 15:11:53 -07:00
parent 898bbffaa7
commit d0fdb9f149
16 changed files with 132 additions and 448 deletions

View File

@ -18,7 +18,7 @@ enum class Language;
class InputConfig;
// UI settings to be stored in the config directory.
class Settings final : public QSettings, NonCopyable
class Settings final : public QObject, NonCopyable
{
Q_OBJECT
@ -27,8 +27,6 @@ public:
// UI
void SetThemeName(const QString& theme_name);
QString GetThemeDir() const;
QString GetResourcesDir() const;
QString GetProfilesDir() const;
QVector<QString> GetProfiles(const InputConfig* config) const;
QString GetProfileINIPath(const InputConfig* config, const QString& name) const;
@ -39,39 +37,14 @@ public:
void AddPath(const QString& path);
void SetPaths(const QStringList& paths);
void RemovePath(const QString& path);
QString GetDefaultGame() const;
void SetDefaultGame(const QString& path);
QString GetDVDRoot() const;
void SetDVDRoot(const QString& path);
QString GetApploader() const;
void SetApploader(const QString& path);
QString GetWiiNAND() const;
void SetWiiNAND(const QString& path);
DiscIO::Language GetWiiSystemLanguage() const;
DiscIO::Language GetGCSystemLanguage() const;
bool GetPreferredView() const;
void SetPreferredView(bool table);
// Emulation
bool GetConfirmStop() const;
bool IsWiiGameRunning() const;
int GetStateSlot() const;
void SetStateSlot(int);
float GetEmulationSpeed() const;
void SetEmulationSpeed(float val);
bool GetForceNTSCJ() const;
void SetForceNTSCJ(bool val);
// Analytics
bool HasAskedForAnalyticsPermission() const;
void SetAskedForAnalyticsPermission(bool value);
bool GetAnalyticsEnabled() const;
void SetAnalyticsEnabled(bool val);
// Graphics
bool GetRenderToMain() const;
bool GetFullScreen() const;
QSize GetRenderWindowSize() const;
void SetHideCursor(bool hide_cursor);
bool GetHideCursor() const;
@ -81,42 +54,6 @@ public:
void IncreaseVolume(int volume);
void DecreaseVolume(int volume);
// Columns
bool& BannerVisible() const;
bool& CountryVisible() const;
bool& DescriptionVisible() const;
bool& FilenameVisible() const;
bool& IDVisible() const;
bool& PlatformVisible() const;
bool& MakerVisible() const;
bool& SizeVisible() const;
bool& StateVisible() const;
bool& TitleVisible() const;
// Input
bool IsWiimoteSpeakerEnabled() const;
void SetWiimoteSpeakerEnabled(bool enabled);
bool IsBackgroundInputEnabled() const;
void SetBackgroundInputEnabled(bool enabled);
bool IsBluetoothPassthroughEnabled() const;
void SetBluetoothPassthroughEnabled(bool enabled);
SerialInterface::SIDevices GetSIDevice(size_t i) const;
void SetSIDevice(size_t i, SerialInterface::SIDevices device);
bool IsContinuousScanningEnabled() const;
void SetContinuousScanningEnabled(bool enabled);
bool IsGCAdapterRumbleEnabled(int port) const;
void SetGCAdapterRumbleEnabled(int port, bool enabled);
bool IsGCAdapterSimulatingDKBongos(int port) const;
void SetGCAdapterSimulatingDKBongos(int port, bool enabled);
void Save();
signals:
void ThemeChanged();
void PathAdded(const QString&);
@ -126,4 +63,5 @@ signals:
private:
Settings();
QSettings m_native_settings;
};