![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Owner of the canonical selection set for one SWMM project. More...
#include <selectionmanager.h>
Public Types | |
| enum | Mode { Replace = 0 , Add = 1 , Toggle = 2 , Subtract = 3 } |
Signals | |
| void | selectionChanged (const QSet< SWMMObjectRef > ¤t, const QSet< SWMMObjectRef > &added, const QSet< SWMMObjectRef > &removed) |
Emitted on every set change. added / removed are disjoint and convey the delta from the previous selection. | |
Public Member Functions | |
| SelectionManager (QObject *parent=nullptr) | |
| ~SelectionManager () override | |
| void | select (const QSet< SWMMObjectRef > &refs, Mode mode=Replace) |
Apply refs to the current selection using mode. | |
| void | select (const SWMMObjectRef &ref, Mode mode=Replace) |
| Convenience overload for a single ref. | |
| void | clear () |
Drop everything. Equivalent to select({}, Replace). | |
| const QSet< SWMMObjectRef > & | selection () const |
| Read-only view of the current selection. | |
| bool | contains (const SWMMObjectRef &ref) const |
True if ref is in the current selection. | |
| int | size () const |
| bool | isEmpty () const |
Owner of the canonical selection set for one SWMM project.
The four selection modes follow the QGIS / ArcGIS Pro vocabulary:
refs as the new one.selectionChanged(current, added, removed) is emitted whenever the set changes; the added and removed sets let subscribers do incremental updates instead of diffing their own copy of current.
|
explicit |
|
overridedefault |
| void SelectionManager::clear | ( | ) |
Drop everything. Equivalent to select({}, Replace).
|
inline |
True if ref is in the current selection.
|
inline |
| void SelectionManager::select | ( | const QSet< SWMMObjectRef > & | refs, |
| Mode | mode = Replace |
||
| ) |
Apply refs to the current selection using mode.
| void SelectionManager::select | ( | const SWMMObjectRef & | ref, |
| Mode | mode = Replace |
||
| ) |
Convenience overload for a single ref.
|
inline |
Read-only view of the current selection.
|
signal |
Emitted on every set change. added / removed are disjoint and convey the delta from the previous selection.
|
inline |