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
OpenSWMMVisMapToolSelectProfile Class Reference

#include <maptoolselectprofile.h>

Inheritance diagram for OpenSWMMVisMapToolSelectProfile:
Collaboration diagram for OpenSWMMVisMapToolSelectProfile:

Signals

void profilePathSelected (const ProfileRouter::Path &path)
 Fired immediately after the user accepts a path (or after a single-candidate route auto-confirms). The path's node and edge indices are engine indices on the active SWMMModelLayer.
 
void statusMessageChanged (const QString &message)
 Fired when the tool's status string changes — host can pipe this into the main-window status bar.
 
void routingBusyChanged (bool busy)
 Fired when async routing starts (busy = true) and again when it completes (busy = false). Hosts can wire this to a status-bar busy spinner so the user sees that background work is in flight.
 
- Signals inherited from OpenSWMMVisMapTool
void cursorChanged (const QCursor &cursor)
 
void activeChanged (bool active)
 
void repaintRequested ()
 Emitted to instruct the canvas to repaint its overlay.
 

Public Member Functions

 OpenSWMMVisMapToolSelectProfile (MapCanvas *canvas, QObject *parent=nullptr)
 
 ~OpenSWMMVisMapToolSelectProfile () override
 
void activate () override
 Called by the canvas when this tool becomes the active tool.
 
void deactivate () override
 Called by the canvas when another tool replaces this one.
 
void mousePressEvent (QMouseEvent *event) override
 
void keyPressEvent (QKeyEvent *event) override
 
ProfileRouter::Path acceptedPath () const
 Path that the user accepted from the picker (or the only candidate, when the router emitted exactly one). Empty nodes/edges arrays mean "no acceptance yet".
 
void clearSelection ()
 Drop the accepted path, the on-map overlay, and any in-progress capture, then invalidate the canvas so the change is visible. Safe to call when the tool is not the active canvas tool — wired from the project window when the user switches away from profile mode and clicks on the map, so the leftover overlay doesn't follow them around.
 
- Public Member Functions inherited from OpenSWMMVisMapTool
 OpenSWMMVisMapTool (const QString &toolName, MapCanvas *canvas, QObject *parent=nullptr)
 
virtual ~OpenSWMMVisMapTool ()=default
 
QString toolName () const
 Returns the human-readable name of this tool.
 
virtual QCursor cursor () const
 Returns the mouse cursor to display while this tool is active.
 
bool isActive () const
 Returns true when this tool is the active tool on its canvas.
 
MapCanvascanvas () const
 Returns the MapCanvas this tool is attached to.
 
virtual void mouseMoveEvent (QMouseEvent *event)
 
virtual void mouseReleaseEvent (QMouseEvent *event)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event)
 
virtual void wheelEvent (QWheelEvent *event)
 
virtual void keyReleaseEvent (QKeyEvent *event)
 
virtual void paint (QPainter *painter, const MapExtent &canvasExtent, const SpatialReferenceSystem *canvasSRS)
 Called by the canvas in drawForeground() so the tool can draw transient overlay graphics (rubber-band, measure segments, etc.).
 
QGraphicsScene * scene () const
 Returns the scene this tool's canvas is using.
 
void toMapCoords (int px, int py, double &mapX, double &mapY) const
 Converts a widget pixel position to map coordinates.
 
void toPixelCoords (double mapX, double mapY, int &px, int &py) const
 Converts map coordinates to widget pixel position.
 

Additional Inherited Members

- Protected Attributes inherited from OpenSWMMVisMapTool
QString m_toolName
 
MapCanvasm_canvas = nullptr
 
- Properties inherited from OpenSWMMVisMapTool
QString toolName
 
QCursor cursor
 
bool active
 

Constructor & Destructor Documentation

◆ OpenSWMMVisMapToolSelectProfile()

OpenSWMMVisMapToolSelectProfile::OpenSWMMVisMapToolSelectProfile ( MapCanvas canvas,
QObject *  parent = nullptr 
)
explicit

◆ ~OpenSWMMVisMapToolSelectProfile()

OpenSWMMVisMapToolSelectProfile::~OpenSWMMVisMapToolSelectProfile ( )
override
Here is the call graph for this function:

Member Function Documentation

◆ acceptedPath()

ProfileRouter::Path OpenSWMMVisMapToolSelectProfile::acceptedPath ( ) const

Path that the user accepted from the picker (or the only candidate, when the router emitted exactly one). Empty nodes/edges arrays mean "no acceptance yet".

◆ activate()

void OpenSWMMVisMapToolSelectProfile::activate ( )
overridevirtual

Called by the canvas when this tool becomes the active tool.

Reimplemented from OpenSWMMVisMapTool.

Here is the call graph for this function:

◆ clearSelection()

void OpenSWMMVisMapToolSelectProfile::clearSelection ( )

Drop the accepted path, the on-map overlay, and any in-progress capture, then invalidate the canvas so the change is visible. Safe to call when the tool is not the active canvas tool — wired from the project window when the user switches away from profile mode and clicks on the map, so the leftover overlay doesn't follow them around.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ deactivate()

void OpenSWMMVisMapToolSelectProfile::deactivate ( )
overridevirtual

Called by the canvas when another tool replaces this one.

Reimplemented from OpenSWMMVisMapTool.

Here is the call graph for this function:

◆ keyPressEvent()

void OpenSWMMVisMapToolSelectProfile::keyPressEvent ( QKeyEvent *  event)
overridevirtual

Reimplemented from OpenSWMMVisMapTool.

Here is the call graph for this function:

◆ mousePressEvent()

void OpenSWMMVisMapToolSelectProfile::mousePressEvent ( QMouseEvent *  event)
overridevirtual

Reimplemented from OpenSWMMVisMapTool.

Here is the call graph for this function:

◆ profilePathSelected

void OpenSWMMVisMapToolSelectProfile::profilePathSelected ( const ProfileRouter::Path path)
signal

Fired immediately after the user accepts a path (or after a single-candidate route auto-confirms). The path's node and edge indices are engine indices on the active SWMMModelLayer.

◆ routingBusyChanged

void OpenSWMMVisMapToolSelectProfile::routingBusyChanged ( bool  busy)
signal

Fired when async routing starts (busy = true) and again when it completes (busy = false). Hosts can wire this to a status-bar busy spinner so the user sees that background work is in flight.

◆ statusMessageChanged

void OpenSWMMVisMapToolSelectProfile::statusMessageChanged ( const QString &  message)
signal

Fired when the tool's status string changes — host can pipe this into the main-window status bar.

Here is the caller graph for this function:

The documentation for this class was generated from the following files: