mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 09:20:06 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			41 lines
		
	
	
	
		
			595 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
	
		
			595 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #pragma once
 | |
| 
 | |
| #include <string>
 | |
| #include <memory>
 | |
| 
 | |
| #include <QObject>
 | |
| 
 | |
| namespace scwx
 | |
| {
 | |
| namespace qt
 | |
| {
 | |
| namespace manager
 | |
| {
 | |
| 
 | |
| class SettingsManager : public QObject
 | |
| {
 | |
|    Q_OBJECT
 | |
|    Q_DISABLE_COPY_MOVE(SettingsManager)
 | |
| 
 | |
| public:
 | |
|    explicit SettingsManager();
 | |
|    ~SettingsManager();
 | |
| 
 | |
|    void Initialize();
 | |
|    void ReadSettings(const std::string& settingsPath);
 | |
|    void SaveSettings();
 | |
|    void Shutdown();
 | |
| 
 | |
|    static SettingsManager& Instance();
 | |
| 
 | |
| signals:
 | |
|    void SettingsSaved();
 | |
| 
 | |
| private:
 | |
|    class Impl;
 | |
|    std::unique_ptr<Impl> p;
 | |
| };
 | |
| 
 | |
| } // namespace manager
 | |
| } // namespace qt
 | |
| } // namespace scwx
 | 
