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
SWMMRainGagePropertyAdapter Class Reference

#include <swmmraingagepropertyadapter.h>

Inheritance diagram for SWMMRainGagePropertyAdapter:
Collaboration diagram for SWMMRainGagePropertyAdapter:

Public Types

enum  RainType {
  Intensity = 0 ,
  Volume = 1 ,
  Cumulative = 2
}
 
enum  DataSource {
  Timeseries = 0 ,
  File = 1
}
 
enum  RainUnits {
  Inches = 0 ,
  Millimeters = 1
}
 
enum  RainFileFormat {
  AutoDetect = -1 ,
  StandardRainFile = 5 ,
  MultiColumn = 6
}
 

Public Slots

void setXCoord (double v)
 
void setYCoord (double v)
 
void setRainType (int v)
 
void setRainIntervalRef (const RainIntervalRef &r)
 
void setSnowFactor (double v)
 
void setScaleFactor (double v)
 
void setDataSource (int v)
 
void setSeriesNameRef (const DataObjectRef &r)
 
void setFilePath (const QString &p)
 
void setFileColumn (const QString &c)
 
void setFileFormat (int v)
 
void setStationId (const QString &s)
 
void setRainUnits (int v)
 
void setUserFlagsRef (const UserFlagsEditRef &)
 
- Public Slots inherited from SWMMDataObjectPropertyAdapter
void setName (const QString &newName)
 
void updateStoredName (const QString &newName)
 
void refresh ()
 

Signals

void coordChangeRequested (double newX, double newY)
 
- Signals inherited from SWMMDataObjectPropertyAdapter
void changed ()
 
void renameRequested (const QString &oldName, const QString &newName)
 
void displayLabelsChanged ()
 

Public Member Functions

UserFlagsEditRef userFlagsRef () const
 
double xCoord () const
 
double yCoord () const
 
RainType rainType () const
 
RainIntervalRef rainIntervalRef () const
 
double snowFactor () const
 
double scaleFactor () const
 
DataSource dataSource () const
 
DataObjectRef seriesNameRef () const
 
double currentRainfall () const
 
QString filePath () const
 .original token
 
QString resolvedFilePath () const
 .absolute (post-resolve)
 
QString fileColumn () const
 multi-column selector
 
QString stationId () const
 
RainUnits rainUnits () const
 0=IN, 1=MM
 
int fileFormat () const
 
RainFileFormat fileFormatEnum () const
 
Q_INVOKABLE QString displayLabelFor (const QString &property) const
 
 SWMMDataObjectPropertyAdapter (SWMM_Engine engine, QString name, QObject *parent=nullptr)
 
- Public Member Functions inherited from SWMMDataObjectPropertyAdapter
 SWMMDataObjectPropertyAdapter (SWMM_Engine engine, QString name, QObject *parent=nullptr)
 
 ~SWMMDataObjectPropertyAdapter () override=default
 
QString name () const
 
SWMM_Engine engine () const
 
void setModelLayer (SWMMModelLayer *layer)
 
SWMMModelLayermodelLayer () const
 

Properties

double xCoord
 
double yCoord
 
SWMMRainGagePropertyAdapter::RainType rainType
 
RainIntervalRef rainInterval
 
double snowFactor
 
double scaleFactor
 
SWMMRainGagePropertyAdapter::DataSource dataSource
 
DataObjectRef seriesName
 
double currentRainfall
 
QString filePath
 
QString resolvedFilePath
 
QString fileColumn
 
SWMMRainGagePropertyAdapter::RainFileFormat fileFormat
 
QString stationId
 
SWMMRainGagePropertyAdapter::RainUnits rainUnits
 
UserFlagsEditRef userFlags
 
- Properties inherited from SWMMDataObjectPropertyAdapter
QString name
 

Additional Inherited Members

- Protected Attributes inherited from SWMMDataObjectPropertyAdapter
SWMM_Engine m_engine
 
QString m_name
 
SWMMModelLayerm_layer = nullptr
 Bound via setModelLayer.
 

Member Enumeration Documentation

◆ DataSource

Enumerator
Timeseries 
File 

◆ RainFileFormat

Rain-file grammar. Values are engine RainFileFormat codes, and these three are the only ones the engine ever assigns: the parser sets USER_CSV for a "path:col" token and STAN_PRCP for a plain path (CatchmentHandler), the resolver promotes STAN_PRCP → USER_CSV on detection, and a gage that has never had a file stays UNKNOWN. The NWS/DSI/HLY codes 0..4 are declared in the engine but never written, so offering them here would be offering states the model cannot reach.

Enumerator
AutoDetect 
StandardRainFile 
MultiColumn 

◆ RainType

Type-safe enums declared with Q_ENUM so QPropertyModel renders the key name (e.g. "INTENSITY", "FILE", "MM") instead of a raw integer. Values mirror the engine codes and the Attribute Table value lists.

Enumerator
Intensity 
Volume 
Cumulative 

◆ RainUnits

Enumerator
Inches 
Millimeters 

Member Function Documentation

◆ coordChangeRequested

void SWMMRainGagePropertyAdapter::coordChangeRequested ( double  newX,
double  newY 
)
signal

X/Y edit intent (both coordinates, whichever one changed). The panel applies it through SWMMModelLayer::applyGageMove. Mirrors SWMMNodePropertyAdapter::coordChangeRequested.

Here is the caller graph for this function:

◆ currentRainfall()

double SWMMRainGagePropertyAdapter::currentRainfall ( ) const

◆ dataSource()

SWMMRainGagePropertyAdapter::DataSource SWMMRainGagePropertyAdapter::dataSource ( ) const

◆ displayLabelFor()

QString SWMMRainGagePropertyAdapter::displayLabelFor ( const QString &  property) const

◆ fileColumn()

QString SWMMRainGagePropertyAdapter::fileColumn ( ) const

multi-column selector

◆ fileFormat()

int SWMMRainGagePropertyAdapter::fileFormat ( ) const

Raw RainFileFormat code: -1 UNKNOWN, 5 STAN_PRCP (standard SWMM rain file), 6 USER_CSV (multi-column CSV/TSV/TSF). The panel reads it to gate Station ID; the fileFormat property exposes it as an enum.

◆ fileFormatEnum()

SWMMRainGagePropertyAdapter::RainFileFormat SWMMRainGagePropertyAdapter::fileFormatEnum ( ) const

The same value as a Q_ENUM, for the fileFormat property's combo. A code outside the three reachable ones reports StandardRainFile: every such code is station-based, which is the distinction that decides both the written grammar and the Station ID row.

◆ filePath()

QString SWMMRainGagePropertyAdapter::filePath ( ) const

.original token

◆ rainIntervalRef()

RainIntervalRef SWMMRainGagePropertyAdapter::rainIntervalRef ( ) const

◆ rainType()

SWMMRainGagePropertyAdapter::RainType SWMMRainGagePropertyAdapter::rainType ( ) const

◆ rainUnits()

SWMMRainGagePropertyAdapter::RainUnits SWMMRainGagePropertyAdapter::rainUnits ( ) const

0=IN, 1=MM

◆ resolvedFilePath()

QString SWMMRainGagePropertyAdapter::resolvedFilePath ( ) const

.absolute (post-resolve)

◆ scaleFactor()

double SWMMRainGagePropertyAdapter::scaleFactor ( ) const

◆ seriesNameRef()

DataObjectRef SWMMRainGagePropertyAdapter::seriesNameRef ( ) const

◆ setDataSource

void SWMMRainGagePropertyAdapter::setDataSource ( int  v)
slot
Here is the call graph for this function:

◆ setFileColumn

void SWMMRainGagePropertyAdapter::setFileColumn ( const QString &  c)
slot
Here is the call graph for this function:

◆ setFileFormat

void SWMMRainGagePropertyAdapter::setFileFormat ( int  v)
slot
Here is the call graph for this function:

◆ setFilePath

void SWMMRainGagePropertyAdapter::setFilePath ( const QString &  p)
slot
Here is the call graph for this function:

◆ setRainIntervalRef

void SWMMRainGagePropertyAdapter::setRainIntervalRef ( const RainIntervalRef r)
slot
Here is the call graph for this function:

◆ setRainType

void SWMMRainGagePropertyAdapter::setRainType ( int  v)
slot
Here is the call graph for this function:

◆ setRainUnits

void SWMMRainGagePropertyAdapter::setRainUnits ( int  v)
slot
Here is the call graph for this function:

◆ setScaleFactor

void SWMMRainGagePropertyAdapter::setScaleFactor ( double  v)
slot
Here is the call graph for this function:

◆ setSeriesNameRef

void SWMMRainGagePropertyAdapter::setSeriesNameRef ( const DataObjectRef r)
slot
Here is the call graph for this function:

◆ setSnowFactor

void SWMMRainGagePropertyAdapter::setSnowFactor ( double  v)
slot
Here is the call graph for this function:

◆ setStationId

void SWMMRainGagePropertyAdapter::setStationId ( const QString &  s)
slot
Here is the call graph for this function:

◆ setUserFlagsRef

void SWMMRainGagePropertyAdapter::setUserFlagsRef ( const UserFlagsEditRef )
inlineslot
Here is the call graph for this function:

◆ setXCoord

void SWMMRainGagePropertyAdapter::setXCoord ( double  v)
slot

Emit coordChangeRequested rather than writing the engine, so the panel can route the move through the layer (scene cache + extent).

Here is the call graph for this function:

◆ setYCoord

void SWMMRainGagePropertyAdapter::setYCoord ( double  v)
slot
Here is the call graph for this function:

◆ snowFactor()

double SWMMRainGagePropertyAdapter::snowFactor ( ) const

◆ stationId()

QString SWMMRainGagePropertyAdapter::stationId ( ) const

◆ SWMMDataObjectPropertyAdapter()

SWMMDataObjectPropertyAdapter::SWMMDataObjectPropertyAdapter ( SWMM_Engine  engine,
QString  name,
QObject *  parent = nullptr 
)

◆ userFlagsRef()

UserFlagsEditRef SWMMRainGagePropertyAdapter::userFlagsRef ( ) const
Here is the call graph for this function:

◆ xCoord()

double SWMMRainGagePropertyAdapter::xCoord ( ) const

◆ yCoord()

double SWMMRainGagePropertyAdapter::yCoord ( ) const

Property Documentation

◆ currentRainfall

double SWMMRainGagePropertyAdapter::currentRainfall
read

Current rainfall rate in project units — read-only display.

◆ dataSource

SWMMRainGagePropertyAdapter::DataSource SWMMRainGagePropertyAdapter::dataSource
readwrite

◆ fileColumn

QString SWMMRainGagePropertyAdapter::fileColumn
readwrite

Multi-column rain file (spec §4 task 4) — the data column selected inside a CSV/TSV/TSF file. Setting a non-empty column switches the engine gage to the USER_CSV file format ("FILE path:col"); the colon composition is the engine writer's job, never the user's. Only meaningful when dataSource == FILE.

◆ fileFormat

SWMMRainGagePropertyAdapter::RainFileFormat SWMMRainGagePropertyAdapter::fileFormat
readwrite

Rain-file grammar, and the only way back out of USER_CSV: both setFileColumn() and setFilePath() preserve it by design (engine contract), so without this row a gage that ever had a column could never return to a standard FILE "path" Station Units rain file and its Station ID would stay greyed out for good. Selecting MULTI_COLUMN clears the station id; selecting STANDARD clears the file column — the two grammars' row selectors are mutually exclusive engine-side. Only meaningful when dataSource == FILE.

◆ filePath

QString SWMMRainGagePropertyAdapter::filePath
readwrite

Slice IO-11e — external rain-file path for this gage. The string is the original token (relative or absolute) as known to the engine; reads also surface the resolved absolute via resolvedFilePath() for tooltip / status display.

◆ rainInterval

RainIntervalRef SWMMRainGagePropertyAdapter::rainInterval
readwrite

Recording interval. Legacy [RAINGAGES] token 2, edited as an H:MM clock combo (RainIntervalComboBox). The ref carries seconds; the engine stores GageData.interval_sec.

◆ rainType

SWMMRainGagePropertyAdapter::RainType SWMMRainGagePropertyAdapter::rainType
readwrite

◆ rainUnits

SWMMRainGagePropertyAdapter::RainUnits SWMMRainGagePropertyAdapter::rainUnits
readwrite

◆ resolvedFilePath

QString SWMMRainGagePropertyAdapter::resolvedFilePath
read

◆ scaleFactor

double SWMMRainGagePropertyAdapter::scaleFactor
readwrite

Rainfall scale factor — the optional trailing token of [RAINGAGES] (token 6 for TIMESERIES, token 9 for FILE). Multiplies all rainfall from this gage. Distinct from snowFactor above: this scales rainfall, SCF corrects snow catch. Must be > 0; default 1.0.

◆ seriesName

DataObjectRef SWMMRainGagePropertyAdapter::seriesName
readwrite

DA.2 parity — TIME SERIES source: the in-model series id. Renders as a TimeSeries-filtered picker (DataObjectPickerEditor). Only meaningful when dataSource == TIMESERIES (panel greys it otherwise).

◆ snowFactor

double SWMMRainGagePropertyAdapter::snowFactor
readwrite

Snow-catch deficiency correction factor (legacy SCF, token 3). Distinct from the rainfall scale factor.

◆ stationId

QString SWMMRainGagePropertyAdapter::stationId
readwrite

DA.2 parity — DATA FILE source: station id (standard SWMM rain file grammar Fname Station Units) and rain-depth units (0=IN, 1=MM). Only meaningful when dataSource == FILE.

◆ userFlags

UserFlagsEditRef SWMMRainGagePropertyAdapter::userFlags
readwrite

Phase 4 of docs/USER_FLAGS_UI_PLAN_2026-06-03.md — per-object user-flag assignments row (see SWMMNodePropertyAdapter).

◆ xCoord

double SWMMRainGagePropertyAdapter::xCoord
readwrite

Map position, [SYMBOLS] X / Y in the project's map units. A rain gage IS a spatial object — the original DA.2 adapter set omitted these because it derives from the non-spatial data-object base, so the gage was the one placed object whose location could not be typed in. Writes are deferred to PropertiesPanelSWMMModelLayer::applyGageMove (the same contract SWMMNodePropertyAdapter::setXCoord uses) so the cached scene point moves with the engine value.

◆ yCoord

double SWMMRainGagePropertyAdapter::yCoord
readwrite

The documentation for this class was generated from the following files: