2015-12-20 23:36:39 +00:00
|
|
|
// Copyright 2015 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2+
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2017-07-06 00:35:47 +00:00
|
|
|
#include <QObject>
|
2017-05-20 15:53:17 +00:00
|
|
|
#include <QVector>
|
2015-12-20 23:36:39 +00:00
|
|
|
|
2017-05-31 07:17:39 +00:00
|
|
|
#include "Common/NonCopyable.h"
|
2017-05-09 16:49:10 +00:00
|
|
|
|
2016-07-06 18:33:05 +00:00
|
|
|
namespace DiscIO
|
|
|
|
{
|
|
|
|
enum class Language;
|
|
|
|
}
|
2015-12-20 23:36:39 +00:00
|
|
|
|
2017-05-20 15:53:17 +00:00
|
|
|
class InputConfig;
|
|
|
|
|
2015-12-22 03:46:03 +00:00
|
|
|
// UI settings to be stored in the config directory.
|
2017-06-22 22:11:53 +00:00
|
|
|
class Settings final : public QObject, NonCopyable
|
2015-12-20 23:36:39 +00:00
|
|
|
{
|
2016-06-24 08:43:46 +00:00
|
|
|
Q_OBJECT
|
2015-12-20 23:36:39 +00:00
|
|
|
|
|
|
|
public:
|
2017-05-31 07:17:39 +00:00
|
|
|
static Settings& Instance();
|
2016-06-24 08:43:46 +00:00
|
|
|
|
|
|
|
// UI
|
2017-05-31 23:15:48 +00:00
|
|
|
void SetThemeName(const QString& theme_name);
|
2017-05-20 15:53:17 +00:00
|
|
|
QString GetProfilesDir() const;
|
|
|
|
QVector<QString> GetProfiles(const InputConfig* config) const;
|
|
|
|
QString GetProfileINIPath(const InputConfig* config, const QString& name) const;
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2017-07-04 13:21:33 +00:00
|
|
|
bool IsInDevelopmentWarningEnabled() const;
|
|
|
|
bool IsLogVisible() const;
|
|
|
|
void SetLogVisible(bool visible);
|
|
|
|
bool IsLogConfigVisible() const;
|
|
|
|
void SetLogConfigVisible(bool visible);
|
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
// GameList
|
|
|
|
QStringList GetPaths() const;
|
2017-05-31 07:42:15 +00:00
|
|
|
void AddPath(const QString& path);
|
|
|
|
void RemovePath(const QString& path);
|
2016-06-24 08:43:46 +00:00
|
|
|
bool GetPreferredView() const;
|
|
|
|
void SetPreferredView(bool table);
|
|
|
|
|
|
|
|
// Emulation
|
|
|
|
int GetStateSlot() const;
|
|
|
|
void SetStateSlot(int);
|
|
|
|
|
|
|
|
// Graphics
|
2017-06-01 06:49:06 +00:00
|
|
|
void SetHideCursor(bool hide_cursor);
|
|
|
|
bool GetHideCursor() const;
|
2017-05-08 17:03:59 +00:00
|
|
|
|
2017-06-21 08:26:06 +00:00
|
|
|
// Audio
|
|
|
|
int GetVolume() const;
|
|
|
|
void SetVolume(int volume);
|
|
|
|
void IncreaseVolume(int volume);
|
|
|
|
void DecreaseVolume(int volume);
|
|
|
|
|
2017-05-31 07:42:15 +00:00
|
|
|
signals:
|
2017-05-31 23:15:48 +00:00
|
|
|
void ThemeChanged();
|
2017-05-31 07:42:15 +00:00
|
|
|
void PathAdded(const QString&);
|
|
|
|
void PathRemoved(const QString&);
|
2017-06-01 06:49:06 +00:00
|
|
|
void HideCursorChanged();
|
2017-06-21 08:26:06 +00:00
|
|
|
void VolumeChanged(int volume);
|
2017-07-06 09:01:32 +00:00
|
|
|
void NANDRefresh();
|
2017-07-04 13:21:33 +00:00
|
|
|
void LogVisibilityChanged(bool visible);
|
|
|
|
void LogConfigVisibilityChanged(bool visible);
|
2017-05-31 07:42:15 +00:00
|
|
|
|
2017-05-31 07:17:39 +00:00
|
|
|
private:
|
|
|
|
Settings();
|
2015-12-20 23:36:39 +00:00
|
|
|
};
|