dolphin/Source/Core/DolphinQt2/Settings.h

118 lines
3.1 KiB
C
Raw Normal View History

// 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>
#include "Common/NonCopyable.h"
2017-05-09 10:49:10 -06:00
#include "Core/HW/SI/SI.h"
namespace DiscIO
{
enum class Language;
}
2017-05-20 09:53:17 -06:00
class InputConfig;
// UI settings to be stored in the config directory.
class Settings final : public QSettings, NonCopyable
{
Q_OBJECT
public:
static Settings& Instance();
// UI
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;
bool IsInDevelopmentWarningEnabled() const;
// GameList
QStringList GetPaths() const;
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;
2017-05-09 10:49:10 -06:00
bool IsWiiGameRunning() const;
int GetStateSlot() const;
void SetStateSlot(int);
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);
bool GetAnalyticsEnabled() const;
void SetAnalyticsEnabled(bool val);
// Graphics
bool GetRenderToMain() const;
bool GetFullScreen() const;
QSize GetRenderWindowSize() const;
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();
signals:
void PathAdded(const QString&);
void PathRemoved(const QString&);
private:
Settings();
};