2015-12-20 16:36:39 -07:00
|
|
|
// Copyright 2015 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2+
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QSettings>
|
2017-05-20 09:53:17 -06:00
|
|
|
#include <QVector>
|
2015-12-20 16:36:39 -07:00
|
|
|
|
2017-05-31 01:17:39 -06:00
|
|
|
#include "Common/NonCopyable.h"
|
2017-05-09 10:49:10 -06:00
|
|
|
#include "Core/HW/SI/SI.h"
|
|
|
|
|
2016-07-06 12:33:05 -06:00
|
|
|
namespace DiscIO
|
|
|
|
{
|
|
|
|
enum class Language;
|
|
|
|
}
|
2015-12-20 16:36:39 -07:00
|
|
|
|
2017-05-20 09:53:17 -06:00
|
|
|
class InputConfig;
|
|
|
|
|
2015-12-21 20:46:03 -07:00
|
|
|
// UI settings to be stored in the config directory.
|
2017-05-31 01:17:39 -06:00
|
|
|
class Settings final : public QSettings, NonCopyable
|
2015-12-20 16:36:39 -07:00
|
|
|
{
|
2016-06-24 02:43:46 -06:00
|
|
|
Q_OBJECT
|
2015-12-20 16:36:39 -07:00
|
|
|
|
|
|
|
public:
|
2017-05-31 01:17:39 -06:00
|
|
|
static Settings& Instance();
|
2016-06-24 02:43:46 -06:00
|
|
|
|
|
|
|
// UI
|
2017-05-31 17:15:48 -06:00
|
|
|
void SetThemeName(const QString& theme_name);
|
2016-06-24 02:43:46 -06:00
|
|
|
QString GetThemeDir() const;
|
2017-05-09 10:49:10 -06:00
|
|
|
QString GetResourcesDir() const;
|
2017-05-20 09:53:17 -06:00
|
|
|
QString GetProfilesDir() const;
|
|
|
|
QVector<QString> GetProfiles(const InputConfig* config) const;
|
|
|
|
QString GetProfileINIPath(const InputConfig* config, const QString& name) const;
|
2016-07-12 23:52:45 -06:00
|
|
|
bool IsInDevelopmentWarningEnabled() const;
|
2016-06-24 02:43:46 -06:00
|
|
|
|
|
|
|
// GameList
|
|
|
|
QStringList GetPaths() const;
|
2017-05-31 01:42:15 -06:00
|
|
|
void AddPath(const QString& path);
|
2016-06-24 02:43:46 -06:00
|
|
|
void SetPaths(const QStringList& paths);
|
2017-05-31 01:42:15 -06:00
|
|
|
void RemovePath(const QString& path);
|
2016-06-24 02:43:46 -06:00
|
|
|
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);
|
2016-07-06 12:33:05 -06:00
|
|
|
DiscIO::Language GetWiiSystemLanguage() const;
|
|
|
|
DiscIO::Language GetGCSystemLanguage() const;
|
2016-06-24 02:43:46 -06:00
|
|
|
bool GetPreferredView() const;
|
|
|
|
void SetPreferredView(bool table);
|
|
|
|
|
|
|
|
// Emulation
|
|
|
|
bool GetConfirmStop() const;
|
2017-05-09 10:49:10 -06:00
|
|
|
bool IsWiiGameRunning() const;
|
2016-06-24 02:43:46 -06:00
|
|
|
int GetStateSlot() const;
|
|
|
|
void SetStateSlot(int);
|
2017-05-03 22:19:51 -06:00
|
|
|
float GetEmulationSpeed() const;
|
|
|
|
void SetEmulationSpeed(float val);
|
|
|
|
bool GetForceNTSCJ() const;
|
|
|
|
void SetForceNTSCJ(bool val);
|
|
|
|
|
|
|
|
// Analytics
|
2017-05-20 15:41:02 -06:00
|
|
|
bool HasAskedForAnalyticsPermission() const;
|
|
|
|
void SetAskedForAnalyticsPermission(bool value);
|
2017-05-03 22:19:51 -06:00
|
|
|
bool GetAnalyticsEnabled() const;
|
|
|
|
void SetAnalyticsEnabled(bool val);
|
2016-06-24 02:43:46 -06:00
|
|
|
|
|
|
|
// Graphics
|
|
|
|
bool GetRenderToMain() const;
|
|
|
|
bool GetFullScreen() const;
|
|
|
|
QSize GetRenderWindowSize() const;
|
2017-06-01 00:49:06 -06:00
|
|
|
void SetHideCursor(bool hide_cursor);
|
|
|
|
bool GetHideCursor() const;
|
2017-05-08 11:03:59 -06:00
|
|
|
|
2017-06-21 02:26:06 -06:00
|
|
|
// Audio
|
|
|
|
int GetVolume() const;
|
|
|
|
void SetVolume(int volume);
|
|
|
|
void IncreaseVolume(int volume);
|
|
|
|
void DecreaseVolume(int volume);
|
|
|
|
|
2017-05-08 11:03:59 -06:00
|
|
|
// 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;
|
|
|
|
|
2017-05-09 10:49:10 -06:00
|
|
|
// 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);
|
|
|
|
|
2017-05-20 09:53:17 -06:00
|
|
|
bool IsGCAdapterRumbleEnabled(int port) const;
|
|
|
|
void SetGCAdapterRumbleEnabled(int port, bool enabled);
|
|
|
|
|
|
|
|
bool IsGCAdapterSimulatingDKBongos(int port) const;
|
|
|
|
void SetGCAdapterSimulatingDKBongos(int port, bool enabled);
|
|
|
|
|
2017-05-08 11:03:59 -06:00
|
|
|
void Save();
|
2017-05-31 01:17:39 -06:00
|
|
|
|
2017-05-31 01:42:15 -06:00
|
|
|
signals:
|
2017-05-31 17:15:48 -06:00
|
|
|
void ThemeChanged();
|
2017-05-31 01:42:15 -06:00
|
|
|
void PathAdded(const QString&);
|
|
|
|
void PathRemoved(const QString&);
|
2017-06-01 00:49:06 -06:00
|
|
|
void HideCursorChanged();
|
2017-06-21 02:26:06 -06:00
|
|
|
void VolumeChanged(int volume);
|
2017-05-31 01:42:15 -06:00
|
|
|
|
2017-05-31 01:17:39 -06:00
|
|
|
private:
|
|
|
|
Settings();
|
2015-12-20 16:36:39 -07:00
|
|
|
};
|