![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Locator for the current selection: a flash on change, then a persistent beacon for as long as the selection stands. More...
#include <QColor>#include <QElapsedTimer>#include <QObject>#include <QPointF>#include <QTimer>#include <QVector>#include <functional>Go to the source code of this file.
Classes | |
| class | SelectionBeaconOverlay |
Namespaces | |
| namespace | SelectionBeacon |
Variables | |
| constexpr int | SelectionBeacon::kBeaconRadiusPx = 14 |
| steady ring radius | |
| constexpr int | SelectionBeacon::kFlashMaxRadiusPx = 46 |
| ring radius at end of flash | |
| constexpr int | SelectionBeacon::kFlashDurationMs = 800 |
| constexpr int | SelectionBeacon::kFlashFrameMs = 33 |
| ~30 fps while flashing | |
| constexpr int | SelectionBeacon::kMaxBeacons = 250 |
| beyond this, aggregate | |
Locator for the current selection: a flash on change, then a persistent beacon for as long as the selection stands.
A selected conduit two pixels long is invisible at model-wide zoom — the selection halo scales with the geometry, so "what did I just select, and where is it?" has no answer until you zoom. This overlay answers it in SCREEN space: the ring is a fixed pixel size at every zoom, so it stays legible no matter how small the feature itself has become.
Two phases:
Zoom-dependent aggregation: when the whole selection collapses to less than a beacon's width on screen (i.e. zoomed out), ONE ring is drawn at its centre rather than N rings stacked on the same pixel. Zoomed in far enough to tell the features apart, each gets its own.
Off-screen selections draw nothing by design — "Zoom to Selection" (Ctrl+Shift+J) already serves that case.
Painted from MapCanvas' overlay stage, above the composited QSG frame, so a 2D mesh can never hide it.