37#ifndef PROFILE_PLOT_WIDGET_H
38#define PROFILE_PLOT_WIDGET_H
86 std::shared_ptr<ProfileBuilder::SourceDerived>
derived;
144 [[nodiscard]]
const QVector<SeriesBinding> &
series()
const {
return m_series; }
183 double bed = std::numeric_limits<double>::quiet_NaN();
184 double wse = std::numeric_limits<double>::quiet_NaN();
196 {
return m_surface2D; }
212 void setAxisLabels(
const QString &xLabel,
const QString &yLabel);
220 [[nodiscard]]
int nodeIndexAt(
const QPoint &widgetPos)
const;
226 [[nodiscard]]
int linkIndexAt(
const QPoint &widgetPos)
const;
267 {
return m_virtualChainage; }
280 void zoomBy(
double factor);
352 void paintEvent (QPaintEvent *event)
override;
358 void wheelEvent (QWheelEvent *event)
override;
362 [[nodiscard]] QRectF plotRect()
const;
367 [[nodiscard]]
int topMargin()
const;
368 [[nodiscard]]
int bottomMargin()
const;
371 [[nodiscard]] QPointF dataToPixel(
double chainage,
double elev)
const;
383 [[nodiscard]]
double virtualX(
int nodeIdx)
const;
387 [[nodiscard]]
double virtualXAlongLink(
int linkIdx,
double frac)
const;
400 [[nodiscard]]
bool isVirtualNode(
int nodeIdx)
const;
407 void hglEdgePixels(
int linkIdx, qreal &pxU, qreal &pxD)
const;
410 void recomputeBounds();
416 void emitXRangeIfChanged();
419 void paintBackgroundAndAxes (QPainter &
p)
const;
420 void paintLabelAxis (QPainter &
p)
const;
421 void paintSoilFill (QPainter &
p)
const;
422 void paintConduits (QPainter &
p)
const;
423 void paintNodes (QPainter &
p)
const;
427 void paintBranchStubs (QPainter &
p)
const;
431 void paintNodeRoses (QPainter &
p)
const;
432 void paintSelectionHighlights(QPainter &
p)
const;
438 [[nodiscard]] QPen themeVirtualJunctionPen()
const;
441 [[nodiscard]] QColor themeSoilFill ()
const;
442 [[nodiscard]] QColor themeBeddingFill()
const;
443 [[nodiscard]] QPen themeConduitOutlinePen()
const;
445 [[nodiscard]] QBrush themeStreetInvertBrush()
const;
454 void paintSeriesCurrentLine (QPainter &
p,
int seriesIdx)
const;
455 void paintSeriesEnvelope (QPainter &
p,
int seriesIdx)
const;
462 void paintNodeEnvelopeFill (QPainter &
p,
int seriesIdx)
const;
467 void paintHglFill (QPainter &
p,
int seriesIdx)
const;
468 void paintNodeFill (QPainter &
p,
int seriesIdx)
const;
472 void paintNodeHglLine (QPainter &
p,
int seriesIdx)
const;
475 void paintWaterSurfaceFill (QPainter &
p,
int seriesIdx)
const;
480 void paintSurface2D (QPainter &
p)
const;
484 [[nodiscard]]
double groundElevAtReal(
double realX)
const;
487 [[nodiscard]]
double realChainageToVirtualX(
double realX)
const;
489 void paintLegend (QPainter &
p)
const;
490 void paintTimeLabel (QPainter &
p)
const;
497 [[nodiscard]]
static const QVector<QVector<double>> &
502 [[nodiscard]]
static const QVector<double> &
507 QVector<SeriesBinding> m_series;
508 QVector<Surface2DSample> m_surface2D;
509 double m_surface2DMaxWse = std::numeric_limits<double>::quiet_NaN();
511 QPointer<ProfilePlotOptions> m_options;
512 QSet<QString> m_selectedNames;
513 int m_currentSrc = -1;
514 int m_currentPeriod = -1;
515 QDateTime m_currentDateTime;
516 QString m_xLabel = QStringLiteral(
"Distance");
517 QString m_yLabel = QStringLiteral(
"Elevation");
522 mutable QRectF m_legendRect;
523 mutable QRectF m_timeLabelRect;
524 enum class OverlayDrag {
None = 0, Legend, TimeLabel };
525 OverlayDrag m_overlayDrag = OverlayDrag::None;
526 QPoint m_overlayDragLastPos;
531 QVector<double> m_virtualChainage;
532 double m_virtualGap = 0.0;
533 double m_beddingFloorElev = 0.0;
534 bool m_haveBeddingFloor =
false;
537 double m_autoXMin = 0.0;
538 double m_autoXMax = 1.0;
539 double m_autoYMin = 0.0;
540 double m_autoYMax = 1.0;
543 double m_dataXMin = 0.0;
544 double m_dataXMax = 1.0;
545 double m_dataYMin = 0.0;
546 double m_dataYMax = 1.0;
547 bool m_fitMode =
true;
549 double m_lastEmittedXMin = std::numeric_limits<double>::quiet_NaN();
550 double m_lastEmittedXMax = std::numeric_limits<double>::quiet_NaN();
552 bool m_panActive =
false;
553 bool m_zoomActive =
false;
555 QPoint m_lastMousePos;
557 class QRubberBand *m_rubberBand =
nullptr;
Definition profileplotoptions.h:28
ArrowPlacement p
Definition linesymbollayer.cpp:27
MaskMode m
Definition maskspec.cpp:18
int k
Definition mesh2dresultsexport.cpp:549
NodeKind
Topology category for the manhole-glyph picker in ProfilePlotWidget. Maps 1:1 to the relevant SWMMMod...
Definition profilebuilder.h:52
LinkKind
Connector category for the conduit-vs-glyph render branch in ProfilePlotWidget.
Definition profilebuilder.h:70
OutputKind
Which elevation-axis quantity a profile series represents. Every option resolves to an elevation (ft ...
Definition profilebuilder.h:96
Pure-logic data assembly for Slice BC's longitudinal profile plot: chainage, HGL/EGL time-series,...
Q_OBJECT facade for every user-configurable display option on the profile plot. Both the per-dialog L...
int path
Definition pslgminsize.cpp:234
QVector< int > parent
union-find
Definition pslgminsize.cpp:176
TokenKind kind
Definition queryparser.cpp:34
A fully-resolved profile path: ordered nodes, joining links, and cumulative chainage from nodes[0] to...
Definition profilebuilder.h:242
Output of compute(): per-source HGL/EGL series and per-node envelope min/max. Sized to match the inpu...
Definition profilebuilder.h:292