From 44ada2cc8d3d06652e82cd8ee17167d0befa198e Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Fri, 3 Nov 2023 05:41:59 -0500 Subject: [PATCH] Add layer debug --- scwx-qt/source/scwx/qt/main/main_window.cpp | 5 +++++ scwx-qt/source/scwx/qt/main/main_window.hpp | 1 + scwx-qt/source/scwx/qt/main/main_window.ui | 6 ++++++ scwx-qt/source/scwx/qt/map/map_widget.cpp | 5 +++++ scwx-qt/source/scwx/qt/map/map_widget.hpp | 2 ++ 5 files changed, 19 insertions(+) diff --git a/scwx-qt/source/scwx/qt/main/main_window.cpp b/scwx-qt/source/scwx/qt/main/main_window.cpp index 10b80f1d..5c2a94fc 100644 --- a/scwx-qt/source/scwx/qt/main/main_window.cpp +++ b/scwx-qt/source/scwx/qt/main/main_window.cpp @@ -470,6 +470,11 @@ void MainWindow::on_actionImGuiDebug_triggered() p->imGuiDebugDialog_->show(); } +void MainWindow::on_actionDumpLayerList_triggered() +{ + p->activeMap_->DumpLayerList(); +} + void MainWindow::on_actionDumpRadarProductRecords_triggered() { manager::RadarProductManager::DumpRecords(); diff --git a/scwx-qt/source/scwx/qt/main/main_window.hpp b/scwx-qt/source/scwx/qt/main/main_window.hpp index 19fddd79..f4532f44 100644 --- a/scwx-qt/source/scwx/qt/main/main_window.hpp +++ b/scwx-qt/source/scwx/qt/main/main_window.hpp @@ -39,6 +39,7 @@ private slots: void on_actionPlacefileManager_triggered(); void on_actionLayerManager_triggered(); void on_actionImGuiDebug_triggered(); + void on_actionDumpLayerList_triggered(); void on_actionDumpRadarProductRecords_triggered(); void on_actionUserManual_triggered(); void on_actionDiscord_triggered(); diff --git a/scwx-qt/source/scwx/qt/main/main_window.ui b/scwx-qt/source/scwx/qt/main/main_window.ui index d2065105..628d6ddc 100644 --- a/scwx-qt/source/scwx/qt/main/main_window.ui +++ b/scwx-qt/source/scwx/qt/main/main_window.ui @@ -85,6 +85,7 @@ + @@ -441,6 +442,11 @@ &Layer Manager + + + Dump &Layer List + + diff --git a/scwx-qt/source/scwx/qt/map/map_widget.cpp b/scwx-qt/source/scwx/qt/map/map_widget.cpp index 2502567d..403a15c4 100644 --- a/scwx-qt/source/scwx/qt/map/map_widget.cpp +++ b/scwx-qt/source/scwx/qt/map/map_widget.cpp @@ -754,6 +754,11 @@ void MapWidget::changeStyle() Q_EMIT MapStyleChanged(p->currentStyle_->name_); } +void MapWidget::DumpLayerList() const +{ + logger_->debug("Layers: {}", p->map_->layerIds().join(", ").toStdString()); +} + std::string MapWidgetImpl::FindMapSymbologyLayer() { std::string before = "ferry"; diff --git a/scwx-qt/source/scwx/qt/map/map_widget.hpp b/scwx-qt/source/scwx/qt/map/map_widget.hpp index aadf1a8e..c130c3e6 100644 --- a/scwx-qt/source/scwx/qt/map/map_widget.hpp +++ b/scwx-qt/source/scwx/qt/map/map_widget.hpp @@ -35,6 +35,8 @@ public: explicit MapWidget(std::size_t id, const QMapLibreGL::Settings&); ~MapWidget(); + void DumpLayerList() const; + common::Level3ProductCategoryMap GetAvailableLevel3Categories(); float GetElevation() const; std::vector GetElevationCuts() const;