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::trace::TraceStyle Class Referencefinal

#include <traceanalysislayer.h>

Inheritance diagram for openswmmvis::trace::TraceStyle:
Collaboration diagram for openswmmvis::trace::TraceStyle:

Public Member Functions

 TraceStyle (QObject *p=nullptr)
 
double taper () const
 
void setTaper (double v)
 
bool arrows () const
 
void setArrows (bool v)
 
double minContribution () const
 Elements carrying less than this fraction of the seed's flow are hidden and unlabelled.
 
void setMinContribution (double v)
 
bool labels () const
 
void setLabels (bool v)
 
void changed ()
 Announce direct public channel/label edits through SublayerStyle::setDirty(); no validation or source recalculation occurs.
 
QJsonObject toJson () const override
 
void fromJson (const QJsonObject &j) override
 
- Public Member Functions inherited from OpenSWMM::Render::SublayerStyle
 SublayerStyle (QObject *parent=nullptr)
 Construct a style base with ordinary Qt parent ownership.
 
 ~SublayerStyle () override=default
 Destroy the style and its QObject-owned children.
 

Public Attributes

Channel linkColor
 
Channel linkWidth
 
Channel nodeColor
 
Channel nodeSize
 
TraceLabels linkLabels
 
TraceLabels nodeLabels
 

Properties

bool arrows
 
bool labels
 

Additional Inherited Members

- Signals inherited from OpenSWMM::Render::SublayerStyle
void styleChanged ()
 Emitted when any property changes.
 
- Protected Member Functions inherited from OpenSWMM::Render::SublayerStyle
void setDirty ()
 Emit styleChanged() immediately without tracking or comparing any state. Subclasses determine whether a logical change occurred before calling this. Repeated calls emit repeatedly; the base provides no batching or dirty flag.
 

Constructor & Destructor Documentation

◆ TraceStyle()

openswmmvis::trace::TraceStyle::TraceStyle ( QObject *  p = nullptr)
inlineexplicit
Parameters
[in]pOptional QObject owner for the mutable aggregate style.
Note
Initializes independent node/link channels and sets link minimum width to zero; public-field edits require changed() to announce them.

Member Function Documentation

◆ arrows()

bool openswmmvis::trace::TraceStyle::arrows ( ) const
inline
Returns
Whether downstream link arrows are requested, initially true; sublayer visibility also gates painting.

◆ changed()

void openswmmvis::trace::TraceStyle::changed ( )
inline

Announce direct public channel/label edits through SublayerStyle::setDirty(); no validation or source recalculation occurs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fromJson()

void openswmmvis::trace::TraceStyle::fromJson ( const QJsonObject &  j)
overridevirtual
Parameters
[in]jEmpty is a no-op; otherwise replaces channels/labels with decoded values/defaults, clamps taper/contribution, and migrates older node-label flag/id selection.
Note
Always setDirty() after nonempty restore, without strict schema validation/rollback. Unlike setMinContribution(), JSON restoration does not separately normalize NaN.

Reimplemented from OpenSWMM::Render::SublayerStyle.

Here is the call graph for this function:

◆ labels()

bool openswmmvis::trace::TraceStyle::labels ( ) const
inline
Returns
Node-label appearance enabled flag only; link-label visibility is independent.

◆ minContribution()

double openswmmvis::trace::TraceStyle::minContribution ( ) const
inline

Elements carrying less than this fraction of the seed's flow are hidden and unlabelled.

Returns
Absolute minimum positive passage-ratio share, initially0.001; seed and unavailable/nonfinite ratios have special contribution rules.

◆ setArrows()

void openswmmvis::trace::TraceStyle::setArrows ( bool  v)
Parameters
[in]vWhether to request arrow glyphs.
Note
Equality after normalization is a no-op; change calls setDirty(), advancing style revision and notifying attached views.
Here is the call graph for this function:

◆ setLabels()

void openswmmvis::trace::TraceStyle::setLabels ( bool  v)
Parameters
[in]vNode-label enabled state only, leaving linkLabels unchanged.
Note
Equality after normalization is a no-op; change calls setDirty(), advancing style revision and notifying attached views.
Here is the call graph for this function:

◆ setMinContribution()

void openswmmvis::trace::TraceStyle::setMinContribution ( double  v)
Parameters
[in]vPassage-ratio fraction clamped0..1; nonfinite input substitutes zero.
Note
Equality after normalization is a no-op; change calls setDirty(), advancing style revision and notifying attached views.
Here is the call graph for this function:

◆ setTaper()

void openswmmvis::trace::TraceStyle::setTaper ( double  v)
Parameters
[in]vFinite taper fraction clamped0.05..1; caller should exclude NaN because std::clamp has no independent finite guard.
Note
Equality after normalization is a no-op; change calls setDirty(), advancing style revision and notifying attached views.
Here is the call graph for this function:

◆ taper()

double openswmmvis::trace::TraceStyle::taper ( ) const
inline
Returns
Stored taper fraction, initially one; current trace painting/hit-testing use equal start/end widths and do not apply it.

◆ toJson()

QJsonObject openswmmvis::trace::TraceStyle::toJson ( ) const
overridevirtual
Returns
Owned schema-two channel/label/taper/arrow/contribution state. Part visibility/opacity is added separately by savedStyle(); no disk IO.

Reimplemented from OpenSWMM::Render::SublayerStyle.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ linkColor

Channel openswmmvis::trace::TraceStyle::linkColor

◆ linkLabels

TraceLabels openswmmvis::trace::TraceStyle::linkLabels

◆ linkWidth

Channel openswmmvis::trace::TraceStyle::linkWidth

◆ nodeColor

Channel openswmmvis::trace::TraceStyle::nodeColor

◆ nodeLabels

TraceLabels openswmmvis::trace::TraceStyle::nodeLabels

◆ nodeSize

Channel openswmmvis::trace::TraceStyle::nodeSize

Property Documentation

◆ arrows

bool openswmmvis::trace::TraceStyle::arrows
readwrite

◆ labels

bool openswmmvis::trace::TraceStyle::labels
readwrite

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