mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 00:40:06 +00:00 
			
		
		
		
	Add map logo and attribution toggle to settings
This commit is contained in:
		
							parent
							
								
									4c844459a0
								
							
						
					
					
						commit
						7cfb55a4de
					
				
					 5 changed files with 48 additions and 3 deletions
				
			
		|  | @ -46,6 +46,8 @@ public: | |||
|       mapProvider_.SetDefault(defaultMapProviderValue); | ||||
|       mapboxApiKey_.SetDefault("?"); | ||||
|       maptilerApiKey_.SetDefault("?"); | ||||
|       showMapAttribution_.SetDefault(true); | ||||
|       showMapLogo_.SetDefault(true); | ||||
|       theme_.SetDefault(defaultThemeValue); | ||||
|       trackLocation_.SetDefault(false); | ||||
|       updateNotificationsEnabled_.SetDefault(true); | ||||
|  | @ -142,6 +144,8 @@ public: | |||
|    SettingsVariable<std::string>                mapProvider_ {"map_provider"}; | ||||
|    SettingsVariable<std::string> mapboxApiKey_ {"mapbox_api_key"}; | ||||
|    SettingsVariable<std::string> maptilerApiKey_ {"maptiler_api_key"}; | ||||
|    SettingsVariable<bool>        showMapAttribution_ {"show_map_attribution"}; | ||||
|    SettingsVariable<bool>        showMapLogo_ {"show_map_logo"}; | ||||
|    SettingsVariable<std::string> theme_ {"theme"}; | ||||
|    SettingsVariable<bool>        trackLocation_ {"track_location"}; | ||||
|    SettingsVariable<bool> updateNotificationsEnabled_ {"update_notifications"}; | ||||
|  | @ -163,6 +167,8 @@ GeneralSettings::GeneralSettings() : | |||
|                       &p->mapProvider_, | ||||
|                       &p->mapboxApiKey_, | ||||
|                       &p->maptilerApiKey_, | ||||
|                       &p->showMapAttribution_, | ||||
|                       &p->showMapLogo_, | ||||
|                       &p->theme_, | ||||
|                       &p->trackLocation_, | ||||
|                       &p->updateNotificationsEnabled_}); | ||||
|  | @ -240,6 +246,16 @@ SettingsVariable<std::string>& GeneralSettings::maptiler_api_key() const | |||
|    return p->maptilerApiKey_; | ||||
| } | ||||
| 
 | ||||
| SettingsVariable<bool>& GeneralSettings::show_map_attribution() const | ||||
| { | ||||
|    return p->showMapAttribution_; | ||||
| } | ||||
| 
 | ||||
| SettingsVariable<bool>& GeneralSettings::show_map_logo() const | ||||
| { | ||||
|    return p->showMapLogo_; | ||||
| } | ||||
| 
 | ||||
| SettingsVariable<std::string>& GeneralSettings::theme() const | ||||
| { | ||||
|    return p->theme_; | ||||
|  | @ -289,6 +305,8 @@ bool operator==(const GeneralSettings& lhs, const GeneralSettings& rhs) | |||
|            lhs.p->mapProvider_ == rhs.p->mapProvider_ && | ||||
|            lhs.p->mapboxApiKey_ == rhs.p->mapboxApiKey_ && | ||||
|            lhs.p->maptilerApiKey_ == rhs.p->maptilerApiKey_ && | ||||
|            lhs.p->showMapAttribution_ == rhs.p->showMapAttribution_ && | ||||
|            lhs.p->showMapLogo_ == rhs.p->showMapLogo_ && | ||||
|            lhs.p->theme_ == rhs.p->theme_ && | ||||
|            lhs.p->trackLocation_ == rhs.p->trackLocation_ && | ||||
|            lhs.p->updateNotificationsEnabled_ == | ||||
|  |  | |||
|  | @ -38,6 +38,8 @@ public: | |||
|    SettingsVariable<std::string>&                map_provider() const; | ||||
|    SettingsVariable<std::string>&                mapbox_api_key() const; | ||||
|    SettingsVariable<std::string>&                maptiler_api_key() const; | ||||
|    SettingsVariable<bool>&                       show_map_attribution() const; | ||||
|    SettingsVariable<bool>&                       show_map_logo() const; | ||||
|    SettingsVariable<std::string>&                theme() const; | ||||
|    SettingsVariable<bool>&                       track_location() const; | ||||
|    SettingsVariable<bool>& update_notifications_enabled() const; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat