mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 02:40:05 +00:00 
			
		
		
		
	Allow selection of radar smoothing
This commit is contained in:
		
							parent
							
								
									d3ae404f7a
								
							
						
					
					
						commit
						a8132ef9f1
					
				
					 7 changed files with 66 additions and 6 deletions
				
			
		|  | @ -225,7 +225,7 @@ public: | |||
|    std::shared_ptr<OverlayLayer>        overlayLayer_; | ||||
|    std::shared_ptr<OverlayProductLayer> overlayProductLayer_ {nullptr}; | ||||
|    std::shared_ptr<PlacefileLayer>      placefileLayer_; | ||||
|    std::shared_ptr<MarkerLayer>            markerLayer_; | ||||
|    std::shared_ptr<MarkerLayer>         markerLayer_; | ||||
|    std::shared_ptr<ColorTableLayer>     colorTableLayer_; | ||||
|    std::shared_ptr<RadarSiteLayer>      radarSiteLayer_ {nullptr}; | ||||
| 
 | ||||
|  | @ -233,6 +233,7 @@ public: | |||
| 
 | ||||
|    bool autoRefreshEnabled_; | ||||
|    bool autoUpdateEnabled_; | ||||
|    bool smoothingEnabled_ {false}; | ||||
| 
 | ||||
|    common::Level2Product selectedLevel2Product_; | ||||
| 
 | ||||
|  | @ -727,6 +728,23 @@ std::uint16_t MapWidget::GetVcp() const | |||
|    } | ||||
| } | ||||
| 
 | ||||
| bool MapWidget::GetSmoothingEnabled() const | ||||
| { | ||||
|    return p->smoothingEnabled_; | ||||
| } | ||||
| 
 | ||||
| void MapWidget::SetSmoothingEnabled(bool smoothingEnabled) | ||||
| { | ||||
|    p->smoothingEnabled_ = smoothingEnabled; | ||||
| 
 | ||||
|    auto radarProductView = p->context_->radar_product_view(); | ||||
|    if (radarProductView != nullptr) | ||||
|    { | ||||
|       radarProductView->set_smoothing_enabled(smoothingEnabled); | ||||
|       radarProductView->Update(); | ||||
|    } | ||||
| } | ||||
| 
 | ||||
| void MapWidget::SelectElevation(float elevation) | ||||
| { | ||||
|    auto radarProductView = p->context_->radar_product_view(); | ||||
|  | @ -775,6 +793,7 @@ void MapWidget::SelectRadarProduct(common::RadarProductGroup group, | |||
| 
 | ||||
|       radarProductView = view::RadarProductViewFactory::Create( | ||||
|          group, productName, productCode, p->radarProductManager_); | ||||
|       radarProductView->set_smoothing_enabled(p->smoothingEnabled_); | ||||
|       p->context_->set_radar_product_view(radarProductView); | ||||
| 
 | ||||
|       p->RadarProductViewConnect(); | ||||
|  |  | |||
|  | @ -48,6 +48,7 @@ public: | |||
|    std::string                           GetRadarProductName() const; | ||||
|    std::shared_ptr<config::RadarSite>    GetRadarSite() const; | ||||
|    std::chrono::system_clock::time_point GetSelectedTime() const; | ||||
|    bool                                  GetSmoothingEnabled() const; | ||||
|    std::uint16_t                         GetVcp() const; | ||||
| 
 | ||||
|    void SelectElevation(float elevation); | ||||
|  | @ -117,6 +118,7 @@ public: | |||
|                          double pitch); | ||||
|    void SetInitialMapStyle(const std::string& styleName); | ||||
|    void SetMapStyle(const std::string& styleName); | ||||
|    void SetSmoothingEnabled(bool enabled); | ||||
| 
 | ||||
|    /**
 | ||||
|     * Updates the coordinates associated with mouse movement from another map. | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat