SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
MeshProfileOverlay Class Reference

#include <meshprofileoverlay.h>

Collaboration diagram for MeshProfileOverlay:

Public Types

using SceneToPixel = std::function< QPointF(const QPointF &)>
 Map scene point → device pixel, supplied by the canvas.
 

Public Member Functions

 MeshProfileOverlay ()=default
 
void setPolyline (const QVector< QPointF > &scenePolyline)
 Set the persistent profile polyline (scene coords). Rebuilds the chainage table used for chainage↔point mapping.
 
void setArrowChainage (double chainage)
 Position the arrow at chainage (scene units along the path). A negative value hides the arrow.
 
void paint (QPainter &p, const SceneToPixel &toPixel) const
 Draw the casing + colored line + position arrow in widget/pixel space. Called by MapCanvas::paintEvent after the QSG mesh composite so the profile sits on top of every map layer.
 
double totalLength () const
 
QPointF chainageToScene (double chainage) const
 
double nearestChainage (const QPointF &scenePt) const
 Chainage of the point on the polyline closest to scenePt (orthogonal projection). Used by the map drag tool.
 
const QVector< QPointF > & polyline () const
 

Member Typedef Documentation

◆ SceneToPixel

using MeshProfileOverlay::SceneToPixel = std::function<QPointF(const QPointF &)>

Map scene point → device pixel, supplied by the canvas.

Constructor & Destructor Documentation

◆ MeshProfileOverlay()

MeshProfileOverlay::MeshProfileOverlay ( )
default

Member Function Documentation

◆ chainageToScene()

QPointF MeshProfileOverlay::chainageToScene ( double  chainage) const
Here is the caller graph for this function:

◆ nearestChainage()

double MeshProfileOverlay::nearestChainage ( const QPointF &  scenePt) const

Chainage of the point on the polyline closest to scenePt (orthogonal projection). Used by the map drag tool.

Here is the caller graph for this function:

◆ paint()

void MeshProfileOverlay::paint ( QPainter &  p,
const SceneToPixel toPixel 
) const

Draw the casing + colored line + position arrow in widget/pixel space. Called by MapCanvas::paintEvent after the QSG mesh composite so the profile sits on top of every map layer.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ polyline()

const QVector< QPointF > & MeshProfileOverlay::polyline ( ) const
inline
Here is the caller graph for this function:

◆ setArrowChainage()

void MeshProfileOverlay::setArrowChainage ( double  chainage)

Position the arrow at chainage (scene units along the path). A negative value hides the arrow.

Here is the caller graph for this function:

◆ setPolyline()

void MeshProfileOverlay::setPolyline ( const QVector< QPointF > &  scenePolyline)

Set the persistent profile polyline (scene coords). Rebuilds the chainage table used for chainage↔point mapping.

◆ totalLength()

double MeshProfileOverlay::totalLength ( ) const
inline

The documentation for this class was generated from the following files: