diff --git a/scwx-qt/scwx-qt.cmake b/scwx-qt/scwx-qt.cmake index 9ecc6f07..a90645e9 100644 --- a/scwx-qt/scwx-qt.cmake +++ b/scwx-qt/scwx-qt.cmake @@ -61,7 +61,7 @@ set(SRC_GL source/scwx/qt/gl/gl_context.cpp source/scwx/qt/gl/shader_program.cpp) set(HDR_GL_DRAW source/scwx/qt/gl/draw/draw_item.hpp source/scwx/qt/gl/draw/geo_icons.hpp - source/scwx/qt/gl/draw/geo_line.hpp + source/scwx/qt/gl/draw/geo_lines.hpp source/scwx/qt/gl/draw/icons.hpp source/scwx/qt/gl/draw/placefile_icons.hpp source/scwx/qt/gl/draw/placefile_images.hpp @@ -72,7 +72,7 @@ set(HDR_GL_DRAW source/scwx/qt/gl/draw/draw_item.hpp source/scwx/qt/gl/draw/rectangle.hpp) set(SRC_GL_DRAW source/scwx/qt/gl/draw/draw_item.cpp source/scwx/qt/gl/draw/geo_icons.cpp - source/scwx/qt/gl/draw/geo_line.cpp + source/scwx/qt/gl/draw/geo_lines.cpp source/scwx/qt/gl/draw/icons.cpp source/scwx/qt/gl/draw/placefile_icons.cpp source/scwx/qt/gl/draw/placefile_images.cpp diff --git a/scwx-qt/source/scwx/qt/gl/draw/geo_line.cpp b/scwx-qt/source/scwx/qt/gl/draw/geo_lines.cpp similarity index 91% rename from scwx-qt/source/scwx/qt/gl/draw/geo_line.cpp rename to scwx-qt/source/scwx/qt/gl/draw/geo_lines.cpp index 17d84a79..7f05aaaf 100644 --- a/scwx-qt/source/scwx/qt/gl/draw/geo_line.cpp +++ b/scwx-qt/source/scwx/qt/gl/draw/geo_lines.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include @@ -16,7 +16,7 @@ namespace gl namespace draw { -static const std::string logPrefix_ = "scwx::qt::gl::draw::geo_line"; +static const std::string logPrefix_ = "scwx::qt::gl::draw::geo_lines"; static const auto logger_ = scwx::util::Logger::Create(logPrefix_); static constexpr size_t kNumRectangles = 1; @@ -29,7 +29,7 @@ static constexpr size_t kBufferLength = static const std::string kTextureName = "lines/default-1x7"; -class GeoLine::Impl +class GeoLines::Impl { public: explicit Impl(std::shared_ptr context) : @@ -79,16 +79,16 @@ public: void Update(); }; -GeoLine::GeoLine(std::shared_ptr context) : +GeoLines::GeoLines(std::shared_ptr context) : DrawItem(context->gl()), p(std::make_unique(context)) { } -GeoLine::~GeoLine() = default; +GeoLines::~GeoLines() = default; -GeoLine::GeoLine(GeoLine&&) noexcept = default; -GeoLine& GeoLine::operator=(GeoLine&&) noexcept = default; +GeoLines::GeoLines(GeoLines&&) noexcept = default; +GeoLines& GeoLines::operator=(GeoLines&&) noexcept = default; -void GeoLine::Initialize() +void GeoLines::Initialize() { gl::OpenGLFunctions& gl = p->context_->gl(); @@ -166,7 +166,7 @@ void GeoLine::Initialize() p->dirty_ = true; } -void GeoLine::Render(const QMapLibreGL::CustomLayerRenderParameters& params) +void GeoLines::Render(const QMapLibreGL::CustomLayerRenderParameters& params) { if (p->visible_) { @@ -186,7 +186,7 @@ void GeoLine::Render(const QMapLibreGL::CustomLayerRenderParameters& params) } } -void GeoLine::Deinitialize() +void GeoLines::Deinitialize() { gl::OpenGLFunctions& gl = p->context_->gl(); @@ -194,10 +194,10 @@ void GeoLine::Deinitialize() gl.glDeleteBuffers(1, &p->vbo_); } -void GeoLine::SetPoints(float latitude1, - float longitude1, - float latitude2, - float longitude2) +void GeoLines::SetPoints(float latitude1, + float longitude1, + float latitude2, + float longitude2) { if (p->points_[0].latitude_ != latitude1 || p->points_[0].longitude_ != longitude1 || @@ -221,7 +221,7 @@ void GeoLine::SetPoints(float latitude1, } } -void GeoLine::SetModulateColor(boost::gil::rgba8_pixel_t color) +void GeoLines::SetModulateColor(boost::gil::rgba8_pixel_t color) { if (p->modulateColor_ != color) { @@ -230,7 +230,7 @@ void GeoLine::SetModulateColor(boost::gil::rgba8_pixel_t color) } } -void GeoLine::SetWidth(float width) +void GeoLines::SetWidth(float width) { if (p->width_ != width) { @@ -239,12 +239,12 @@ void GeoLine::SetWidth(float width) } } -void GeoLine::SetVisible(bool visible) +void GeoLines::SetVisible(bool visible) { p->visible_ = visible; } -void GeoLine::Impl::Update() +void GeoLines::Impl::Update() { if (dirty_) { diff --git a/scwx-qt/source/scwx/qt/gl/draw/geo_line.hpp b/scwx-qt/source/scwx/qt/gl/draw/geo_lines.hpp similarity index 83% rename from scwx-qt/source/scwx/qt/gl/draw/geo_line.hpp rename to scwx-qt/source/scwx/qt/gl/draw/geo_lines.hpp index 03bd9df2..42b04447 100644 --- a/scwx-qt/source/scwx/qt/gl/draw/geo_line.hpp +++ b/scwx-qt/source/scwx/qt/gl/draw/geo_lines.hpp @@ -14,17 +14,17 @@ namespace gl namespace draw { -class GeoLine : public DrawItem +class GeoLines : public DrawItem { public: - explicit GeoLine(std::shared_ptr context); - ~GeoLine(); + explicit GeoLines(std::shared_ptr context); + ~GeoLines(); - GeoLine(const GeoLine&) = delete; - GeoLine& operator=(const GeoLine&) = delete; + GeoLines(const GeoLines&) = delete; + GeoLines& operator=(const GeoLines&) = delete; - GeoLine(GeoLine&&) noexcept; - GeoLine& operator=(GeoLine&&) noexcept; + GeoLines(GeoLines&&) noexcept; + GeoLines& operator=(GeoLines&&) noexcept; void Initialize() override; void Render(const QMapLibreGL::CustomLayerRenderParameters& params) override;