dolphin/Source/Core/DolphinQt2/Settings.h

90 lines
2.0 KiB
C
Raw Normal View History

// Copyright 2015 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
2017-08-01 10:55:21 +00:00
#include <memory>
#include <QObject>
2017-05-20 15:53:17 +00:00
#include <QVector>
#include "Common/NonCopyable.h"
2017-05-09 16:49:10 +00:00
2017-08-01 10:55:21 +00:00
#include "Core/NetPlayClient.h"
#include "Core/NetPlayServer.h"
namespace DiscIO
{
enum class Language;
}
2017-08-01 10:55:21 +00:00
class GameListModel;
2017-05-20 15:53:17 +00:00
class InputConfig;
// UI settings to be stored in the config directory.
class Settings final : public QObject, NonCopyable
{
Q_OBJECT
public:
static Settings& Instance();
// UI
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;
bool IsInDevelopmentWarningEnabled() const;
bool IsLogVisible() const;
void SetLogVisible(bool visible);
bool IsLogConfigVisible() const;
void SetLogConfigVisible(bool visible);
// GameList
QStringList GetPaths() const;
void AddPath(const QString& path);
void RemovePath(const QString& path);
bool GetPreferredView() const;
void SetPreferredView(bool list);
// 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-08-01 10:55:21 +00:00
// NetPlay
NetPlayClient* GetNetPlayClient();
void ResetNetPlayClient(NetPlayClient* client = nullptr);
NetPlayServer* GetNetPlayServer();
void ResetNetPlayServer(NetPlayServer* server = nullptr);
// Other
GameListModel* GetGameListModel() const;
signals:
void ThemeChanged();
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();
void LogVisibilityChanged(bool visible);
void LogConfigVisibilityChanged(bool visible);
private:
2017-08-01 10:55:21 +00:00
std::unique_ptr<NetPlayClient> m_client;
std::unique_ptr<NetPlayServer> m_server;
Settings();
};