Files
comaps/qt/ruler.hpp
Konstantin Pastbin e3e4a1985a Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run:
  git remote add om-historic [om-historic.git repo url]
  git fetch --tags om-historic
  git replace squashed-history historic-commits
2025-05-08 21:10:51 +07:00

38 lines
710 B
C++

#pragma once
#include "drape_frontend/drape_api.hpp"
#include "drape_frontend/drape_engine.hpp"
#include "geometry/latlon.hpp"
#include "geometry/oblate_spheroid.hpp"
#include "geometry/point2d.hpp"
#include <array>
#include <vector>
namespace qt
{
class Ruler
{
public:
bool IsActive();
void SetActive(bool status);
void AddPoint(m2::PointD const & point);
void DrawLine(df::DrapeApi & drapeApi);
void EraseLine(df::DrapeApi & drapeApi);
private:
bool IsValidPolyline();
void SetDistance();
void SetId();
std::string m_id;
std::vector<m2::PointD> m_polyline;
std::array<ms::LatLon, 2> m_pointsPair;
bool m_isActive = false;
double m_sumDistanceM = 0.0;
};
} // namespace qt