#pragma once #include #include #include #include #include namespace scwx { namespace qt { namespace gl { namespace draw { class PlacefileText : public DrawItem { public: explicit PlacefileText(const std::string& placefileName); ~PlacefileText(); PlacefileText(const PlacefileText&) = delete; PlacefileText& operator=(const PlacefileText&) = delete; PlacefileText(PlacefileText&&) noexcept; PlacefileText& operator=(PlacefileText&&) noexcept; void set_placefile_name(const std::string& placefileName); 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 text. */ void StartText(); /** * Configures the fonts for drawing the placefile text. * * @param [in] fonts A map of ImGui fonts */ void SetFonts(const boost::unordered_flat_map>& fonts); /** * Adds placefile text to the internal draw list. * * @param [in] di Placefile icon */ void AddText(const std::shared_ptr& di); /** * Finalizes the draw item after adding new text. */ void FinishText(); private: class Impl; std::unique_ptr p; }; } // namespace draw } // namespace gl } // namespace qt } // namespace scwx