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::sectionview::SectionDiagramModel Struct Reference

Everything one preview pane draws, in model units. More...

#include <sectiondiagram.h>

Collaboration diagram for openswmmvis::sectionview::SectionDiagramModel:

Public Member Functions

bool isEmpty () const
 
QRectF computeBounds () const
 

Public Attributes

QString title
 Bold header, e.g. "C-12 — Cross-Section".
 
QString subtitle
 Secondary header, e.g. "CIRCULAR".
 
QString footer
 Single-line readout under the drawing.
 
QString emptyText
 
QRectF bounds
 
bool uniformScale = true
 
double verticalExaggeration = 0.0
 
double maxVerticalExaggeration = 0.0
 
double targetDrawnAspect = 0.0
 
bool annotateExaggeration = false
 
QVector< DiagramPolypolys
 
QVector< DiagramPolylinepolylines
 
QVector< DiagramGroundgrounds
 
QVector< DiagramVegetationvegetation
 
QVector< DiagramCirclecircles
 
QVector< DiagramArrowarrows
 
QVector< DiagramSymbolsymbols
 
QVector< DiagramDimdims
 
QVector< DiagramLeaderleaders
 
QVector< PlanInsetplanInsets
 

Detailed Description

Everything one preview pane draws, in model units.

Member Function Documentation

◆ computeBounds()

QRectF openswmmvis::sectionview::SectionDiagramModel::computeBounds ( ) const

Union of every drawable's extent; used when bounds is left null.

Here is the caller graph for this function:

◆ isEmpty()

bool openswmmvis::sectionview::SectionDiagramModel::isEmpty ( ) const
inline
Here is the caller graph for this function:

Member Data Documentation

◆ annotateExaggeration

bool openswmmvis::sectionview::SectionDiagramModel::annotateExaggeration = false

Draw the achieved V:H ratio on the drawing.

Only meaningful when BOTH axes are real lengths. Node profiles put connecting pipes on a normalised x axis, where a ratio would be arithmetic on an arbitrary unit, so they leave this false.

◆ arrows

QVector<DiagramArrow> openswmmvis::sectionview::SectionDiagramModel::arrows

◆ bounds

QRectF openswmmvis::sectionview::SectionDiagramModel::bounds

Model-space extent to fit. Left empty → computed from the content.

◆ circles

QVector<DiagramCircle> openswmmvis::sectionview::SectionDiagramModel::circles

◆ dims

QVector<DiagramDim> openswmmvis::sectionview::SectionDiagramModel::dims

◆ emptyText

QString openswmmvis::sectionview::SectionDiagramModel::emptyText

Shown centred instead of the drawing when there is nothing to render (no selection, DUMMY section, geometry not resolvable).

◆ footer

QString openswmmvis::sectionview::SectionDiagramModel::footer

Single-line readout under the drawing.

◆ grounds

QVector<DiagramGround> openswmmvis::sectionview::SectionDiagramModel::grounds

◆ leaders

QVector<DiagramLeader> openswmmvis::sectionview::SectionDiagramModel::leaders

◆ maxVerticalExaggeration

double openswmmvis::sectionview::SectionDiagramModel::maxVerticalExaggeration = 0.0

Cap on the automatic exaggeration. 0 → uncapped.

◆ planInsets

QVector<PlanInset> openswmmvis::sectionview::SectionDiagramModel::planInsets

Non-empty → draw one compass inset per entry, each anchored in the margin its side names. One entry for a node section, two for a link section. The painter places them in space the drawing is not using and drops them when there is none — they never shrink the profile.

◆ polylines

QVector<DiagramPolyline> openswmmvis::sectionview::SectionDiagramModel::polylines

◆ polys

QVector<DiagramPoly> openswmmvis::sectionview::SectionDiagramModel::polys

◆ subtitle

QString openswmmvis::sectionview::SectionDiagramModel::subtitle

Secondary header, e.g. "CIRCULAR".

◆ symbols

QVector<DiagramSymbol> openswmmvis::sectionview::SectionDiagramModel::symbols

◆ targetDrawnAspect

double openswmmvis::sectionview::SectionDiagramModel::targetDrawnAspect = 0.0

Width:height the DRAWN content should aim for, when choosing the automatic exaggeration. 0 → fill the pane (the legacy behaviour, kept for models whose x axis is not a real length).

Deriving the ratio from the model's own proportions rather than from the pane is what makes the automatic choice honest: a 120 m reach with 4.5 m of depth is naturally 27:1, so a target of 6:1 asks for 4.4x and snaps to 4x — the same answer at every dock size. Sizing to the pane instead (whether by filling it or by chasing a pixel height) makes the apparent gradient change as the user resizes, which is precisely the defect this field exists to remove.

◆ title

QString openswmmvis::sectionview::SectionDiagramModel::title

Bold header, e.g. "C-12 — Cross-Section".

◆ uniformScale

bool openswmmvis::sectionview::SectionDiagramModel::uniformScale = true

true → equal px-per-unit on both axes (true-shape cross-sections). false → the vertical scale is exaggerated relative to the horizontal, by the ratio the two fields below resolve to.

◆ vegetation

QVector<DiagramVegetation> openswmmvis::sectionview::SectionDiagramModel::vegetation

◆ verticalExaggeration

double openswmmvis::sectionview::SectionDiagramModel::verticalExaggeration = 0.0

Vertical exaggeration (V:H) to draw at, when uniformScale is false.

0 → choose automatically, capped by maxVerticalExaggeration. >0 → use exactly this ratio; 1.0 is true scale.

This exists because "stretch each axis to fill the box" — the obvious way to fit a 120 m reach with 4 m of depth into a wide pane — silently picks an exaggeration of 15 or more and makes a 0.25 % pipe look like a 4 % one. A profile has to state its exaggeration, or it misinforms.


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