![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Functions | |
| QDateTime | swmmDateTimeToQDateTime (double value) |
| SWMM DateTime double → UTC-labelled QDateTime (wall clock). | |
| double | qDateTimeToSwmmDateTime (const QDateTime &dt) |
| QDateTime → SWMM DateTime double. | |
| QString | swmmDateTimeDisplayFormat () |
Canonical date-time format for display and editing: MM/dd/yyyy HH:mm. | |
|
inline |
QDateTime → SWMM DateTime double.
Reads the calendar components directly (no timezone conversion) and encodes via the engine. Sub-second input is rounded to the nearest second to match the engine's integer-second resolution, so e.g. 00:14:59.750 encodes to the same double as 00:15:00. Returns NaN for an invalid QDateTime.
|
inline |
Canonical date-time format for display and editing: MM/dd/yyyy HH:mm.
The same MM/DD/YYYY HH:MM a SWMM .inp writes, so what a user reads in the GUI matches what they read in the file. Suitable for QDateTime::toString() and QDateTimeEdit::setDisplayFormat().
Minute resolution — SWMM's own storage is whole seconds and the engine's [TIMESERIES] writer emits HH:MM:SS, so a displayed value can hide a non-zero seconds field. Editors built on this must therefore preserve the seconds they were handed (a QDateTimeEdit does: the sections omitted from the display format keep their value), or they silently truncate — the defect class GH #1 was about.
|
inline |
SWMM DateTime double → UTC-labelled QDateTime (wall clock).
Delegates decoding to the engine, which rounds to the nearest second and clamps end-of-day. Returns an invalid QDateTime when value is not finite or decodes to an invalid calendar date.