From 71c0ec4b6911e6b9956783c7ca7285906bc6b64f Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Mon, 20 Nov 2023 07:42:17 -0600 Subject: [PATCH 1/6] Initial radar site layer --- scwx-qt/scwx-qt.cmake | 6 +- .../source/scwx/qt/map/radar_site_layer.cpp | 147 ++++++++++++++++++ .../source/scwx/qt/map/radar_site_layer.hpp | 34 ++++ 3 files changed, 185 insertions(+), 2 deletions(-) create mode 100644 scwx-qt/source/scwx/qt/map/radar_site_layer.cpp create mode 100644 scwx-qt/source/scwx/qt/map/radar_site_layer.hpp diff --git a/scwx-qt/scwx-qt.cmake b/scwx-qt/scwx-qt.cmake index 787382a3..650d94f7 100644 --- a/scwx-qt/scwx-qt.cmake +++ b/scwx-qt/scwx-qt.cmake @@ -102,7 +102,8 @@ set(HDR_MAP source/scwx/qt/map/alert_layer.hpp source/scwx/qt/map/overlay_layer.hpp source/scwx/qt/map/placefile_layer.hpp source/scwx/qt/map/radar_product_layer.hpp - source/scwx/qt/map/radar_range_layer.hpp) + source/scwx/qt/map/radar_range_layer.hpp + source/scwx/qt/map/radar_site_layer.hpp) set(SRC_MAP source/scwx/qt/map/alert_layer.cpp source/scwx/qt/map/color_table_layer.cpp source/scwx/qt/map/draw_layer.cpp @@ -114,7 +115,8 @@ set(SRC_MAP source/scwx/qt/map/alert_layer.cpp source/scwx/qt/map/overlay_layer.cpp source/scwx/qt/map/placefile_layer.cpp source/scwx/qt/map/radar_product_layer.cpp - source/scwx/qt/map/radar_range_layer.cpp) + source/scwx/qt/map/radar_range_layer.cpp + source/scwx/qt/map/radar_site_layer.cpp) set(HDR_MODEL source/scwx/qt/model/alert_model.hpp source/scwx/qt/model/alert_proxy_model.hpp source/scwx/qt/model/imgui_context_model.hpp diff --git a/scwx-qt/source/scwx/qt/map/radar_site_layer.cpp b/scwx-qt/source/scwx/qt/map/radar_site_layer.cpp new file mode 100644 index 00000000..6350883a --- /dev/null +++ b/scwx-qt/source/scwx/qt/map/radar_site_layer.cpp @@ -0,0 +1,147 @@ +#include +#include +#include +#include +#include + +// #include +#include +#include + +namespace scwx +{ +namespace qt +{ +namespace map +{ + +static const std::string logPrefix_ = "scwx::qt::map::radar_site_layer"; +static const auto logger_ = scwx::util::Logger::Create(logPrefix_); + +class RadarSiteLayer::Impl +{ +public: + explicit Impl(std::shared_ptr context) {} + ~Impl() = default; + + void RenderRadarSite(const QMapLibreGL::CustomLayerRenderParameters& params, + std::shared_ptr& radarSite); + + std::vector> radarSites_ {}; + + glm::vec2 mapScreenCoordLocation_ {}; + float mapScale_ {1.0f}; + float mapBearingCos_ {1.0f}; + float mapBearingSin_ {0.0f}; + float halfWidth_ {}; + float halfHeight_ {}; +}; + +RadarSiteLayer::RadarSiteLayer(std::shared_ptr context) : + DrawLayer(context), p(std::make_unique(context)) +{ +} + +RadarSiteLayer::~RadarSiteLayer() = default; + +void RadarSiteLayer::Initialize() +{ + logger_->debug("Initialize()"); + + p->radarSites_ = config::RadarSite::GetAll(); +} + +void RadarSiteLayer::Render( + const QMapLibreGL::CustomLayerRenderParameters& params) +{ + gl::OpenGLFunctions& gl = context()->gl(); + + context()->set_render_parameters(params); + + // Update map screen coordinate and scale information + p->mapScreenCoordLocation_ = util::maplibre::LatLongToScreenCoordinate( + {params.latitude, params.longitude}); + p->mapScale_ = std::pow(2.0, params.zoom) * mbgl::util::tileSize_D / + mbgl::util::DEGREES_MAX; + p->mapBearingCos_ = cosf(params.bearing * common::kDegreesToRadians); + p->mapBearingSin_ = sinf(params.bearing * common::kDegreesToRadians); + p->halfWidth_ = params.width * 0.5f; + p->halfHeight_ = params.height * 0.5f; + + for (auto& radarSite : p->radarSites_) + { + p->RenderRadarSite(params, radarSite); + } + + SCWX_GL_CHECK_ERROR(); +} + +void RadarSiteLayer::Impl::RenderRadarSite( + const QMapLibreGL::CustomLayerRenderParameters& params, + std::shared_ptr& radarSite) +{ + const std::string windowName = fmt::format("radar-site-{}", radarSite->id()); + + const auto screenCoordinates = + (util::maplibre::LatLongToScreenCoordinate( + {radarSite->latitude(), radarSite->longitude()}) - + mapScreenCoordLocation_) * + mapScale_; + + // Rotate text according to map rotation + float rotatedX = screenCoordinates.x; + float rotatedY = screenCoordinates.y; + if (params.bearing != 0.0) + { + rotatedX = screenCoordinates.x * mapBearingCos_ - + screenCoordinates.y * mapBearingSin_; + rotatedY = screenCoordinates.x * mapBearingSin_ + + screenCoordinates.y * mapBearingCos_; + } + + // Convert screen to ImGui coordinates + float x = rotatedX + halfWidth_; + float y = params.height - (rotatedY + halfHeight_); + + // Setup window to hold text + ImGui::SetNextWindowPos( + ImVec2 {x, y}, ImGuiCond_Always, ImVec2 {0.5f, 0.5f}); + if (ImGui::Begin(windowName.c_str(), + nullptr, + ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | + ImGuiWindowFlags_AlwaysAutoResize)) + { + // Render text + ImGui::TextUnformatted(radarSite->id().c_str()); + + // Store hover text for mouse picking pass + if (ImGui::IsItemHovered()) + { + // TODO + } + + // End window + ImGui::End(); + } +} + +void RadarSiteLayer::Deinitialize() +{ + logger_->debug("Deinitialize()"); + + p->radarSites_.clear(); +} + +bool RadarSiteLayer::RunMousePicking( + const QMapLibreGL::CustomLayerRenderParameters& /* params */, + const QPointF& /* mouseLocalPos */, + const QPointF& /* mouseGlobalPos */, + const glm::vec2& /* mouseCoords */) +{ + // TODO + return false; +} + +} // namespace map +} // namespace qt +} // namespace scwx diff --git a/scwx-qt/source/scwx/qt/map/radar_site_layer.hpp b/scwx-qt/source/scwx/qt/map/radar_site_layer.hpp new file mode 100644 index 00000000..20375297 --- /dev/null +++ b/scwx-qt/source/scwx/qt/map/radar_site_layer.hpp @@ -0,0 +1,34 @@ +#pragma once + +#include + +namespace scwx +{ +namespace qt +{ +namespace map +{ + +class RadarSiteLayer : public DrawLayer +{ +public: + explicit RadarSiteLayer(std::shared_ptr context); + ~RadarSiteLayer(); + + void Initialize() override final; + void Render(const QMapLibreGL::CustomLayerRenderParameters&) override final; + void Deinitialize() override final; + + bool RunMousePicking(const QMapLibreGL::CustomLayerRenderParameters& params, + const QPointF& mouseLocalPos, + const QPointF& mouseGlobalPos, + const glm::vec2& mouseCoords) override final; + +private: + class Impl; + std::unique_ptr p; +}; + +} // namespace map +} // namespace qt +} // namespace scwx From 798dc479f01caa4f9371b42d2695568340b2bddc Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Mon, 20 Nov 2023 07:42:50 -0600 Subject: [PATCH 2/6] Add radar site layer to layer model, and display on map --- scwx-qt/source/scwx/qt/map/map_widget.cpp | 8 ++++++ scwx-qt/source/scwx/qt/model/layer_model.cpp | 30 +++++++++++++------- scwx-qt/source/scwx/qt/types/layer_types.cpp | 1 + scwx-qt/source/scwx/qt/types/layer_types.hpp | 1 + 4 files changed, 29 insertions(+), 11 deletions(-) diff --git a/scwx-qt/source/scwx/qt/map/map_widget.cpp b/scwx-qt/source/scwx/qt/map/map_widget.cpp index 5b2a2e8a..1526daa7 100644 --- a/scwx-qt/source/scwx/qt/map/map_widget.cpp +++ b/scwx-qt/source/scwx/qt/map/map_widget.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -186,6 +187,7 @@ public: std::shared_ptr overlayLayer_; std::shared_ptr placefileLayer_; std::shared_ptr colorTableLayer_; + std::shared_ptr radarSiteLayer_ {nullptr}; std::list> placefileLayers_ {}; @@ -890,6 +892,12 @@ void MapWidgetImpl::AddLayer(types::LayerType type, } break; + // Create the radar site layer + case types::InformationLayer::RadarSite: + radarSiteLayer_ = std::make_shared(context_); + AddLayer(layerName, radarSiteLayer_, before); + break; + default: break; } diff --git a/scwx-qt/source/scwx/qt/model/layer_model.cpp b/scwx-qt/source/scwx/qt/model/layer_model.cpp index a153f4f2..0e545d96 100644 --- a/scwx-qt/source/scwx/qt/model/layer_model.cpp +++ b/scwx-qt/source/scwx/qt/model/layer_model.cpp @@ -39,6 +39,10 @@ static const QString kMimeFormat {"application/x.scwx-layer-model"}; static const std::vector kDefaultLayers_ { {types::LayerType::Information, types::InformationLayer::MapOverlay, false}, {types::LayerType::Information, types::InformationLayer::ColorTable, false}, + {types::LayerType::Information, + types::InformationLayer::RadarSite, + false, + {false, false, false, false}}, {types::LayerType::Data, types::DataLayer::RadarRange, true}, {types::LayerType::Alert, awips::Phenomenon::Tornado, true}, {types::LayerType::Alert, awips::Phenomenon::SnowSquall, true}, @@ -53,6 +57,10 @@ static const std::vector kDefaultLayers_ { static const std::vector kImmovableLayers_ { {types::LayerType::Information, types::InformationLayer::MapOverlay, false}, {types::LayerType::Information, types::InformationLayer::ColorTable, false}, + {types::LayerType::Information, + types::InformationLayer::RadarSite, + false, + {false, false, false, false}}, {types::LayerType::Map, types::MapLayer::MapSymbology, false}, {types::LayerType::Map, types::MapLayer::MapUnderlay, false}, }; @@ -235,13 +243,13 @@ void LayerModel::Impl::ValidateLayerSettings(types::LayerVector& layers) // Validate immovable layers std::vector immovableIterators {}; - types::LayerVector::iterator colorTableIterator {}; + types::LayerVector::iterator radarSiteIterator {}; types::LayerVector::iterator mapSymbologyIterator {}; types::LayerVector::iterator mapUnderlayIterator {}; for (auto& immovableLayer : kImmovableLayers_) { // Set the default displayed state for a layer that is not found - std::array displayed {true, true, true, true}; + std::array displayed = immovableLayer.displayed_; // Find the immovable layer auto it = std::find_if(layers.begin(), @@ -285,8 +293,8 @@ void LayerModel::Impl::ValidateLayerSettings(types::LayerVector& layers) { switch (std::get(it->description_)) { - case types::InformationLayer::ColorTable: - colorTableIterator = it; + case types::InformationLayer::RadarSite: + radarSiteIterator = it; break; default: @@ -330,10 +338,10 @@ void LayerModel::Impl::ValidateLayerSettings(types::LayerVector& layers) if (it == layers.end()) { - // If this is the first data layer, insert after the color table layer, + // If this is the first data layer, insert after the radar site layer, // otherwise, insert after the previous data layer types::LayerVector::iterator insertPosition = - dataIterators.empty() ? colorTableIterator + 1 : + dataIterators.empty() ? radarSiteIterator + 1 : dataIterators.back() + 1; it = layers.insert(insertPosition, {types::LayerType::Data, dataLayer}); @@ -398,7 +406,7 @@ void LayerModel::ResetLayers() types::LayerVector newLayers {}; newLayers.assign(kDefaultLayers_.cbegin(), kDefaultLayers_.cend()); - auto colorTableIterator = std::find_if( + auto radarSiteIterator = std::find_if( newLayers.begin(), newLayers.end(), [](const types::LayerInfo& layerInfo) @@ -406,7 +414,7 @@ void LayerModel::ResetLayers() return std::holds_alternative( layerInfo.description_) && std::get(layerInfo.description_) == - types::InformationLayer::ColorTable; + types::InformationLayer::RadarSite; }); // Add all existing placefile layers @@ -415,7 +423,7 @@ void LayerModel::ResetLayers() if (it->type_ == types::LayerType::Placefile) { newLayers.insert( - colorTableIterator + 1, + radarSiteIterator + 1, {it->type_, it->description_, it->movable_, it->displayed_}); } } @@ -1007,7 +1015,7 @@ void LayerModel::Impl::HandlePlacefileUpdate(const std::string& name, void LayerModel::Impl::AddPlacefile(const std::string& name) { - // Insert after color table + // Insert after radar site auto insertPosition = std::find_if( layers_.begin(), layers_.end(), @@ -1016,7 +1024,7 @@ void LayerModel::Impl::AddPlacefile(const std::string& name) return std::holds_alternative( layerInfo.description_) && std::get(layerInfo.description_) == - types::InformationLayer::ColorTable; + types::InformationLayer::RadarSite; }); if (insertPosition != layers_.end()) { diff --git a/scwx-qt/source/scwx/qt/types/layer_types.cpp b/scwx-qt/source/scwx/qt/types/layer_types.cpp index 0f7e1db8..b0bc9632 100644 --- a/scwx-qt/source/scwx/qt/types/layer_types.cpp +++ b/scwx-qt/source/scwx/qt/types/layer_types.cpp @@ -27,6 +27,7 @@ static const std::unordered_map dataLayerName_ { static const std::unordered_map informationLayerName_ {{InformationLayer::MapOverlay, "Map Overlay"}, + {InformationLayer::RadarSite, "Radar Site"}, {InformationLayer::ColorTable, "Color Table"}, {InformationLayer::Unknown, "?"}}; diff --git a/scwx-qt/source/scwx/qt/types/layer_types.hpp b/scwx-qt/source/scwx/qt/types/layer_types.hpp index 6a00d03b..1309b648 100644 --- a/scwx-qt/source/scwx/qt/types/layer_types.hpp +++ b/scwx-qt/source/scwx/qt/types/layer_types.hpp @@ -41,6 +41,7 @@ typedef scwx::util:: enum class InformationLayer { MapOverlay, + RadarSite, ColorTable, Unknown }; From de2e1fea3f63f382d49973a9b3bf0c35d857aac0 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Mon, 20 Nov 2023 20:49:07 -0600 Subject: [PATCH 3/6] Radar site buttons, styling and hover --- scwx-qt/source/scwx/qt/map/map_widget.cpp | 8 ++-- .../source/scwx/qt/map/radar_site_layer.cpp | 41 ++++++++++++++++--- .../source/scwx/qt/map/radar_site_layer.hpp | 6 +++ 3 files changed, 46 insertions(+), 9 deletions(-) diff --git a/scwx-qt/source/scwx/qt/map/map_widget.cpp b/scwx-qt/source/scwx/qt/map/map_widget.cpp index 1526daa7..c9428a8a 100644 --- a/scwx-qt/source/scwx/qt/map/map_widget.cpp +++ b/scwx-qt/source/scwx/qt/map/map_widget.cpp @@ -165,6 +165,8 @@ public: std::shared_ptr map_; std::list layerList_; + std::vector> genericLayers_ {}; + QStringList styleLayers_; types::LayerVector customLayers_; @@ -802,6 +804,7 @@ void MapWidgetImpl::AddLayers() map_->removeLayer(id.c_str()); } layerList_.clear(); + genericLayers_.clear(); placefileLayers_.clear(); // Update custom layer list from model @@ -961,6 +964,7 @@ void MapWidgetImpl::AddLayer(const std::string& id, map_->addCustomLayer(id.c_str(), std::move(pHost), before.c_str()); layerList_.push_back(id); + genericLayers_.push_back(layer); } catch (const std::exception&) { @@ -1206,10 +1210,8 @@ void MapWidgetImpl::RunMousePicking() util::maplibre::LatLongToScreenCoordinate(coordinate); // For each layer in reverse - // TODO: All Generic Layers, not just Placefile Layers bool itemPicked = false; - for (auto it = placefileLayers_.rbegin(); it != placefileLayers_.rend(); - ++it) + for (auto it = genericLayers_.rbegin(); it != genericLayers_.rend(); ++it) { // Run mouse picking for each layer if ((*it)->RunMousePicking( diff --git a/scwx-qt/source/scwx/qt/map/radar_site_layer.cpp b/scwx-qt/source/scwx/qt/map/radar_site_layer.cpp index 6350883a..dac18bfe 100644 --- a/scwx-qt/source/scwx/qt/map/radar_site_layer.cpp +++ b/scwx-qt/source/scwx/qt/map/radar_site_layer.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include @@ -21,12 +22,17 @@ static const auto logger_ = scwx::util::Logger::Create(logPrefix_); class RadarSiteLayer::Impl { public: - explicit Impl(std::shared_ptr context) {} + explicit Impl(RadarSiteLayer* self, std::shared_ptr context) : + self_ {self} + { + } ~Impl() = default; void RenderRadarSite(const QMapLibreGL::CustomLayerRenderParameters& params, std::shared_ptr& radarSite); + RadarSiteLayer* self_; + std::vector> radarSites_ {}; glm::vec2 mapScreenCoordLocation_ {}; @@ -35,10 +41,12 @@ public: float mapBearingSin_ {0.0f}; float halfWidth_ {}; float halfHeight_ {}; + + std::string hoverText_ {}; }; RadarSiteLayer::RadarSiteLayer(std::shared_ptr context) : - DrawLayer(context), p(std::make_unique(context)) + DrawLayer(context), p(std::make_unique(this, context)) { } @@ -68,11 +76,18 @@ void RadarSiteLayer::Render( p->halfWidth_ = params.width * 0.5f; p->halfHeight_ = params.height * 0.5f; + p->hoverText_.clear(); + + // Radar site ImGui windows shouldn't have padding + ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2 {0.0f, 0.0f}); + for (auto& radarSite : p->radarSites_) { p->RenderRadarSite(params, radarSite); } + ImGui::PopStyleVar(); + SCWX_GL_CHECK_ERROR(); } @@ -112,12 +127,21 @@ void RadarSiteLayer::Impl::RenderRadarSite( ImGuiWindowFlags_AlwaysAutoResize)) { // Render text - ImGui::TextUnformatted(radarSite->id().c_str()); + if (ImGui::Button(radarSite->id().c_str())) + { + Q_EMIT self_->RadarSiteSelected(radarSite->id()); + } // Store hover text for mouse picking pass if (ImGui::IsItemHovered()) { - // TODO + hoverText_ = + fmt::format("{} ({})\n{}\n{}, {}", + radarSite->id(), + radarSite->type_name(), + radarSite->location_name(), + common::GetLatitudeString(radarSite->latitude()), + common::GetLongitudeString(radarSite->longitude())); } // End window @@ -135,10 +159,15 @@ void RadarSiteLayer::Deinitialize() bool RadarSiteLayer::RunMousePicking( const QMapLibreGL::CustomLayerRenderParameters& /* params */, const QPointF& /* mouseLocalPos */, - const QPointF& /* mouseGlobalPos */, + const QPointF& mouseGlobalPos, const glm::vec2& /* mouseCoords */) { - // TODO + if (!p->hoverText_.empty()) + { + util::tooltip::Show(p->hoverText_, mouseGlobalPos); + return true; + } + return false; } diff --git a/scwx-qt/source/scwx/qt/map/radar_site_layer.hpp b/scwx-qt/source/scwx/qt/map/radar_site_layer.hpp index 20375297..639be3b6 100644 --- a/scwx-qt/source/scwx/qt/map/radar_site_layer.hpp +++ b/scwx-qt/source/scwx/qt/map/radar_site_layer.hpp @@ -11,6 +11,9 @@ namespace map class RadarSiteLayer : public DrawLayer { + Q_OBJECT + Q_DISABLE_COPY_MOVE(RadarSiteLayer) + public: explicit RadarSiteLayer(std::shared_ptr context); ~RadarSiteLayer(); @@ -24,6 +27,9 @@ public: const QPointF& mouseGlobalPos, const glm::vec2& mouseCoords) override final; +signals: + void RadarSiteSelected(const std::string& id); + private: class Impl; std::unique_ptr p; From 6087c53b3e258bde0bb2772868b4889fc0a1c756 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Mon, 20 Nov 2023 21:03:03 -0600 Subject: [PATCH 4/6] Connect radar site layer signal to trigger update --- scwx-qt/source/scwx/qt/main/main_window.cpp | 12 ++++++++++++ scwx-qt/source/scwx/qt/map/map_widget.cpp | 4 ++++ scwx-qt/source/scwx/qt/map/map_widget.hpp | 1 + 3 files changed, 17 insertions(+) diff --git a/scwx-qt/source/scwx/qt/main/main_window.cpp b/scwx-qt/source/scwx/qt/main/main_window.cpp index bd97c031..d07ca41c 100644 --- a/scwx-qt/source/scwx/qt/main/main_window.cpp +++ b/scwx-qt/source/scwx/qt/main/main_window.cpp @@ -807,6 +807,18 @@ void MainWindowImpl::ConnectAnimationSignals() &map::MapWidget::WidgetPainted, timelineManager_.get(), [=, this]() { timelineManager_->ReceiveMapWidgetPainted(i); }); + connect(maps_[i], + &map::MapWidget::RadarSiteRequested, + this, + [this](const std::string& id) + { + for (map::MapWidget* map : maps_) + { + map->SelectRadarSite(id); + } + + UpdateRadarSite(); + }); } } diff --git a/scwx-qt/source/scwx/qt/map/map_widget.cpp b/scwx-qt/source/scwx/qt/map/map_widget.cpp index c9428a8a..7c543bdd 100644 --- a/scwx-qt/source/scwx/qt/map/map_widget.cpp +++ b/scwx-qt/source/scwx/qt/map/map_widget.cpp @@ -899,6 +899,10 @@ void MapWidgetImpl::AddLayer(types::LayerType type, case types::InformationLayer::RadarSite: radarSiteLayer_ = std::make_shared(context_); AddLayer(layerName, radarSiteLayer_, before); + connect(radarSiteLayer_.get(), + &RadarSiteLayer::RadarSiteSelected, + widget_, + &MapWidget::RadarSiteRequested); break; default: diff --git a/scwx-qt/source/scwx/qt/map/map_widget.hpp b/scwx-qt/source/scwx/qt/map/map_widget.hpp index c130c3e6..1f863df3 100644 --- a/scwx-qt/source/scwx/qt/map/map_widget.hpp +++ b/scwx-qt/source/scwx/qt/map/map_widget.hpp @@ -147,6 +147,7 @@ signals: double bearing, double pitch); void MapStyleChanged(const std::string& styleName); + void RadarSiteRequested(const std::string& id); void RadarSiteUpdated(std::shared_ptr radarSite); void RadarSweepUpdated(); void RadarSweepNotUpdated(types::NoUpdateReason reason); From f85c45e70aa5a1b10510e6681be6a429659f0206 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Mon, 20 Nov 2023 21:04:28 -0600 Subject: [PATCH 5/6] Rename Radar Site layer to Radar Sites --- scwx-qt/source/scwx/qt/types/layer_types.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scwx-qt/source/scwx/qt/types/layer_types.cpp b/scwx-qt/source/scwx/qt/types/layer_types.cpp index b0bc9632..d935cd42 100644 --- a/scwx-qt/source/scwx/qt/types/layer_types.cpp +++ b/scwx-qt/source/scwx/qt/types/layer_types.cpp @@ -27,7 +27,7 @@ static const std::unordered_map dataLayerName_ { static const std::unordered_map informationLayerName_ {{InformationLayer::MapOverlay, "Map Overlay"}, - {InformationLayer::RadarSite, "Radar Site"}, + {InformationLayer::RadarSite, "Radar Sites"}, {InformationLayer::ColorTable, "Color Table"}, {InformationLayer::Unknown, "?"}}; From 6ab2bfb1a1930e54deac979870a436dc61ff7400 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Mon, 20 Nov 2023 21:31:52 -0600 Subject: [PATCH 6/6] Remove unused context parameter in RadarSiteLayer --- scwx-qt/source/scwx/qt/map/radar_site_layer.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scwx-qt/source/scwx/qt/map/radar_site_layer.cpp b/scwx-qt/source/scwx/qt/map/radar_site_layer.cpp index dac18bfe..92d8a1f6 100644 --- a/scwx-qt/source/scwx/qt/map/radar_site_layer.cpp +++ b/scwx-qt/source/scwx/qt/map/radar_site_layer.cpp @@ -22,10 +22,7 @@ static const auto logger_ = scwx::util::Logger::Create(logPrefix_); class RadarSiteLayer::Impl { public: - explicit Impl(RadarSiteLayer* self, std::shared_ptr context) : - self_ {self} - { - } + explicit Impl(RadarSiteLayer* self) : self_ {self} {} ~Impl() = default; void RenderRadarSite(const QMapLibreGL::CustomLayerRenderParameters& params, @@ -46,7 +43,7 @@ public: }; RadarSiteLayer::RadarSiteLayer(std::shared_ptr context) : - DrawLayer(context), p(std::make_unique(this, context)) + DrawLayer(context), p(std::make_unique(this)) { }