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

Procedural cross-section shape icons. More...

#include <QIcon>
#include <QPalette>
#include <QSize>
Include dependency graph for xsecticonrenderer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  openswmmvis
 
namespace  openswmmvis::sectionview
 

Functions

QIcon openswmmvis::sectionview::xsectShapeIcon (int shape, const QSize &size, const QPalette &palette)
 Icon for a SWMM_XSectShape, rendered from engine geometry.
 
void openswmmvis::sectionview::nominalGeomsFor (int shape, double &geom1, double &geom2, double &geom3, double &geom4)
 Representative geom1..geom4 used to draw shape at unit depth.
 

Detailed Description

Procedural cross-section shape icons.

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.3 (workplans/SECTION_PREVIEW_WORKPLAN.md).

Replaces the 26 hand-drawn resources/images/*_xsect.svg thumbnails with outlines sampled from the engine, so the palette tiles and the live preview can never disagree, the icons follow the theme foreground, and shapes that never got artwork (BASKETHANDLE, SEMICIRCULAR, CUSTOM, FORCE_MAIN, DUMMY) get a correct tile for free.

Icons are drawn at a nominal unit depth with representative widths (see nominalGeomsFor()), not at the link's real dimensions — a palette tile shows what the shape is, and rendering a 0.15 m pipe and a 3 m box culvert to their true relative scale would make most tiles unreadable.