21#ifndef MESH_PROFILE_OVERLAY_H
22#define MESH_PROFILE_OVERLAY_H
37 void setPolyline(
const QVector<QPointF> &scenePolyline);
57 [[nodiscard]]
const QVector<QPointF> &
polyline()
const {
return m_poly; }
60 QVector<QPointF> m_poly;
61 QVector<double> m_chain;
63 double m_arrowChainage = -1.0;
Definition meshprofileoverlay.h:31
std::function< QPointF(const QPointF &)> SceneToPixel
Map scene point → device pixel, supplied by the canvas.
Definition meshprofileoverlay.h:44
double nearestChainage(const QPointF &scenePt) const
Chainage of the point on the polyline closest to scenePt (orthogonal projection). Used by the map dra...
Definition meshprofileoverlay.cpp:101
QPointF chainageToScene(double chainage) const
Definition meshprofileoverlay.cpp:86
const QVector< QPointF > & polyline() const
Definition meshprofileoverlay.h:57
void setArrowChainage(double chainage)
Position the arrow at chainage (scene units along the path). A negative value hides the arrow.
Definition meshprofileoverlay.cpp:38
void paint(QPainter &p, const SceneToPixel &toPixel) const
Draw the casing + colored line + position arrow in widget/pixel space. Called by MapCanvas::paintEven...
Definition meshprofileoverlay.cpp:43
void setPolyline(const QVector< QPointF > &scenePolyline)
Set the persistent profile polyline (scene coords). Rebuilds the chainage table used for chainage↔poi...
Definition meshprofileoverlay.cpp:22
MeshProfileOverlay()=default
double totalLength() const
Definition meshprofileoverlay.h:52
ArrowPlacement p
Definition linesymbollayer.cpp:27