mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-10-05 15:49:01 +00:00
# Conflicts: # CMakeLists.txt # CMakeSettings.json # Data/Sys/GameSettings/GLR.ini # Data/Sys/GameSettings/HA9.ini # Data/Sys/GameSettings/MB3.ini # Data/Sys/GameSettings/MBA.ini # Data/Sys/GameSettings/MCV.ini # Data/Sys/GameSettings/MCY.ini # Data/Sys/GameSettings/NAK.ini # Data/Sys/GameSettings/NAL.ini # Data/Sys/GameSettings/NAT.ini # Data/Sys/GameSettings/R8P.ini # Data/Sys/GameSettings/R9I.ini # Data/Sys/GameSettings/REF.ini # Data/Sys/GameSettings/RES.ini # Data/Sys/GameSettings/RMHE08.ini # Data/Sys/GameSettings/RMHP08.ini # Data/Sys/GameSettings/SE2.ini # Data/Sys/GameSettings/WW2.ini # Data/Sys/GameSettings/WW3.ini # Data/Sys/GameSettings/WWI.ini # Externals/Bochs_disasm/Bochs_disasm.vcxproj # Externals/FreeSurround/FreeSurround.vcxproj # Externals/LZO/LZO.vcxproj # Externals/SFML/build/vc2010/SFML_Network.vcxproj # Externals/bzip2/bzip2.vcxproj # Externals/cpp-optparse/cpp-optparse.vcxproj # Externals/cubeb/msvc/cubeb.vcxproj # Externals/curl/curl.vcxproj # Externals/curl/lib/CMakeLists.txt # Externals/discord-rpc/src/discord-rpc.vcxproj # Externals/ed25519/ed25519.vcxproj # Externals/enet/enet.vcxproj # Externals/glslang/glslang.vcxproj # Externals/imgui/imgui.vcxproj # Externals/liblzma/liblzma.vcxproj # Externals/libpng/png/png.vcxproj # Externals/libusb/libusb_static_2013.vcxproj # Externals/mbedtls/mbedTLS.vcxproj # Externals/miniupnpc/miniupnpc.vcxproj # Externals/minizip/minizip.vcxproj # Externals/picojson/picojson.vcxproj # Externals/pugixml/pugixml.vcxproj # Externals/soundtouch/SoundTouch.vcxproj # Externals/xxhash/xxhash.vcxproj # Externals/zlib/zlib.vcxproj # Externals/zstd/zstd.vcxproj # Languages/Languages.vcxproj # Source/Android/jni/MainAndroid.cpp # Source/Core/AudioCommon/AudioCommon.vcxproj # Source/Core/Common/Common.vcxproj # Source/Core/Common/Common.vcxproj.filters # Source/Core/Common/Logging/Log.h # Source/Core/Common/StringUtil.cpp # Source/Core/Core/CMakeLists.txt # Source/Core/Core/ConfigManager.cpp # Source/Core/Core/ConfigManager.h # Source/Core/Core/Core.vcxproj # Source/Core/Core/Core.vcxproj.filters # Source/Core/Core/HotkeyManager.cpp # Source/Core/Core/State.cpp # Source/Core/DiscIO/DiscIO.vcxproj # Source/Core/DolphinNoGUI/DolphinNoGUI.vcxproj # Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp # Source/Core/DolphinQt/DolphinQt.vcxproj # Source/Core/InputCommon/InputCommon.vcxproj # Source/Core/InputCommon/InputCommon.vcxproj.filters # Source/Core/UICommon/UICommon.vcxproj # Source/Core/UpdaterCommon/UpdaterCommon.vcxproj # Source/Core/VideoBackends/D3D/D3D.vcxproj # Source/Core/VideoBackends/D3D12/D3D12.vcxproj # Source/Core/VideoBackends/D3DCommon/D3DCommon.vcxproj # Source/Core/VideoBackends/Null/Null.vcxproj # Source/Core/VideoBackends/OGL/OGL.vcxproj # Source/Core/VideoBackends/Software/Software.vcxproj # Source/Core/VideoBackends/Vulkan/Vulkan.vcxproj # Source/Core/VideoCommon/OnScreenDisplay.cpp # Source/Core/VideoCommon/OnScreenDisplay.h # Source/Core/VideoCommon/VideoCommon.vcxproj # Source/Core/WinUpdater/WinUpdater.vcxproj # Source/DSPTool/DSPTool.vcxproj # Source/PCH/pch.vcxproj # Source/UnitTests/UnitTests.vcxproj
201 lines
5.6 KiB
C++
201 lines
5.6 KiB
C++
// Copyright 2015 Dolphin Emulator Project
|
|
// Licensed under GPLv2+
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
|
|
#include <QFont>
|
|
#include <QObject>
|
|
#include <QSettings>
|
|
|
|
#include "DiscIO/Enums.h"
|
|
|
|
namespace Core
|
|
{
|
|
enum class State;
|
|
}
|
|
|
|
namespace DiscIO
|
|
{
|
|
enum class Language;
|
|
}
|
|
|
|
namespace NetPlay
|
|
{
|
|
class NetPlayClient;
|
|
class NetPlayServer;
|
|
} // namespace NetPlay
|
|
|
|
class InputConfig;
|
|
|
|
// UI settings to be stored in the config directory.
|
|
class Settings final : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
Settings(const Settings&) = delete;
|
|
Settings& operator=(const Settings&) = delete;
|
|
Settings(Settings&&) = delete;
|
|
Settings& operator=(Settings&&) = delete;
|
|
|
|
~Settings();
|
|
|
|
static Settings& Instance();
|
|
static QSettings& GetQSettings();
|
|
|
|
// UI
|
|
void SetThemeName(const QString& theme_name);
|
|
void SetCurrentUserStyle(const QString& stylesheet_name);
|
|
QString GetCurrentUserStyle() const;
|
|
|
|
void SetUserStylesEnabled(bool enabled);
|
|
bool AreUserStylesEnabled() const;
|
|
|
|
bool IsLogVisible() const;
|
|
void SetLogVisible(bool visible);
|
|
bool IsLogConfigVisible() const;
|
|
void SetLogConfigVisible(bool visible);
|
|
void SetToolBarVisible(bool visible);
|
|
bool IsToolBarVisible() const;
|
|
void SetWidgetsLocked(bool visible);
|
|
bool AreWidgetsLocked() const;
|
|
|
|
void RefreshWidgetVisibility();
|
|
|
|
// GameList
|
|
QStringList GetPaths() const;
|
|
void AddPath(const QString& path);
|
|
void RemovePath(const QString& path);
|
|
bool GetPreferredView() const;
|
|
void SetPreferredView(bool list);
|
|
QString GetDefaultGame() const;
|
|
void SetDefaultGame(QString path);
|
|
void RefreshGameList();
|
|
void NotifyRefreshGameListStarted();
|
|
void NotifyRefreshGameListComplete();
|
|
void RefreshMetadata();
|
|
void NotifyMetadataRefreshComplete();
|
|
void ReloadTitleDB();
|
|
bool IsAutoRefreshEnabled() const;
|
|
void SetAutoRefreshEnabled(bool enabled);
|
|
|
|
// Emulation
|
|
int GetStateSlot() const;
|
|
void SetStateSlot(int);
|
|
bool IsBatchModeEnabled() const;
|
|
void SetBatchModeEnabled(bool batch);
|
|
|
|
std::string GetSlippiInputFile() const;
|
|
void SetSlippiInputFile(std::string path);
|
|
bool IsSDCardInserted() const;
|
|
void SetSDCardInserted(bool inserted);
|
|
bool IsUSBKeyboardConnected() const;
|
|
void SetUSBKeyboardConnected(bool connected);
|
|
|
|
// Graphics
|
|
void SetHideCursor(bool hide_cursor);
|
|
bool GetHideCursor() const;
|
|
void SetKeepWindowOnTop(bool top);
|
|
bool IsKeepWindowOnTopEnabled() const;
|
|
|
|
// Audio
|
|
int GetVolume() const;
|
|
void SetVolume(int volume);
|
|
void IncreaseVolume(int volume);
|
|
void DecreaseVolume(int volume);
|
|
|
|
// NetPlay
|
|
std::shared_ptr<NetPlay::NetPlayClient> GetNetPlayClient();
|
|
void ResetNetPlayClient(NetPlay::NetPlayClient* client = nullptr);
|
|
std::shared_ptr<NetPlay::NetPlayServer> GetNetPlayServer();
|
|
void ResetNetPlayServer(NetPlay::NetPlayServer* server = nullptr);
|
|
|
|
// Cheats
|
|
bool GetCheatsEnabled() const;
|
|
void SetCheatsEnabled(bool enabled);
|
|
|
|
// Debug
|
|
void SetDebugModeEnabled(bool enabled);
|
|
bool IsDebugModeEnabled() const;
|
|
void SetRegistersVisible(bool enabled);
|
|
bool IsRegistersVisible() const;
|
|
void SetThreadsVisible(bool enabled);
|
|
bool IsThreadsVisible() const;
|
|
void SetWatchVisible(bool enabled);
|
|
bool IsWatchVisible() const;
|
|
void SetBreakpointsVisible(bool enabled);
|
|
bool IsBreakpointsVisible() const;
|
|
void SetCodeVisible(bool enabled);
|
|
bool IsCodeVisible() const;
|
|
void SetMemoryVisible(bool enabled);
|
|
bool IsMemoryVisible() const;
|
|
void SetNetworkVisible(bool enabled);
|
|
bool IsNetworkVisible() const;
|
|
void SetJITVisible(bool enabled);
|
|
bool IsJITVisible() const;
|
|
QFont GetDebugFont() const;
|
|
void SetDebugFont(QFont font);
|
|
|
|
// Auto-Update
|
|
QString GetAutoUpdateTrack() const;
|
|
void SetAutoUpdateTrack(const QString& mode);
|
|
|
|
// Fallback Region
|
|
DiscIO::Region GetFallbackRegion() const;
|
|
void SetFallbackRegion(const DiscIO::Region& region);
|
|
|
|
// Analytics
|
|
bool IsAnalyticsEnabled() const;
|
|
void SetAnalyticsEnabled(bool enabled);
|
|
|
|
signals:
|
|
void ConfigChanged();
|
|
void EmulationStateChanged(Core::State new_state);
|
|
void ThemeChanged();
|
|
void PathAdded(const QString&);
|
|
void PathRemoved(const QString&);
|
|
void DefaultGameChanged(const QString&);
|
|
void GameListRefreshRequested();
|
|
void GameListRefreshStarted();
|
|
void GameListRefreshCompleted();
|
|
void TitleDBReloadRequested();
|
|
void MetadataRefreshRequested();
|
|
void MetadataRefreshCompleted();
|
|
void AutoRefreshToggled(bool enabled);
|
|
void HideCursorChanged();
|
|
void KeepWindowOnTopChanged(bool top);
|
|
void VolumeChanged(int volume);
|
|
void NANDRefresh();
|
|
void RegistersVisibilityChanged(bool visible);
|
|
void ThreadsVisibilityChanged(bool visible);
|
|
void LogVisibilityChanged(bool visible);
|
|
void LogConfigVisibilityChanged(bool visible);
|
|
void ToolBarVisibilityChanged(bool visible);
|
|
void WidgetLockChanged(bool locked);
|
|
void EnableCheatsChanged(bool enabled);
|
|
void WatchVisibilityChanged(bool visible);
|
|
void BreakpointsVisibilityChanged(bool visible);
|
|
void CodeVisibilityChanged(bool visible);
|
|
void MemoryVisibilityChanged(bool visible);
|
|
void NetworkVisibilityChanged(bool visible);
|
|
void JITVisibilityChanged(bool visible);
|
|
void DebugModeToggled(bool enabled);
|
|
void DebugFontChanged(QFont font);
|
|
void AutoUpdateTrackChanged(const QString& mode);
|
|
void FallbackRegionChanged(const DiscIO::Region& region);
|
|
void AnalyticsToggled(bool enabled);
|
|
void DevicesChanged();
|
|
void SDCardInsertionChanged(bool inserted);
|
|
void USBKeyboardConnectionChanged(bool connected);
|
|
|
|
private:
|
|
bool m_batch = false;
|
|
std::shared_ptr<NetPlay::NetPlayClient> m_client;
|
|
std::shared_ptr<NetPlay::NetPlayServer> m_server;
|
|
Settings();
|
|
};
|
|
|
|
Q_DECLARE_METATYPE(Core::State);
|