![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Pure category-bucketing helpers extracted from layertreepanel.cpp (Slice LTR-2026-05-30) so the mapping can be unit-tested headlessly without standing up a MapCanvas / OpenSWMMVisLayer object graph. More...
Go to the source code of this file.
Classes | |
| struct | openswmmvis::ui::CategoryInfo |
| User-visible label + Qt resource alias for a category. Returned by categoryInfo(); the strings are static (resource aliases under :/swmmvis/ are compile-time constants). More... | |
Namespaces | |
| namespace | openswmmvis |
| namespace | openswmmvis::ui |
Functions | |
| CategoryId | openswmmvis::ui::categoryForLayerType (int layerTypeOrdinal) |
| Maps a layer-type ordinal to its tree category. | |
| CategoryId | openswmmvis::ui::categoryForLayerType (LayerTypeOrdinal t) |
| Convenience overload taking the typed ordinal directly. | |
| CategoryInfo | openswmmvis::ui::categoryInfo (CategoryId id) |
| Returns the display label + icon alias for a category. | |
Variables | |
| constexpr int | openswmmvis::ui::kDefaultCategoryDisplayOrder [CatCount] |
| Default top-to-bottom order of the category groups in the layer tree AND in the canvas paint stack (index 0 = top of tree = drawn last). Results groups sit on top because they overlay the model / mesh for analysis; tables sit at the bottom. | |
Pure category-bucketing helpers extracted from layertreepanel.cpp (Slice LTR-2026-05-30) so the mapping can be unit-tested headlessly without standing up a MapCanvas / OpenSWMMVisLayer object graph.
The header has no Qt dependency and no link dependency on layers/openswmmvislayer.h. Layer types are passed as plain int (matching the underlying OpenSWMMVisLayer::OpenSWMMVisLayerType enum values, which are stable across releases per openswmmvislayer.h's serialization contract). The mirror enum LayerTypeOrdinal below lets test code reference the same ordinals without pulling Qt — a static_assert in the .cpp checks that the mirror stays in lockstep with the source.