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

#include <maptoolplotpick.h>

Inheritance diagram for OpenSWMMVisMapToolPlotPick:
Collaboration diagram for OpenSWMMVisMapToolPlotPick:

Signals

void objectPicked (const SWMMObjectRef &ref, const openswmmvis::plot::ResultDescriptor &descriptor)
 A map object was hit and the user picked an attribute from the submenu. Carries PlotAttribute::Unknown for the "All attributes" sentinel — handler should fan out across all valid attributes for the ref's kind.
 
void plotSystemRequested (openswmmvis::plot::PlotAttribute attribute)
 A background click (no object under cursor) with a system attribute selected from the submenu.
 
void cancelled ()
 User pressed Escape or otherwise cancelled the pick tool. The owner should pop the tool off the canvas and uncheck the toolbar action.
 
- 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

 OpenSWMMVisMapToolPlotPick (MapCanvas *canvas, QObject *parent=nullptr)
 
 ~OpenSWMMVisMapToolPlotPick () override=default
 
QCursor cursor () const override
 Returns the mouse cursor to display while this tool is active.
 
void setSpeciesNames (QStringList names)
 Y2b-2: the active run's species names — shown in the attribute submenu beneath the fixed set. Snapshotted by the owner at tool creation (the tool lives for one pick session).
 
void mousePressEvent (QMouseEvent *event) override
 
void keyPressEvent (QKeyEvent *event) override
 
- 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.
 
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 activate ()
 Called by the canvas when this tool becomes the active tool.
 
virtual void deactivate ()
 Called by the canvas when another tool replaces this one.
 
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

◆ OpenSWMMVisMapToolPlotPick()

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

◆ ~OpenSWMMVisMapToolPlotPick()

OpenSWMMVisMapToolPlotPick::~OpenSWMMVisMapToolPlotPick ( )
overridedefault

Member Function Documentation

◆ cancelled

void OpenSWMMVisMapToolPlotPick::cancelled ( )
signal

User pressed Escape or otherwise cancelled the pick tool. The owner should pop the tool off the canvas and uncheck the toolbar action.

Here is the caller graph for this function:

◆ cursor()

QCursor OpenSWMMVisMapToolPlotPick::cursor ( ) const
overridevirtual

Returns the mouse cursor to display while this tool is active.

Reimplemented from OpenSWMMVisMapTool.

◆ keyPressEvent()

void OpenSWMMVisMapToolPlotPick::keyPressEvent ( QKeyEvent *  event)
overridevirtual

Reimplemented from OpenSWMMVisMapTool.

Here is the call graph for this function:

◆ mousePressEvent()

void OpenSWMMVisMapToolPlotPick::mousePressEvent ( QMouseEvent *  event)
overridevirtual

Reimplemented from OpenSWMMVisMapTool.

Here is the call graph for this function:

◆ objectPicked

void OpenSWMMVisMapToolPlotPick::objectPicked ( const SWMMObjectRef ref,
const openswmmvis::plot::ResultDescriptor descriptor 
)
signal

A map object was hit and the user picked an attribute from the submenu. Carries PlotAttribute::Unknown for the "All attributes" sentinel — handler should fan out across all valid attributes for the ref's kind.

Here is the caller graph for this function:

◆ plotSystemRequested

void OpenSWMMVisMapToolPlotPick::plotSystemRequested ( openswmmvis::plot::PlotAttribute  attribute)
signal

A background click (no object under cursor) with a system attribute selected from the submenu.

Here is the caller graph for this function:

◆ setSpeciesNames()

void OpenSWMMVisMapToolPlotPick::setSpeciesNames ( QStringList  names)
inline

Y2b-2: the active run's species names — shown in the attribute submenu beneath the fixed set. Snapshotted by the owner at tool creation (the tool lives for one pick session).


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