mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-11 18:50:30 +00:00
DolphinQt2: make Settings a singleton
With this, we can get signals when properties change.
This commit is contained in:
parent
95ef785b1f
commit
548522877a
15 changed files with 109 additions and 89 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <QSettings>
|
||||
#include <QVector>
|
||||
|
||||
#include "Common/NonCopyable.h"
|
||||
#include "Core/HW/SI/SI.h"
|
||||
|
||||
namespace DiscIO
|
||||
|
@ -17,12 +18,12 @@ enum class Language;
|
|||
class InputConfig;
|
||||
|
||||
// UI settings to be stored in the config directory.
|
||||
class Settings final : public QSettings
|
||||
class Settings final : public QSettings, NonCopyable
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Settings(QObject* parent = nullptr);
|
||||
static Settings& Instance();
|
||||
|
||||
// UI
|
||||
QString GetThemeDir() const;
|
||||
|
@ -105,4 +106,7 @@ public:
|
|||
void SetGCAdapterSimulatingDKBongos(int port, bool enabled);
|
||||
|
||||
void Save();
|
||||
|
||||
private:
|
||||
Settings();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue