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
openswmmvis::import Namespace Reference

Classes

struct  AttributeBinding
 
struct  EnumChoice
 
class  FeatureLayerImporter
 
class  ImportFeatureLayerDialog
 
struct  ImportMapping
 
class  ImportMappingModel
 
struct  ImportPlan
 
class  ImportPreviewModel
 
class  ImportTargetRegistry
 
struct  ModelSnapshot
 
struct  PlannedItem
 
struct  SourceFeature
 
class  SourceFieldDelegate
 
struct  SourceSpec
 
struct  TargetAttribute
 

Enumerations

enum class  TargetKind {
  Junction = 0 ,
  Outfall ,
  Storage ,
  Divider ,
  RainGage ,
  Conduit ,
  Pump ,
  Orifice ,
  Weir ,
  Outlet
}
 

Functions

QVariant coerceValue (const QVariant &raw, const TargetAttribute &attr, bool *ok, QString *errorOut=nullptr)
 
ImportPlan buildImportPlan (const ImportMapping &mapping, const ModelSnapshot &snapshot, const QVector< SourceFeature > &features)
 

Enumeration Type Documentation

◆ TargetKind

Importable SWMM object kinds. Point-geometry kinds first, then polyline-geometry kinds. Order is the dialog's combo order.

Enumerator
Junction 
Outfall 
Storage 
Divider 
RainGage 
Conduit 
Pump 
Orifice 
Weir 
Outlet 

Function Documentation

◆ buildImportPlan()

ImportPlan openswmmvis::import::buildImportPlan ( const ImportMapping mapping,
const ModelSnapshot snapshot,
const QVector< SourceFeature > &  features 
)

Build the dry-run plan. Pure function of its inputs. features are in source order; the returned plan has one item per feature, same order.

Here is the call graph for this function:

◆ coerceValue()

QVariant openswmmvis::import::coerceValue ( const QVariant &  raw,
const TargetAttribute attr,
bool *  ok,
QString *  errorOut = nullptr 
)

Coerce raw to the declared type of attr.

  • Double/Int: accepts numerics and numeric strings (C then current locale).
  • Enum (attr.enumChoices non-empty): accepts the integer code or a case-insensitive choice label.
  • QString: any convertible value, trimmed. Returns an invalid QVariant and sets errorOut on failure. Null input returns a null (but valid-type-free) QVariant with ok=true — callers treat null as "leave engine default / not provided".
Here is the caller graph for this function: