![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
#include <QMetaType>#include <QString>#include <QStringList>#include <openswmm/engine/openswmm_callbacks.h>Go to the source code of this file.
Classes | |
| struct | RainIntervalRef |
Namespaces | |
| namespace | rain_interval |
Functions | |
| void | registerRainIntervalRefConverter () |
| QStringList | rain_interval::presetsHMM () |
| QString | rain_interval::secondsToHMM (int secs) |
| int | rain_interval::hmmToSeconds (const QString &text) |
DA.2 parity follow-up — value type + shared helpers for the rain gage "Recording Interval" Property Browser row. Legacy SWMM edits this field as an editable combo (esComboEdit) showing the interval in clock form (H:MM, e.g. "0:15"); see Epaswmm5 Uedit.pas EditRaingage.
Same registration dance as CulvertCodeRef: declared as a Qt metatype so QPropertyModel stores it in a QVariant, a QString converter renders the H:MM label when the row isn't in edit mode, and a custom editor creator (registered in propertiespanel.cpp) hands out a RainIntervalComboBox.
The engine stores the interval as whole seconds (GageData.interval_sec) and the C API exposes it as a double via swmm_gage_get/set_rain_interval. The inline helpers here convert between that second count and the legacy clock string, matching the engine's own parser (parse_time_seconds: H:MM[:SS]).
| void registerRainIntervalRefConverter | ( | ) |
Install the RainIntervalRef → QString converter (renders the H:MM clock label). Idempotent.