diff --git a/model/scwx.uml b/model/scwx.uml index d108e1b0..a33c5ec8 100644 --- a/model/scwx.uml +++ b/model/scwx.uml @@ -31,7 +31,7 @@ - + @@ -49,7 +49,7 @@ - + @@ -105,7 +105,7 @@ - + diff --git a/model/scwx_en_US.properties b/model/scwx_en_US.properties index bc43e277..b151da3a 100644 --- a/model/scwx_en_US.properties +++ b/model/scwx_en_US.properties @@ -1,2 +1,2 @@ -#Sat Oct 23 08:00:47 CDT 2021 +#Sat Oct 30 22:49:04 CDT 2021 _label_asdf=asdf2 diff --git a/scwx-qt/scwx-qt.cmake b/scwx-qt/scwx-qt.cmake index af189e39..0f226403 100644 --- a/scwx-qt/scwx-qt.cmake +++ b/scwx-qt/scwx-qt.cmake @@ -58,20 +58,20 @@ set(HDR_GL source/scwx/qt/gl/gl.hpp source/scwx/qt/gl/text_shader.hpp) set(SRC_GL source/scwx/qt/gl/shader_program.cpp source/scwx/qt/gl/text_shader.cpp) -set(HDR_MANAGER source/scwx/qt/manager/radar_manager.hpp +set(HDR_MANAGER source/scwx/qt/manager/radar_product_manager.hpp source/scwx/qt/manager/resource_manager.hpp source/scwx/qt/manager/settings_manager.hpp) -set(SRC_MANAGER source/scwx/qt/manager/radar_manager.cpp +set(SRC_MANAGER source/scwx/qt/manager/radar_product_manager.cpp source/scwx/qt/manager/resource_manager.cpp source/scwx/qt/manager/settings_manager.cpp) set(HDR_MAP source/scwx/qt/map/map_widget.hpp source/scwx/qt/map/overlay_layer.hpp - source/scwx/qt/map/radar_layer.hpp + source/scwx/qt/map/radar_product_layer.hpp source/scwx/qt/map/radar_range_layer.hpp source/scwx/qt/map/triangle_layer.hpp) set(SRC_MAP source/scwx/qt/map/map_widget.cpp source/scwx/qt/map/overlay_layer.cpp - source/scwx/qt/map/radar_layer.cpp + source/scwx/qt/map/radar_product_layer.cpp source/scwx/qt/map/radar_range_layer.cpp source/scwx/qt/map/triangle_layer.cpp) set(HDR_SETTINGS source/scwx/qt/settings/general_settings.hpp) @@ -82,8 +82,8 @@ set(HDR_UTIL source/scwx/qt/util/font.hpp set(SRC_UTIL source/scwx/qt/util/font.cpp source/scwx/qt/util/font_buffer.cpp source/scwx/qt/util/json.cpp) -set(HDR_VIEW source/scwx/qt/view/radar_view.hpp) -set(SRC_VIEW source/scwx/qt/view/radar_view.cpp) +set(HDR_VIEW source/scwx/qt/view/radar_product_view.hpp) +set(SRC_VIEW source/scwx/qt/view/radar_product_view.cpp) set(RESOURCE_FILES scwx-qt.qrc) diff --git a/scwx-qt/source/scwx/qt/manager/radar_manager.cpp b/scwx-qt/source/scwx/qt/manager/radar_product_manager.cpp similarity index 87% rename from scwx-qt/source/scwx/qt/manager/radar_manager.cpp rename to scwx-qt/source/scwx/qt/manager/radar_product_manager.cpp index 79fdabd5..c58ef0db 100644 --- a/scwx-qt/source/scwx/qt/manager/radar_manager.cpp +++ b/scwx-qt/source/scwx/qt/manager/radar_product_manager.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include @@ -17,7 +17,8 @@ namespace qt namespace manager { -static const std::string logPrefix_ = "[scwx::qt::manager::radar_manager] "; +static const std::string logPrefix_ = + "[scwx::qt::manager::radar_product_manager] "; static constexpr uint32_t NUM_RADIAL_GATES_0_5_DEGREE = common::MAX_0_5_DEGREE_RADIALS * common::MAX_DATA_MOMENT_GATES; @@ -31,11 +32,11 @@ static constexpr uint32_t NUM_COORIDNATES_1_DEGREE = // TODO: Configure this in settings for radar loop static constexpr size_t MAX_LEVEL2_FILES = 6; -class RadarManagerImpl +class RadarProductManagerImpl { public: - explicit RadarManagerImpl() {} - ~RadarManagerImpl() = default; + explicit RadarProductManagerImpl() {} + ~RadarProductManagerImpl() = default; std::vector coordinates0_5Degree_; std::vector coordinates1Degree_; @@ -43,11 +44,14 @@ public: std::deque> level2Data_; }; -RadarManager::RadarManager() : p(std::make_unique()) {} -RadarManager::~RadarManager() = default; +RadarProductManager::RadarProductManager() : + p(std::make_unique()) +{ +} +RadarProductManager::~RadarProductManager() = default; const std::vector& -RadarManager::coordinates(common::RadialSize radialSize) const +RadarProductManager::coordinates(common::RadialSize radialSize) const { switch (radialSize) { @@ -58,7 +62,7 @@ RadarManager::coordinates(common::RadialSize radialSize) const throw std::exception("Invalid radial size"); } -std::shared_ptr RadarManager::level2_data() const +std::shared_ptr RadarProductManager::level2_data() const { std::shared_ptr level2Data = nullptr; @@ -70,7 +74,7 @@ std::shared_ptr RadarManager::level2_data() const return level2Data; } -void RadarManager::Initialize() +void RadarProductManager::Initialize() { BOOST_LOG_TRIVIAL(debug) << logPrefix_ << "Initialize()"; @@ -157,7 +161,7 @@ void RadarManager::Initialize() << timer.format(6, "%ws"); } -void RadarManager::LoadLevel2Data(const std::string& filename) +void RadarProductManager::LoadLevel2Data(const std::string& filename) { std::shared_ptr ar2vFile = std::make_shared(); diff --git a/scwx-qt/source/scwx/qt/manager/radar_manager.hpp b/scwx-qt/source/scwx/qt/manager/radar_product_manager.hpp similarity index 76% rename from scwx-qt/source/scwx/qt/manager/radar_manager.hpp rename to scwx-qt/source/scwx/qt/manager/radar_product_manager.hpp index 80c7a418..85bf0cf2 100644 --- a/scwx-qt/source/scwx/qt/manager/radar_manager.hpp +++ b/scwx-qt/source/scwx/qt/manager/radar_product_manager.hpp @@ -15,15 +15,15 @@ namespace qt namespace manager { -class RadarManagerImpl; +class RadarProductManagerImpl; -class RadarManager : public QObject +class RadarProductManager : public QObject { Q_OBJECT public: - explicit RadarManager(); - ~RadarManager(); + explicit RadarProductManager(); + ~RadarProductManager(); const std::vector& coordinates(common::RadialSize radialSize) const; @@ -37,7 +37,7 @@ signals: void Level2DataLoaded(); private: - std::unique_ptr p; + std::unique_ptr p; }; } // namespace manager diff --git a/scwx-qt/source/scwx/qt/map/map_widget.cpp b/scwx-qt/source/scwx/qt/map/map_widget.cpp index d15814ab..ee15fda0 100644 --- a/scwx-qt/source/scwx/qt/map/map_widget.cpp +++ b/scwx-qt/source/scwx/qt/map/map_widget.cpp @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include #include @@ -41,7 +41,7 @@ public: gl_(), settings_(settings), map_(), - radarManager_ {std::make_shared()}, + radarProductManager_ {std::make_shared()}, lastPos_(), frameDraws_(0) { @@ -53,7 +53,7 @@ public: QMapboxGLSettings settings_; std::shared_ptr map_; - std::shared_ptr radarManager_; + std::shared_ptr radarProductManager_; QPointF lastPos_; @@ -65,11 +65,11 @@ MapWidget::MapWidget(const QMapboxGLSettings& settings) : { setFocusPolicy(Qt::StrongFocus); - p->radarManager_->Initialize(); + p->radarProductManager_->Initialize(); QString ar2vFile = qgetenv("AR2V_FILE"); if (!ar2vFile.isEmpty()) { - p->radarManager_->LoadLevel2Data(ar2vFile.toUtf8().constData()); + p->radarProductManager_->LoadLevel2Data(ar2vFile.toUtf8().constData()); } } @@ -103,24 +103,25 @@ void MapWidget::changeStyle() void MapWidget::AddLayers() { - std::shared_ptr radarView = - std::make_shared(p->radarManager_, p->map_); + std::shared_ptr radarProductView = + std::make_shared(p->radarProductManager_, + p->map_); - radarView->Initialize(); + radarProductView->Initialize(); QString colorTableFile = qgetenv("COLOR_TABLE"); if (!colorTableFile.isEmpty()) { std::shared_ptr colorTable = common::ColorTable::Load(colorTableFile.toUtf8().constData()); - radarView->LoadColorTable(colorTable); + radarProductView->LoadColorTable(colorTable); } // QMapboxGL::addCustomLayer will take ownership of the QScopedPointer QScopedPointer pHost( - new RadarLayer(radarView, p->gl_)); + new RadarProductLayer(radarProductView, p->gl_)); QScopedPointer pOverlayHost( - new OverlayLayer(radarView, p->gl_)); + new OverlayLayer(radarProductView, p->gl_)); QString before = "ferry"; diff --git a/scwx-qt/source/scwx/qt/map/overlay_layer.cpp b/scwx-qt/source/scwx/qt/map/overlay_layer.cpp index a20356a8..1cd9cf0d 100644 --- a/scwx-qt/source/scwx/qt/map/overlay_layer.cpp +++ b/scwx-qt/source/scwx/qt/map/overlay_layer.cpp @@ -28,9 +28,10 @@ static const std::string logPrefix_ = "[scwx::qt::map::overlay_layer] "; class OverlayLayerImpl { public: - explicit OverlayLayerImpl(std::shared_ptr radarView, - gl::OpenGLFunctions& gl) : - radarView_(radarView), + explicit OverlayLayerImpl( + std::shared_ptr radarProductView, + gl::OpenGLFunctions& gl) : + radarProductView_(radarProductView), gl_(gl), textShader_(gl), font_(util::Font::Create(":/res/fonts/din1451alt.ttf")), @@ -48,8 +49,8 @@ public: } ~OverlayLayerImpl() = default; - std::shared_ptr radarView_; - gl::OpenGLFunctions& gl_; + std::shared_ptr radarProductView_; + gl::OpenGLFunctions& gl_; gl::TextShader textShader_; std::shared_ptr font_; @@ -66,9 +67,10 @@ public: bool plotUpdated_; }; -OverlayLayer::OverlayLayer(std::shared_ptr radarView, - gl::OpenGLFunctions& gl) : - p(std::make_unique(radarView, gl)) +OverlayLayer::OverlayLayer( + std::shared_ptr radarProductView, + gl::OpenGLFunctions& gl) : + p(std::make_unique(radarProductView, gl)) { } OverlayLayer::~OverlayLayer() = default; @@ -124,8 +126,8 @@ void OverlayLayer::initialize() // Bottom panel color gl.glUniform4f(p->uColorLocation_, 0.0f, 0.0f, 0.0f, 0.75f); - connect(p->radarView_.get(), - &view::RadarView::PlotUpdated, + connect(p->radarProductView_.get(), + &view::RadarProductView::PlotUpdated, this, &OverlayLayer::ReceivePlotUpdate); } @@ -139,7 +141,8 @@ void OverlayLayer::render(const QMapbox::CustomLayerRenderParameters& params) if (p->plotUpdated_) { using namespace std::chrono; - auto plotTime = time_point_cast(p->radarView_->PlotTime()); + auto plotTime = + time_point_cast(p->radarProductView_->PlotTime()); if (plotTime.time_since_epoch().count() != 0) { @@ -207,8 +210,8 @@ void OverlayLayer::deinitialize() p->vbo_ = {GL_INVALID_INDEX}; p->texture_ = GL_INVALID_INDEX; - disconnect(p->radarView_.get(), - &view::RadarView::PlotUpdated, + disconnect(p->radarProductView_.get(), + &view::RadarProductView::PlotUpdated, this, &OverlayLayer::ReceivePlotUpdate); } diff --git a/scwx-qt/source/scwx/qt/map/overlay_layer.hpp b/scwx-qt/source/scwx/qt/map/overlay_layer.hpp index 8147fa3f..72532625 100644 --- a/scwx-qt/source/scwx/qt/map/overlay_layer.hpp +++ b/scwx-qt/source/scwx/qt/map/overlay_layer.hpp @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #include @@ -19,8 +19,9 @@ class OverlayLayer : public QObject, public QMapbox::CustomLayerHostInterface Q_OBJECT public: - explicit OverlayLayer(std::shared_ptr radarView, - gl::OpenGLFunctions& gl); + explicit OverlayLayer( + std::shared_ptr radarProductView, + gl::OpenGLFunctions& gl); ~OverlayLayer(); void initialize() override final; diff --git a/scwx-qt/source/scwx/qt/map/radar_layer.cpp b/scwx-qt/source/scwx/qt/map/radar_product_layer.cpp similarity index 74% rename from scwx-qt/source/scwx/qt/map/radar_layer.cpp rename to scwx-qt/source/scwx/qt/map/radar_product_layer.cpp index 80d1d8ac..c9ee350c 100644 --- a/scwx-qt/source/scwx/qt/map/radar_layer.cpp +++ b/scwx-qt/source/scwx/qt/map/radar_product_layer.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include @@ -21,17 +21,18 @@ namespace map static constexpr uint32_t MAX_RADIALS = 720; static constexpr uint32_t MAX_DATA_MOMENT_GATES = 1840; -static const std::string logPrefix_ = "[scwx::qt::map::radar_layer] "; +static const std::string logPrefix_ = "[scwx::qt::map::radar_product_layer] "; static glm::vec2 LatLongToScreenCoordinate(const QMapbox::Coordinate& coordinate); -class RadarLayerImpl +class RadarProductLayerImpl { public: - explicit RadarLayerImpl(std::shared_ptr radarView, - gl::OpenGLFunctions& gl) : - radarView_(radarView), + explicit RadarProductLayerImpl( + std::shared_ptr radarProductView, + gl::OpenGLFunctions& gl) : + radarProductView_(radarProductView), gl_(gl), shaderProgram_(gl), uMVPMatrixLocation_(GL_INVALID_INDEX), @@ -44,10 +45,10 @@ public: plotUpdated_(false) { } - ~RadarLayerImpl() = default; + ~RadarProductLayerImpl() = default; - std::shared_ptr radarView_; - gl::OpenGLFunctions& gl_; + std::shared_ptr radarProductView_; + gl::OpenGLFunctions& gl_; gl::ShaderProgram shaderProgram_; GLint uMVPMatrixLocation_; @@ -62,14 +63,15 @@ public: bool plotUpdated_; }; -RadarLayer::RadarLayer(std::shared_ptr radarView, - gl::OpenGLFunctions& gl) : - p(std::make_unique(radarView, gl)) +RadarProductLayer::RadarProductLayer( + std::shared_ptr radarProductView, + gl::OpenGLFunctions& gl) : + p(std::make_unique(radarProductView, gl)) { } -RadarLayer::~RadarLayer() = default; +RadarProductLayer::~RadarProductLayer() = default; -void RadarLayer::initialize() +void RadarProductLayer::initialize() { BOOST_LOG_TRIVIAL(debug) << logPrefix_ << "initialize()"; @@ -99,27 +101,27 @@ void RadarLayer::initialize() // Generate vertex buffer objects gl.glGenBuffers(2, p->vbo_.data()); - // Update radar plot - UpdatePlot(); + // Update radar sweep + UpdateSweep(); // Create color table gl.glGenTextures(1, &p->texture_); UpdateColorTable(); gl.glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - connect(p->radarView_.get(), - &view::RadarView::ColorTableLoaded, + connect(p->radarProductView_.get(), + &view::RadarProductView::ColorTableLoaded, this, - &RadarLayer::ReceiveColorTableUpdate); - connect(p->radarView_.get(), - &view::RadarView::PlotUpdated, + &RadarProductLayer::ReceiveColorTableUpdate); + connect(p->radarProductView_.get(), + &view::RadarProductView::PlotUpdated, this, - &RadarLayer::ReceivePlotUpdate); + &RadarProductLayer::ReceivePlotUpdate); } -void RadarLayer::UpdatePlot() +void RadarProductLayer::UpdateSweep() { - BOOST_LOG_TRIVIAL(debug) << logPrefix_ << "UpdatePlot()"; + BOOST_LOG_TRIVIAL(debug) << logPrefix_ << "UpdateSweep()"; p->plotUpdated_ = false; @@ -127,9 +129,11 @@ void RadarLayer::UpdatePlot() boost::timer::cpu_timer timer; - const std::vector& vertices = p->radarView_->vertices(); - const std::vector& dataMoments8 = p->radarView_->data_moments8(); - const std::vector& dataMoments16 = p->radarView_->data_moments16(); + const std::vector& vertices = p->radarProductView_->vertices(); + const std::vector& dataMoments8 = + p->radarProductView_->data_moments8(); + const std::vector& dataMoments16 = + p->radarProductView_->data_moments16(); // Bind a vertex array object gl.glBindVertexArray(p->vao_); @@ -182,7 +186,8 @@ void RadarLayer::UpdatePlot() p->numVertices_ = vertices.size() / 2; } -void RadarLayer::render(const QMapbox::CustomLayerRenderParameters& params) +void RadarProductLayer::render( + const QMapbox::CustomLayerRenderParameters& params) { gl::OpenGLFunctions& gl = p->gl_; @@ -193,13 +198,13 @@ void RadarLayer::render(const QMapbox::CustomLayerRenderParameters& params) if (p->plotUpdated_) { - UpdatePlot(); + UpdateSweep(); } p->shaderProgram_.Use(); - const float scale = p->radarView_->scale() * 2.0f * mbgl::util::tileSize / - mbgl::util::DEGREES_MAX; + const float scale = p->radarProductView_->scale() * 2.0f * + mbgl::util::tileSize / mbgl::util::DEGREES_MAX; const float xScale = scale / params.width; const float yScale = scale / params.height; @@ -223,7 +228,7 @@ void RadarLayer::render(const QMapbox::CustomLayerRenderParameters& params) gl.glDrawArrays(GL_TRIANGLES, 0, p->numVertices_); } -void RadarLayer::deinitialize() +void RadarProductLayer::deinitialize() { gl::OpenGLFunctions& gl = p->gl_; @@ -237,17 +242,17 @@ void RadarLayer::deinitialize() p->vbo_ = {GL_INVALID_INDEX}; p->texture_ = GL_INVALID_INDEX; - disconnect(p->radarView_.get(), - &view::RadarView::ColorTableLoaded, + disconnect(p->radarProductView_.get(), + &view::RadarProductView::ColorTableLoaded, this, - &RadarLayer::ReceiveColorTableUpdate); - disconnect(p->radarView_.get(), - &view::RadarView::PlotUpdated, + &RadarProductLayer::ReceiveColorTableUpdate); + disconnect(p->radarProductView_.get(), + &view::RadarProductView::PlotUpdated, this, - &RadarLayer::ReceivePlotUpdate); + &RadarProductLayer::ReceivePlotUpdate); } -void RadarLayer::UpdateColorTable() +void RadarProductLayer::UpdateColorTable() { BOOST_LOG_TRIVIAL(debug) << logPrefix_ << "UpdateColorTable()"; @@ -256,7 +261,7 @@ void RadarLayer::UpdateColorTable() gl::OpenGLFunctions& gl = p->gl_; const std::vector& colorTable = - p->radarView_->color_table(); + p->radarProductView_->color_table(); gl.glActiveTexture(GL_TEXTURE0); gl.glBindTexture(GL_TEXTURE_1D, p->texture_); @@ -271,12 +276,12 @@ void RadarLayer::UpdateColorTable() gl.glGenerateMipmap(GL_TEXTURE_1D); } -void RadarLayer::ReceiveColorTableUpdate() +void RadarProductLayer::ReceiveColorTableUpdate() { p->colorTableUpdated_ = true; } -void RadarLayer::ReceivePlotUpdate() +void RadarProductLayer::ReceivePlotUpdate() { p->plotUpdated_ = true; } diff --git a/scwx-qt/source/scwx/qt/map/radar_layer.hpp b/scwx-qt/source/scwx/qt/map/radar_product_layer.hpp similarity index 53% rename from scwx-qt/source/scwx/qt/map/radar_layer.hpp rename to scwx-qt/source/scwx/qt/map/radar_product_layer.hpp index fc7e236b..03582843 100644 --- a/scwx-qt/source/scwx/qt/map/radar_layer.hpp +++ b/scwx-qt/source/scwx/qt/map/radar_product_layer.hpp @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #include @@ -12,30 +12,33 @@ namespace qt namespace map { -class RadarLayerImpl; +class RadarProductLayerImpl; -class RadarLayer : public QObject, public QMapbox::CustomLayerHostInterface +class RadarProductLayer : + public QObject, + public QMapbox::CustomLayerHostInterface { Q_OBJECT public: - explicit RadarLayer(std::shared_ptr radarView, - gl::OpenGLFunctions& gl); - ~RadarLayer(); + explicit RadarProductLayer( + std::shared_ptr radarProductView, + gl::OpenGLFunctions& gl); + ~RadarProductLayer(); void initialize() override final; void render(const QMapbox::CustomLayerRenderParameters&) override final; void deinitialize() override final; void UpdateColorTable(); - void UpdatePlot(); + void UpdateSweep(); public slots: void ReceiveColorTableUpdate(); void ReceivePlotUpdate(); private: - std::unique_ptr p; + std::unique_ptr p; }; } // namespace map diff --git a/scwx-qt/source/scwx/qt/view/radar_view.cpp b/scwx-qt/source/scwx/qt/view/radar_product_view.cpp similarity index 85% rename from scwx-qt/source/scwx/qt/view/radar_view.cpp rename to scwx-qt/source/scwx/qt/view/radar_product_view.cpp index 4f0d76bc..b9a4ad57 100644 --- a/scwx-qt/source/scwx/qt/view/radar_view.cpp +++ b/scwx-qt/source/scwx/qt/view/radar_product_view.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include @@ -12,7 +12,7 @@ namespace qt namespace view { -static const std::string logPrefix_ = "[scwx::qt::view::radar_view] "; +static const std::string logPrefix_ = "[scwx::qt::view::radar_product_view] "; static constexpr uint32_t VERTICES_PER_BIN = 6; static constexpr uint32_t VALUES_PER_VERTEX = 2; @@ -20,12 +20,13 @@ static constexpr uint32_t VALUES_PER_VERTEX = 2; static std::chrono::system_clock::time_point TimePoint(uint16_t modifiedJulianDate, uint32_t milliseconds); -class RadarViewImpl +class RadarProductViewImpl { public: - explicit RadarViewImpl(std::shared_ptr radarManager, - std::shared_ptr map) : - radarManager_(radarManager), + explicit RadarProductViewImpl( + std::shared_ptr radarProductManager, + std::shared_ptr map) : + radarProductManager_(radarProductManager), map_(map), plotTime_(), colorTable_ {boost::gil::rgba8_pixel_t(0, 128, 0, 255), @@ -33,10 +34,10 @@ public: boost::gil::rgba8_pixel_t(255, 0, 0, 255)} { } - ~RadarViewImpl() = default; + ~RadarProductViewImpl() = default; - std::shared_ptr radarManager_; - std::shared_ptr map_; + std::shared_ptr radarProductManager_; + std::shared_ptr map_; std::vector vertices_; std::vector dataMoments8_; @@ -47,53 +48,56 @@ public: std::vector colorTable_; }; -RadarView::RadarView(std::shared_ptr radarManager, - std::shared_ptr map) : - p(std::make_unique(radarManager, map)) +RadarProductView::RadarProductView( + std::shared_ptr radarProductManager, + std::shared_ptr map) : + p(std::make_unique(radarProductManager, map)) { - connect(radarManager.get(), - &manager::RadarManager::Level2DataLoaded, + connect(radarProductManager.get(), + &manager::RadarProductManager::Level2DataLoaded, this, - &RadarView::UpdatePlot); + &RadarProductView::UpdatePlot); } -RadarView::~RadarView() = default; +RadarProductView::~RadarProductView() = default; -double RadarView::bearing() const +double RadarProductView::bearing() const { return p->map_->bearing(); } -double RadarView::scale() const +double RadarProductView::scale() const { return p->map_->scale(); } -const std::vector& RadarView::data_moments8() const +const std::vector& RadarProductView::data_moments8() const { return p->dataMoments8_; } -const std::vector& RadarView::data_moments16() const +const std::vector& RadarProductView::data_moments16() const { return p->dataMoments16_; } -const std::vector& RadarView::vertices() const +const std::vector& RadarProductView::vertices() const { return p->vertices_; } -const std::vector& RadarView::color_table() const +const std::vector& +RadarProductView::color_table() const { return p->colorTable_; } -void RadarView::Initialize() +void RadarProductView::Initialize() { UpdatePlot(); } -void RadarView::LoadColorTable(std::shared_ptr colorTable) +void RadarProductView::LoadColorTable( + std::shared_ptr colorTable) { // TODO: Make size, offset and scale dynamic const float offset = 66.0f; @@ -115,12 +119,12 @@ void RadarView::LoadColorTable(std::shared_ptr colorTable) emit ColorTableLoaded(); } -std::chrono::system_clock::time_point RadarView::PlotTime() +std::chrono::system_clock::time_point RadarProductView::PlotTime() { return p->plotTime_; } -void RadarView::UpdatePlot() +void RadarProductView::UpdatePlot() { BOOST_LOG_TRIVIAL(debug) << logPrefix_ << "UpdatePlot()"; @@ -128,10 +132,10 @@ void RadarView::UpdatePlot() // TODO: Pick this based on radar data const std::vector& coordinates = - p->radarManager_->coordinates(common::RadialSize::_0_5Degree); + p->radarProductManager_->coordinates(common::RadialSize::_0_5Degree); std::shared_ptr level2Data = - p->radarManager_->level2_data(); + p->radarProductManager_->level2_data(); if (level2Data == nullptr) { return; diff --git a/scwx-qt/source/scwx/qt/view/radar_view.hpp b/scwx-qt/source/scwx/qt/view/radar_product_view.hpp similarity index 70% rename from scwx-qt/source/scwx/qt/view/radar_view.hpp rename to scwx-qt/source/scwx/qt/view/radar_product_view.hpp index e16db769..a9abf0cf 100644 --- a/scwx-qt/source/scwx/qt/view/radar_view.hpp +++ b/scwx-qt/source/scwx/qt/view/radar_product_view.hpp @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #include #include @@ -16,16 +16,17 @@ namespace qt namespace view { -class RadarViewImpl; +class RadarProductViewImpl; -class RadarView : public QObject +class RadarProductView : public QObject { Q_OBJECT public: - explicit RadarView(std::shared_ptr radarManager, - std::shared_ptr map); - ~RadarView(); + explicit RadarProductView( + std::shared_ptr radarProductManager, + std::shared_ptr map); + ~RadarProductView(); double bearing() const; double scale() const; @@ -48,7 +49,7 @@ signals: void PlotUpdated(); private: - std::unique_ptr p; + std::unique_ptr p; }; } // namespace view