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
meshprofileplotdialog.h
Go to the documentation of this file.
1
16#ifndef MESH_PROFILE_PLOT_DIALOG_H
17#define MESH_PROFILE_PLOT_DIALOG_H
18
20
21#include <QDateTime>
22#include <QDialog>
23#include <QPointer>
24#include <QPointF>
25#include <QTimer>
26#include <QVector>
27
34class SWMM2DMeshLayer;
37
38class MeshProfilePlotDialog : public QDialog
39{
40 Q_OBJECT
41public:
43 SWMM2DResultsLayer *results, // may be null
45 const QVector<QPointF> &scenePolyline,
46 SWMMVisProjectWindow *projectWindow,
47 QWidget *parent = nullptr);
48 ~MeshProfilePlotDialog() override;
49
50private:
51 void buildLayout();
52 void rebuildProfile(); // full resample (geometry + envelope)
53 void refreshCurrentDepths(); // per-frame depth-column update
54 void openDisplayOptions();
55
56 // Persistent map overlay (profile line + position arrow) + the map-drag
57 // tool that scrubs the arrow. Lifetime tied to this dialog.
58 void setupMapOverlay();
59 void removeOverlay();
60 void setMarkerToolActive(bool on); // toggle map-side dragging
61
62 QPointer<SWMM2DMeshLayer> m_mesh;
63 QPointer<SWMM2DResultsLayer> m_results;
64 // Live-run throttle for the full resample: at most one rebuildProfile()
65 // per second (leading edge, pending ticks folded into the next one).
66 QTimer m_liveRebuild;
67 bool m_liveRebuildPending = false;
68 QPointer<AnimationController> m_anim;
69 QPointer<SWMMVisProjectWindow> m_projectWindow;
70 QVector<QPointF> m_scenePolyline;
71
72 MeshProfilePlotWidget *m_plot = nullptr;
73 MeshProfilePlotOptions *m_options = nullptr;
74
75 MeshProfileOverlay *m_overlay = nullptr; // owned by map scene
76 MapToolProfileMarker *m_markerTool = nullptr; // parented to dialog
77 QPointer<OpenSWMMVisMapTool> m_prevTool; // restore on toggle-off/close
78
79 // Cached profile — geometry/envelope stay static across animation frames;
80 // only the depth column is re-sampled per tick (cheap vs a full rebuild).
82};
83
84#endif // MESH_PROFILE_PLOT_DIALOG_H
Central coordinator for result-layer time-stepping and playback.
Definition animationcontroller.h:43
Definition maptoolprofilemarker.h:29
Definition meshprofileoverlay.h:31
Definition meshprofileplotdialog.h:39
~MeshProfilePlotDialog() override
Definition meshprofileplotdialog.cpp:129
Definition meshprofileplotoptions.h:28
Definition meshprofileplotwidget.h:41
Abstract base class for interactive map tools used in the MapCanvas.
Definition maptool.h:43
Definition swmm2dmeshlayer.h:64
Definition swmm2dresultslayer.h:550
MDI sub-window owning a MapCanvas, SWMMModelLayer, and map tools.
Definition swmmvisprojectwindow.h:58
Pure-logic sampler that turns a user-traced polyline across the 2D surface mesh into a longitudinal c...
Definition meshcommands.h:302
QVector< int > parent
union-find
Definition pslgminsize.cpp:176
The assembled cross-section: ordered samples + a results flag.
Definition profilesection.h:70