#pragma once #include #include #include namespace scwx { namespace qt { namespace gl { namespace draw { class PlacefileLines : public DrawItem { public: explicit PlacefileLines(const std::shared_ptr& context); ~PlacefileLines(); PlacefileLines(const PlacefileLines&) = delete; PlacefileLines& operator=(const PlacefileLines&) = delete; PlacefileLines(PlacefileLines&&) noexcept; PlacefileLines& operator=(PlacefileLines&&) noexcept; void set_selected_time(std::chrono::system_clock::time_point selectedTime); void set_thresholded(bool thresholded); void Initialize() override; void Render(const QMapLibre::CustomLayerRenderParameters& params) override; void Deinitialize() override; bool RunMousePicking(const QMapLibre::CustomLayerRenderParameters& params, const QPointF& mouseLocalPos, const QPointF& mouseGlobalPos, const glm::vec2& mouseCoords, const common::Coordinate& mouseGeoCoords, std::shared_ptr& eventHandler) override; /** * Resets and prepares the draw item for adding a new set of lines. */ void StartLines(); /** * Adds a placefile line to the internal draw list. * * @param [in] di Placefile line */ void AddLine(const std::shared_ptr& di); /** * Finalizes the draw item after adding new lines. */ void FinishLines(); private: class Impl; std::unique_ptr p; }; } // namespace draw } // namespace gl } // namespace qt } // namespace scwx