|
| | OpenSWMMVisMapToolZoom (MapCanvas *canvas, QObject *parent=nullptr) |
| |
| QCursor | cursor () const override |
| | Returns the mouse cursor to display while this tool is active.
|
| |
| double | zoomFactor () const |
| | Returns the wheel-scroll zoom factor (default 2.0).
|
| |
| void | setZoomFactor (double factor) |
| |
| bool | zoomInMode () const |
| | Returns true if the tool always zooms in on left-click (default true).
|
| |
| void | setZoomInMode (bool zoomIn) |
| |
| 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 | mouseMoveEvent (QMouseEvent *event) override |
| |
| void | mouseReleaseEvent (QMouseEvent *event) override |
| |
| void | wheelEvent (QWheelEvent *event) override |
| |
| void | paint (QPainter *painter, const MapExtent &canvasExtent, const SpatialReferenceSystem *canvasSRS) override |
| | Called by the canvas in drawForeground() so the tool can draw transient overlay graphics (rubber-band, measure segments, etc.).
|
| |
| | 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.
|
| |
| MapCanvas * | canvas () const |
| | Returns the MapCanvas this tool is attached to.
|
| |
| virtual void | mouseDoubleClickEvent (QMouseEvent *event) |
| |
| virtual void | keyPressEvent (QKeyEvent *event) |
| |
| virtual void | keyReleaseEvent (QKeyEvent *event) |
| |
| 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.
|
| |
Tool that zooms the map canvas by rubber-band rectangle or mouse wheel.
Left-click-drag draws a rubber-band rectangle; releasing zooms in to fit that rectangle. Right-click-drag zooms out. The scroll wheel zooms about the cursor position by a configurable factor (default ×2). Each zoom operation pushes an undo command so the user can reverse it.