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
rainintervalref.h File Reference
#include <QMetaType>
#include <QString>
#include <QStringList>
#include <openswmm/engine/openswmm_callbacks.h>
Include dependency graph for rainintervalref.h:
This graph shows which files directly or indirectly include this file:

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)
 

Detailed Description

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
Date
2026
License\n GPL-3.0-or-later

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]).

Function Documentation

◆ registerRainIntervalRefConverter()

void registerRainIntervalRefConverter ( )

Install the RainIntervalRef → QString converter (renders the H:MM clock label). Idempotent.

Here is the call graph for this function: