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
maptooladdvirtualnode.h
Go to the documentation of this file.
1
8#ifndef MAPTOOLADDVIRTUALNODE_H
9#define MAPTOOLADDVIRTUALNODE_H
10
12#include "map/tools/maptool.h"
13
14#include <QString>
15
16class SWMMModelLayer;
17
34{
35 Q_OBJECT
36
37public:
39 QObject *parent = nullptr);
40
41 [[nodiscard]] QCursor cursor() const override;
42
43 void activate() override;
44 void deactivate() override;
45
46 void mousePressEvent (QMouseEvent *event) override;
47 void mouseReleaseEvent(QMouseEvent *event) override;
48 void mouseMoveEvent (QMouseEvent *event) override;
49 void paint(QPainter *painter, const MapExtent &extent,
50 const SpatialReferenceSystem *srs) override;
51
52signals:
53 void virtualJunctionAdded(const QString &nodeName,
54 const QString &splitLinkName,
55 const QString &newLinkName);
56 void statusMessageChanged(const QString &message);
57
58private:
60 bool m_armed = false;
61};
62
63#endif // MAPTOOLADDVIRTUALNODE_H
The central map display widget — QGIS-style hybrid rendering.
Definition mapcanvas.h:63
An axis-aligned bounding box in the coordinate space of a given CRS.
Definition mapextent.h:26
Left-click a conduit to split it and insert a virtual junction at the picked point.
Definition maptooladdvirtualnode.h:34
void deactivate() override
Called by the canvas when another tool replaces this one.
Definition maptooladdvirtualnode.cpp:37
void activate() override
Called by the canvas when this tool becomes the active tool.
Definition maptooladdvirtualnode.cpp:28
QCursor cursor() const override
Returns the mouse cursor to display while this tool is active.
Definition maptooladdvirtualnode.cpp:23
void mouseReleaseEvent(QMouseEvent *event) override
Definition maptooladdvirtualnode.cpp:58
void mouseMoveEvent(QMouseEvent *event) override
Definition maptooladdvirtualnode.cpp:45
void paint(QPainter *painter, const MapExtent &extent, const SpatialReferenceSystem *srs) override
Called by the canvas in drawForeground() so the tool can draw transient overlay graphics (rubber-band...
Definition maptooladdvirtualnode.cpp:99
void statusMessageChanged(const QString &message)
void mousePressEvent(QMouseEvent *event) override
Definition maptooladdvirtualnode.cpp:52
void virtualJunctionAdded(const QString &nodeName, const QString &splitLinkName, const QString &newLinkName)
Abstract base class for interactive map tools used in the MapCanvas.
Definition maptool.h:43
MapCanvas * canvas() const
Returns the MapCanvas this tool is attached to.
Definition maptool.cpp:29
Renders the SWMM network elements (nodes, links, subcatchments, rain gages) for one OpenSWMMEngine mo...
Definition swmmmodellayer.h:133
Represents a coordinate reference system backed by a GDAL OGRSpatialReference.
Definition spatialreferencesystem.h:28
Shared "which conduit is under the cursor, and where along it" hit-test used by every tool that inser...
QString nodeName
Definition importplanning.cpp:95
Abstract base class for all interactive tools attached to a MapCanvas.
QVector< int > parent
union-find
Definition pslgminsize.cpp:176
QString message
Definition queryparser.cpp:150
Definition conduitsplitpick.h:31