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

Two-way bridge between GIS vector layers' fid selections and the SelectionManager bus. More...

#include <QObject>
#include <QPointer>
Include dependency graph for gisselectionbridge.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  GisSelectionBridge
 

Detailed Description

Two-way bridge between GIS vector layers' fid selections and the SelectionManager bus.

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

SVBC round B. GISVectorLayer has carried a selectionChanged(QSet<qint64>) signal since day one — with zero subscribers, which is why picking a feature on the map never reached the Attribute Table. This is the GIS analogue of SWMMVisProjectWindow's inline SWMM-layer bridge, as its own small QObject so it is testable with a light MapCanvas fixture (the SWMM bridge is reachable only through a full project window).

Wiring, not abstraction: no virtual interface, GIS layers only.

  • layer → bus: any layer's selectionChanged rebuilds Feature refs from EVERY GIS layer on the canvas (a point click does not stop at the first layer, so per-layer Replace would drop another layer's picks) and Replace-selects them on the bus.
  • bus → layers: Feature refs are grouped by layerId and pushed with setSelectedFeatureIds per layer — an empty set clears, and the layer's own needs-rebuild + repaint plumbing lights the highlight. Both directions run under one busy flag so nothing bounces.