18#ifndef PROFILE_PATH_OVERLAY_H
19#define PROFILE_PATH_OVERLAY_H
24#include <QGraphicsItemGroup>
51 QGraphicsItem *
parent =
nullptr);
68 void setEndpoints(
int startEngineNodeIdx,
int endEngineNodeIdx);
98 void applyHighlightStyling();
100 [[nodiscard]] QVector<QPointF> sceneCoordsForLink(
int engineLinkIdx)
const;
101 [[nodiscard]] QPointF sceneCoordForNode(
int engineNodeIdx)
const;
104 QVector<ProfileRouter::Path> m_paths;
105 QVector<QGraphicsPathItem *> m_pathItems;
106 QGraphicsEllipseItem *m_startHalo =
nullptr;
107 QGraphicsEllipseItem *m_endHalo =
nullptr;
108 int m_highlighted = -1;
109 int m_startEngineNodeIdx = -1;
110 int m_endEngineNodeIdx = -1;
Renders an ordered list of candidate paths over the map.
Definition profilepathoverlay.h:48
std::function< QPointF(const QPointF &)> SceneToPixel
Map scene point → device pixel, supplied by the canvas.
Definition profilepathoverlay.h:89
int pathCount() const
Returns the number of candidate paths currently displayed.
Definition profilepathoverlay.cpp:136
QColor colorForPath(int index) const
Returns the categorical color assigned to path index. Useful for the picker dialog to render a matchi...
Definition profilepathoverlay.cpp:141
void paintOverlay(QPainter &p, const SceneToPixel &toPixel) const
Draw paths + endpoint halos in widget/pixel space. Called by MapCanvas after the QSG frame so the pro...
Definition profilepathoverlay.cpp:147
void setEndpoints(int startEngineNodeIdx, int endEngineNodeIdx)
Marks two endpoints with pulsing halos so the user can see which start/end the candidates connect....
Definition profilepathoverlay.cpp:85
void clear()
Removes all rendered children and detaches. Caller is responsible for delete-ing the overlay or letti...
Definition profilepathoverlay.cpp:127
void setHighlightedPath(int index)
Promotes path index to full opacity; dims the rest. Pass -1 to show all candidates at equal weight.
Definition profilepathoverlay.cpp:76
void setPaths(const QVector< ProfileRouter::Path > &paths)
Replaces the displayed candidate paths. Rebuilds child items.
Definition profilepathoverlay.cpp:69
Renders the SWMM network elements (nodes, links, subcatchments, rain gages) for one OpenSWMMEngine mo...
Definition swmmmodellayer.h:133
ArrowPlacement p
Definition linesymbollayer.cpp:27
int index
Position in m_quadRegions / m_quadReports.
Definition meshgenerator.cpp:153
Path-routing primitives over an abstract weighted graph, used by Slice BC's profile-path picker.
QVector< Path > paths
Definition pslgminsize.cpp:560
QVector< int > parent
union-find
Definition pslgminsize.cpp:176