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
sectiondiagram.h File Reference

Renderer-agnostic section/profile diagram model + QPainter painter. More...

#include <QPalette>
#include <QtGlobal>
#include <QPointF>
#include <QPolygonF>
#include <QRectF>
#include <QString>
#include <QVector>
Include dependency graph for sectiondiagram.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openswmmvis::sectionview::DiagramPoly
 
struct  openswmmvis::sectionview::DiagramPolyline
 
struct  openswmmvis::sectionview::DiagramGround
 
struct  openswmmvis::sectionview::DiagramDim
 
struct  openswmmvis::sectionview::DiagramLeader
 
struct  openswmmvis::sectionview::DiagramVegetation
 
struct  openswmmvis::sectionview::DiagramCircle
 
struct  openswmmvis::sectionview::DiagramArrow
 
struct  openswmmvis::sectionview::DiagramSymbol
 
struct  openswmmvis::sectionview::PlanSpoke
 
struct  openswmmvis::sectionview::PlanInset
 
struct  openswmmvis::sectionview::DiagramViewport
 User zoom / pan applied on top of the automatic fit. More...
 
struct  openswmmvis::sectionview::SectionDiagramModel
 Everything one preview pane draws, in model units. More...
 

Namespaces

namespace  openswmmvis
 
namespace  openswmmvis::sectionview
 

Enumerations

enum class  openswmmvis::sectionview::DiagramRole {
  openswmmvis::sectionview::Conduit ,
  openswmmvis::sectionview::Structure ,
  openswmmvis::sectionview::Storage ,
  openswmmvis::sectionview::Soil ,
  openswmmvis::sectionview::Media ,
  openswmmvis::sectionview::Gravel ,
  openswmmvis::sectionview::Vegetation ,
  openswmmvis::sectionview::Water ,
  openswmmvis::sectionview::Muted ,
  openswmmvis::sectionview::Accent
}
 
enum class  openswmmvis::sectionview::DiagramTexture {
  openswmmvis::sectionview::None ,
  openswmmvis::sectionview::Stipple ,
  openswmmvis::sectionview::Gravel ,
  openswmmvis::sectionview::Aggregate ,
  openswmmvis::sectionview::Sand ,
  openswmmvis::sectionview::Hatch ,
  openswmmvis::sectionview::Lattice ,
  openswmmvis::sectionview::Brick
}
 
enum class  openswmmvis::sectionview::DiagramSymbolKind {
  openswmmvis::sectionview::Pump ,
  openswmmvis::sectionview::FlapGate ,
  openswmmvis::sectionview::ManholeCover ,
  openswmmvis::sectionview::RatingBox
}
 

Functions

void openswmmvis::sectionview::paintSectionDiagram (QPainter &painter, const QRectF &target, const SectionDiagramModel &model, const QPalette &palette, const DiagramViewport &viewport={}, QRectF *fitRectOut=nullptr, double *achievedExaggerationOut=nullptr)
 Paint model into target using palette for all colours.
 
QColor openswmmvis::sectionview::diagramFillColor (DiagramRole role, const QPalette &palette)
 
QColor openswmmvis::sectionview::diagramStrokeColor (DiagramRole role, const QPalette &palette)
 

Detailed Description

Renderer-agnostic section/profile diagram model + QPainter painter.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
Date
2026
License\n GPL-3.0-or-later

Slice SP.2 (workplans/SECTION_PREVIEW_WORKPLAN.md).

A SectionDiagramModel is a plain value describing WHAT to draw in model units (feet or metres — the diagram never converts): filled shapes, ground hatch, dimension lines with arrowheads, leader lines with landing text, and an optional plan-view compass inset. paintSectionDiagram() maps it into a pixel rect and paints it.

The split keeps every builder headlessly testable: a builder produces a model from engine state with no QWidget, no palette and no event loop, and tests assert on the model's contents rather than on rendered pixels.

All colours come from the supplied QPalette, so the diagrams follow the app theme (including dark mode) with no per-widget stylesheet.