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
traceanalysisdialog.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-3.0-or-later
2
12#pragma once
13#include "output/tracedata.h"
14#include <QDialog>
15#include <QPointer>
18class QLineEdit;
19class QLabel;
20class QCheckBox;
21class QProgressDialog;
22namespace openswmmvis::trace
23{
24class TraceController;
25class TraceSublayer;
26// A small node picker used only when a tool has no selected node. Computation
27// and saved data belong to TraceController; appearance belongs to the sublayer.
28class TraceAnalysisDialog final : public QDialog
29{
30 Q_OBJECT
31public:
48 static TraceAnalysisDialog *showFor(SWMMVisProjectWindow *, bool upstream, bool travel,
49 const QString &seed = {},
50 SWMMResultsLayer *output = nullptr);
67 static void showProperties(TraceSublayer *, QWidget *parent);
80 static void showDetails(TraceSublayer *, QWidget *parent);
92 static void recalculate(SWMMVisProjectWindow *, const QString &runId);
110 void setSeedNodes(const QStringList &);
116 QJsonObject state() const;
124 void restore(const QJsonObject &);
125
126protected:
140 bool eventFilter(QObject *, QEvent *) override;
145 void reject() override;
146
147private:
157 void start();
158 SWMMVisProjectWindow *m_project;
159 TraceController *m_controller;
160 QLineEdit *m_nodes;
161 QCheckBox *m_recalculate = nullptr;
162 QLabel *m_prompt;
163 QProgressDialog *m_progress;
164 QString m_runId;
165 Snapshot m_snapshot; // captured once per picker session
166 bool m_upstream = false, m_travel = false, m_pending = false;
167 bool m_recalculating = false;
168};
169} // namespace openswmmvis::trace
Overlays time-stepped simulation results on the SWMM network geometry.
Definition swmmresultslayer.h:104
MDI sub-window owning a MapCanvas, per-project services and map tools, referring to a workspace-assoc...
Definition swmmvisprojectwindow.h:74
Definition traceanalysisdialog.h:29
static void recalculate(SWMMVisProjectWindow *, const QString &runId)
First argument is optional project (null no-op); reuse/create picker and request full-run saved-analy...
Definition traceanalysisdialog.cpp:272
void restore(const QJsonObject &)
Read first argument JSON into run ID, raw node text, direction/tab booleans (only integer 1 true); mi...
Definition traceanalysisdialog.cpp:231
void reject() override
Unset project canvas cursor and reject picker. Does not cancel controller or clear pending work; prog...
Definition traceanalysisdialog.cpp:238
static void showDetails(TraceSublayer *, QWidget *parent)
First argument is required live TraceSublayer/layer/result; snapshot currently contributing rows into...
Definition traceanalysisdialog.cpp:729
QJsonObject state() const
Definition traceanalysisdialog.cpp:224
static TraceAnalysisDialog * showFor(SWMMVisProjectWindow *, bool upstream, bool travel, const QString &seed={}, SWMMResultsLayer *output=nullptr)
For the first project argument (nullable), reuse/create its direct-child trace picker,...
Definition traceanalysisdialog.cpp:82
static void showProperties(TraceSublayer *, QWidget *parent)
First argument is required live TraceSublayer with live layer/style; open immediate style editing wit...
Definition traceanalysisdialog.cpp:347
bool eventFilter(QObject *, QEvent *) override
First argument is borrowed event target; second is required borrowed Qt event. While visible,...
Definition traceanalysisdialog.cpp:297
void setSeedNodes(const QStringList &)
Copy first argument (borrowed node-ID list) into comma-space joined editor, without trimming,...
Definition traceanalysisdialog.cpp:220
Definition tracecontroller.h:32
Definition traceanalysislayer.h:331
Definition traceanalysislayer.h:22
int parent
Definition planning.cpp:199
Definition tracedata.h:35
Value types for flow balance and travel-time analysis results.