11#ifndef SIMULATIONOPTIONSDIALOG_H
12#define SIMULATIONOPTIONSDIALOG_H
41class QCustomTimespanEdit;
53 class RelativePathPicker;
56#include <openswmm/engine/openswmm_engine.h>
118 const QString &engineVersion = QStringLiteral(
"6.0.0"),
120 QWidget *
parent =
nullptr);
173 const QString &time);
211 const QTableWidget *table);
220 bool confirmBeforeWrite();
225 void applyEngineConstraints();
237 enum class Target { SidebarRow, Tab, Widget };
238 Target target = Target::Widget;
240 QTabWidget *tabs =
nullptr;
242 QWidget *widget =
nullptr;
243 std::function<bool()> enabled;
244 QString reasonWhenOff;
248 void buildGateTable();
250 void addCategory(
const QString &
title, QWidget *page);
254 void readFromEngine();
260 QString m_engineVersion;
261 bool m_wroteChanges =
false;
266 int m_qualityRow = -1;
267 int m_hydraulicsRow = -1;
268 QVector<PageGate> m_gates;
269 QListWidget *m_categoryList =
nullptr;
270 QStackedWidget *m_pages =
nullptr;
274 std::unique_ptr<openswmmvis::ui::SimOptionsContext> m_ctx;
275 QVector<openswmmvis::ui::SimOptionsPage *> m_pageOrder;
284#ifdef OPENSWMM_HAS_2D
285 openswmmvis::ui::TwoDPage *m_twoDPage =
nullptr;
Delegate for the Datetime column. Editor is a QDateTimeEdit whose minimum date-time renders as the sp...
Definition hotstartsavesmodel.h:73
Row schema: {path relative to the .inp dir, OLE-Automation datetime sentinel}. An oaDate of 0....
Definition hotstartsavesmodel.h:30
Definition pathbrowsedelegate.h:24
Definition pluginstablemodel.h:21
Combo editor over the built-in catalogue, editable for free-form ids.
Definition processcomponentsmodel.h:85
Definition processcomponentsmodel.h:31
Renders the SWMM network elements (nodes, links, subcatchments, rain gages) for one OpenSWMMEngine mo...
Definition swmmmodellayer.h:133
MDI sub-window owning a MapCanvas, SWMMModelLayer, and map tools.
Definition swmmvisprojectwindow.h:58
Edit OPTIONS for the active SWMM project.
Definition simulationoptionsdialog.h:96
static qint64 parseStepSeconds(const QString &s, qint64 fallback)
Parse a step value as returned by swmm_options_get() into whole seconds. The engine round-trip is loo...
Definition simulationoptionshelpers.cpp:120
static QString threadLimitsSummary(const SWMM_ThreadInfo &ti)
Human-readable summary of the machine / OpenMP thread limits (from swmm_get_thread_info) for tooltips...
Definition simulationoptionsdialog.cpp:402
static int fastPresetThreads()
THREADS the fast preset uses: the machine's performance-core count (macOS), else its logical-CPU coun...
Definition simulationoptionshelpers.cpp:52
static void formatEngineDateTime(const QDateTime &dt, QString &out_date, QString &out_time)
Format a Qt date+time as the engine's expected MM/DD/YYYY + HH:MM:SS pair (returned as out_date and o...
Definition simulationoptionshelpers.cpp:67
static QList< int > selectedRowsDescending(const QTableWidget *table)
Distinct selected row indices of table, sorted descending (safe order for removeRow())....
Definition simulationoptionshelpers.cpp:168
static void fastPresetValues(int &out_threads, double &out_min_step_sec)
Canonical "fast preset" recipe for 1D/2D-coupled runs: all worker threads on, and the adaptive routin...
Definition simulationoptionshelpers.cpp:38
static int parseEngineBool(const QString &s)
Map an engine boolean string ("YES"/"NO"/"TRUE"/"FALSE"/"1"/"0") to a Qt::CheckState....
Definition simulationoptionshelpers.cpp:28
~SimulationOptionsDialog() override=default
static bool optionValueEquals(const QString &a, const QString &b)
Compare an option value from swmm_options_get() against a freshly formatted one, tolerating formattin...
Definition simulationoptionshelpers.cpp:151
static QString engineBoolString(bool on)
Render a checkbox state as the canonical engine string.
Definition simulationoptionshelpers.cpp:62
bool wroteAnyChanges() const
True after a successful Apply / OK that wrote at least one key.
Definition simulationoptionsdialog.h:128
static QDateTime parseEngineDateTime(const QString &date, const QString &time)
Inverse of formatEngineDateTime. Returns an invalid QDateTime if either string is malformed.
Definition simulationoptionshelpers.cpp:75
static double oaDateFromQDateTime(const QDateTime &dt)
Convert a QDateTime to SWMM's OLE Automation Date (decimal days since 1899-12-30 00:00)....
Definition simulationoptionshelpers.cpp:107
static QDateTime qDateTimeFromOaDate(double oa)
Inverse of oaDateFromQDateTime.
Definition simulationoptionshelpers.cpp:113
QStringList lastWriteKeys() const
Every option key offered to writeIfChanged during the last write pass — whether or not the value actu...
Definition simulationoptionsdialog.cpp:384
Definition datespage.h:43
Definition filespage.h:42
Definition hydraulicspage.h:37
Definition modelspage.h:38
Definition qualitypage.h:38
Definition simoptionspage.h:25
Definition spatialpage.h:26
double s
Scene px per model length unit.
Definition inletdrawingview.cpp:82
int b
local residual indices, a < b
Definition meshquadmatch.cpp:46
int a
Definition meshquadmatch.cpp:46
Definition openswmmvislayer.h:43
void * SWMM_Engine
Definition objectdefaultsapplier.h:19
QVector< int > parent
union-find
Definition pslgminsize.cpp:176
const char * title
Definition snowpackeditordialog.cpp:71
What this engine build accepts, probed once.
Definition enginecapabilities.h:37