![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
#include <swmmlinkpropertyadapter.h>
Public Types | |
| enum | LinkKind { Conduit = 0 , Pump = 1 , Orifice = 2 , Weir = 3 , Outlet = 4 } |
| enum | FlapGate { NO = 0 , YES = 1 } |
| enum | PumpInitState { OFF = 0 , ON = 1 } |
| enum | OrificeType { SIDE = 0 , BOTTOM = 1 } |
| enum | WeirType { TRANSVERSE = 0 , SIDEFLOW = 1 , VNOTCH = 2 , TRAPEZOIDAL = 3 , ROADWAY = 4 } |
| enum | OutletRatingType { FUNCTIONAL_HEAD = 0 , FUNCTIONAL_DEPTH = 1 , TABULAR_HEAD = 2 , TABULAR_DEPTH = 3 } |
Signals | |
| void | changed () |
| void | renameRequested (const QString &oldName, const QString &newName) |
| void | displayLabelsChanged () |
Public Member Functions | |
| SWMMLinkPropertyAdapter (SWMM_Engine engine, QString name, QObject *parent=nullptr) | |
| void | setModelLayer (SWMMModelLayer *layer) |
| SWMMModelLayer * | modelLayer () const |
| QString | name () const |
| LinkKind | linkKind () const |
| QString | fromNode () const |
| QString | toNode () const |
| QString | tag () const |
Slice SA — [TAGS] value. | |
| double | length () const |
| double | roughness () const |
| double | offsetUp () const |
| double | offsetDn () const |
| double | crestHeight () const |
| double | dischargeCoeff () const |
| double | endContractions () const |
| FlapGate | flapGate () const |
| PumpInitState | pumpInitState () const |
| QString | pumpCurveName () const |
| OrificeType | orificeType () const |
| Slice SD partial. | |
| WeirType | weirType () const |
| Slice SD partial. | |
| OutletRatingType | outletRatingType () const |
| Slice SD partial. | |
| double | outletExpon () const |
| Slice SD partial. | |
| double | pumpStartupDepth () const |
| BN-LINK-05. | |
| double | pumpShutoffDepth () const |
| BN-LINK-05. | |
| double | orificeOpenCloseRate () const |
| BN-LINK-06. | |
| double | initialFlow () const |
| BN-LINK-01a getter. | |
| double | maxFlow () const |
| BN-LINK-01b getter. | |
| double | lossInlet () const |
| swmm_link_get_loss_coeff[inlet] | |
| double | lossOutlet () const |
| swmm_link_get_loss_coeff[outlet] | |
| double | lossAvg () const |
| swmm_link_get_loss_coeff[avg] | |
| double | seepRate () const |
| swmm_link_get_seep_rate | |
| int | barrels () const |
| swmm_link_get_barrels | |
| int | xsectShapeId () const |
| current SWMM_XSECT_* id | |
| double | xsectGeom1 () const |
| double | xsectGeom2 () const |
| double | xsectGeom3 () const |
| double | xsectGeom4 () const |
| double | statMaxFlow () const |
| double | statMaxVelocity () const |
| double | statMaxFilling () const |
| double | statVolFlow () const |
| double | statSurchargeTime () const |
| double | statPumpCycles () const |
| double | statPumpOnTime () const |
| double | statPumpVolume () const |
| DataObjectRef | pumpCurveRef () const |
| LinkCompoundEditRef | xsectionRef () const |
| LinkCompoundEditRef | inletUsageRef () const |
| CulvertCodeRef | culvertCodeRef () const |
| UserFlagsEditRef | userFlagsRef () const |
| InitialQualityEditRef | initialQualityRef () const |
| Q_INVOKABLE QString | displayLabelFor (const QString &property) const |
Protected Member Functions | |
| int | linkIdx () const |
| void | writeXsectGeom (int ordinal, double v) |
Protected Attributes | |
| SWMM_Engine | m_engine |
| QString | m_name |
| SWMMModelLayer * | m_layer = nullptr |
| Bound via setModelLayer. | |
| QUuid | m_statsSourceId |
| Stats-source dispatch state — see SWMMNodePropertyAdapter. | |
| openswmmvis::OutputStatsRegistry * | m_statsRegistry = nullptr |
Properties | |
| QString | name |
| LinkKind | linkKind |
| QString | fromNode |
| QString | toNode |
| QString | tag |
Base link adapter — exposes the attributes that ALL link types share (name, kind, endpoints). Per-type Q_PROPERTYs live on subclasses below so the Property Browser only shows attributes applicable to the identified link's kind.
| SWMMLinkPropertyAdapter::SWMMLinkPropertyAdapter | ( | SWMM_Engine | engine, |
| QString | name, | ||
| QObject * | parent = nullptr |
||
| ) |
| int SWMMLinkPropertyAdapter::barrels | ( | ) | const |
swmm_link_get_barrels
|
signal |
| double SWMMLinkPropertyAdapter::crestHeight | ( | ) | const |
| CulvertCodeRef SWMMLinkPropertyAdapter::culvertCodeRef | ( | ) | const |
ATTRIBUTE_EDITOR_WIRING Phase 0 — culvert code is a single HDS-5 enum value, edited inline via CulvertCodeComboBox (no separate dialog).
| double SWMMLinkPropertyAdapter::dischargeCoeff | ( | ) | const |
| QString SWMMLinkPropertyAdapter::displayLabelFor | ( | const QString & | property | ) | const |
See SWMMNodePropertyAdapter::displayLabelFor — same contract, returns "" for unknown property names.
|
signal |
| double SWMMLinkPropertyAdapter::endContractions | ( | ) | const |
| SWMMLinkPropertyAdapter::FlapGate SWMMLinkPropertyAdapter::flapGate | ( | ) | const |
| QString SWMMLinkPropertyAdapter::fromNode | ( | ) | const |
| double SWMMLinkPropertyAdapter::initialFlow | ( | ) | const |
BN-LINK-01a getter.
| InitialQualityEditRef SWMMLinkPropertyAdapter::initialQualityRef | ( | ) | const |
Initial-quality UI round — per-element [INITIAL_QUALITY] overrides row (see SWMMNodePropertyAdapter).
| LinkCompoundEditRef SWMMLinkPropertyAdapter::inletUsageRef | ( | ) | const |
| double SWMMLinkPropertyAdapter::length | ( | ) | const |
|
protected |
| SWMMLinkPropertyAdapter::LinkKind SWMMLinkPropertyAdapter::linkKind | ( | ) | const |
| double SWMMLinkPropertyAdapter::lossAvg | ( | ) | const |
swmm_link_get_loss_coeff[avg]
| double SWMMLinkPropertyAdapter::lossInlet | ( | ) | const |
swmm_link_get_loss_coeff[inlet]
| double SWMMLinkPropertyAdapter::lossOutlet | ( | ) | const |
swmm_link_get_loss_coeff[outlet]
| double SWMMLinkPropertyAdapter::maxFlow | ( | ) | const |
BN-LINK-01b getter.
|
inline |
|
inline |
| double SWMMLinkPropertyAdapter::offsetDn | ( | ) | const |
| double SWMMLinkPropertyAdapter::offsetUp | ( | ) | const |
| double SWMMLinkPropertyAdapter::orificeOpenCloseRate | ( | ) | const |
BN-LINK-06.
| SWMMLinkPropertyAdapter::OrificeType SWMMLinkPropertyAdapter::orificeType | ( | ) | const |
Slice SD partial.
| double SWMMLinkPropertyAdapter::outletExpon | ( | ) | const |
Slice SD partial.
| SWMMLinkPropertyAdapter::OutletRatingType SWMMLinkPropertyAdapter::outletRatingType | ( | ) | const |
Slice SD partial.
| QString SWMMLinkPropertyAdapter::pumpCurveName | ( | ) | const |
| DataObjectRef SWMMLinkPropertyAdapter::pumpCurveRef | ( | ) | const |
Slice BM.0-Browse-Edit — DataObjectRef-typed accessor for the pump curve, used by the Q_PROPERTY on SWMMPumpPropertyAdapter. Constructs the ref with kind=AnyCurve (pump curves accept several engine curve types). Empty currentName means no curve is assigned yet (the engine returns curveIdx == -1).
| SWMMLinkPropertyAdapter::PumpInitState SWMMLinkPropertyAdapter::pumpInitState | ( | ) | const |
| double SWMMLinkPropertyAdapter::pumpShutoffDepth | ( | ) | const |
BN-LINK-05.
| double SWMMLinkPropertyAdapter::pumpStartupDepth | ( | ) | const |
BN-LINK-05.
|
inlineslot |
|
signal |
| double SWMMLinkPropertyAdapter::roughness | ( | ) | const |
| double SWMMLinkPropertyAdapter::seepRate | ( | ) | const |
swmm_link_get_seep_rate
|
slot |
|
slot |
|
inlineslot |
|
slot |
|
slot |
|
slot |
|
slot |
|
inlineslot |
|
inlineslot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
inline |
Slice BM.0-Browse-Edit — bind the active project's model layer so DataObjectRef-typed properties (pumpCurve) can construct refs with the right layer pointer. Mirror of SWMMNodePropertyAdapter::setModelLayer.
|
slot |
|
slot |
|
slot |
|
slot |
BN-LINK-06.
|
slot |
Slice SD partial.
|
slot |
Slice SD partial.
|
slot |
Slice SD partial.
|
slot |
Slice BM.0-Browse-Edit — writes the selected curve via swmm_link_set_pump_curve. Looks up the engine curve index from ref.currentName; no-op if empty or unknown.
|
slot |
|
slot |
BN-LINK-05.
|
slot |
BN-LINK-05.
|
slot |
|
slot |
|
slot |
Stats-source dispatch — see SWMMNodePropertyAdapter (Slice QA.2) for the full contract. The stat* getters read the editing engine's ambient stats while the id is null, and the registry-resolved SWMMResultsLayer's linkStat*() accessors otherwise.
|
slot |
|
slot |
Slice SA.
|
inlineslot |
|
slot |
Slice SD partial.
|
slot |
|
slot |
|
slot |
|
slot |
|
inlineslot |
Slice SC.1 — Compound-ref write slots. The cell's LinkCompoundEditButton invokes these via the delegate's setModelData round-trip after the dialog closes. The actual engine mutations already happened inside the dialog (the Apply-as-you-go pages route through SWMMModelLayer::applyLinkXsect / _Barrels / _CulvertCode), so these slots are no-ops except for emitting changed() so the property tree (and the attribute table) re-reads its summary. Their existence is what flips QMetaProperty::isWritable() to true, which is what QVariantPropertyItem checks to mark the cell editable — without these, the cell never enters edit mode and the registered LinkCompoundEditButton creator never fires.
| double SWMMLinkPropertyAdapter::statMaxFilling | ( | ) | const |
| double SWMMLinkPropertyAdapter::statMaxFlow | ( | ) | const |
| double SWMMLinkPropertyAdapter::statMaxVelocity | ( | ) | const |
| double SWMMLinkPropertyAdapter::statPumpCycles | ( | ) | const |
| double SWMMLinkPropertyAdapter::statPumpOnTime | ( | ) | const |
| double SWMMLinkPropertyAdapter::statPumpVolume | ( | ) | const |
|
inlineslot |
| double SWMMLinkPropertyAdapter::statSurchargeTime | ( | ) | const |
| double SWMMLinkPropertyAdapter::statVolFlow | ( | ) | const |
| QString SWMMLinkPropertyAdapter::tag | ( | ) | const |
Slice SA — [TAGS] value.
| QString SWMMLinkPropertyAdapter::toNode | ( | ) | const |
|
inlineslot |
| UserFlagsEditRef SWMMLinkPropertyAdapter::userFlagsRef | ( | ) | const |
Phase 4 of docs/USER_FLAGS_UI_PLAN_2026-06-03.md — per-object user-flag assignments row (see SWMMNodePropertyAdapter).
| SWMMLinkPropertyAdapter::WeirType SWMMLinkPropertyAdapter::weirType | ( | ) | const |
Slice SD partial.
|
protected |
Read-modify-write one geom (ordinal 1..4) of the xsect tuple; no-op when the geom doesn't apply to the current shape. Emits changed().
| double SWMMLinkPropertyAdapter::xsectGeom1 | ( | ) | const |
| double SWMMLinkPropertyAdapter::xsectGeom2 | ( | ) | const |
| double SWMMLinkPropertyAdapter::xsectGeom3 | ( | ) | const |
| double SWMMLinkPropertyAdapter::xsectGeom4 | ( | ) | const |
| LinkCompoundEditRef SWMMLinkPropertyAdapter::xsectionRef | ( | ) | const |
Slice SC.1 — Compound-attribute refs for the link-side Property Browser cells (cross section / inlet usage). Each builds the engine summary live so the cell shows a useful preview even before the user opens the dialog.
| int SWMMLinkPropertyAdapter::xsectShapeId | ( | ) | const |
current SWMM_XSECT_* id
|
protected |
|
protected |
Bound via setModelLayer.
|
protected |
|
protected |
|
protected |
Stats-source dispatch state — see SWMMNodePropertyAdapter.
|
read |
|
read |
|
readwrite |
|
readwrite |
Slice SA — Free-form [TAGS] label (mirrors SWMMNodePropertyAdapter::tag). Editable text; index-keyed in the engine, so it survives a rename. Subclasses must declare a matching Q_PROPERTY row to actually expose the field to QPropertyModel — declaring the WRITE+READ pair here keeps QML / scripting clients happy without forcing the inline cell on every link kind.
|
read |