mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 08:10:06 +00:00 
			
		
		
		
	Load color tables from settings
This commit is contained in:
		
							parent
							
								
									bcae7d9825
								
							
						
					
					
						commit
						b241703b40
					
				
					 16 changed files with 324 additions and 17 deletions
				
			
		
							
								
								
									
										46
									
								
								scwx-qt/source/scwx/qt/settings/palette_settings.hpp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								scwx-qt/source/scwx/qt/settings/palette_settings.hpp
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,46 @@ | |||
| #pragma once | ||||
| 
 | ||||
| #include <memory> | ||||
| #include <string> | ||||
| 
 | ||||
| #include <boost/json.hpp> | ||||
| 
 | ||||
| namespace scwx | ||||
| { | ||||
| namespace qt | ||||
| { | ||||
| namespace settings | ||||
| { | ||||
| 
 | ||||
| class PaletteSettingsImpl; | ||||
| 
 | ||||
| class PaletteSettings | ||||
| { | ||||
| public: | ||||
|    explicit PaletteSettings(); | ||||
|    ~PaletteSettings(); | ||||
| 
 | ||||
|    PaletteSettings(const PaletteSettings&) = delete; | ||||
|    PaletteSettings& operator=(const PaletteSettings&) = delete; | ||||
| 
 | ||||
|    PaletteSettings(PaletteSettings&&) noexcept; | ||||
|    PaletteSettings& operator=(PaletteSettings&&) noexcept; | ||||
| 
 | ||||
|    const std::string& palette(const std::string& name) const; | ||||
| 
 | ||||
|    boost::json::value ToJson() const; | ||||
| 
 | ||||
|    static std::shared_ptr<PaletteSettings> Create(); | ||||
|    static std::shared_ptr<PaletteSettings> Load(const boost::json::value* json, | ||||
|                                                 bool& jsonDirty); | ||||
| 
 | ||||
|    friend bool operator==(const PaletteSettings& lhs, | ||||
|                           const PaletteSettings& rhs); | ||||
| 
 | ||||
| private: | ||||
|    std::unique_ptr<PaletteSettingsImpl> p; | ||||
| }; | ||||
| 
 | ||||
| } // namespace settings
 | ||||
| } // namespace qt
 | ||||
| } // namespace scwx
 | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat