QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
Public Member Functions | Protected Member Functions | List of all members
QgsPlotToolXAxisZoom Class Reference

Plot tool for zooming into and out of the plot's x-axis only. More...

#include <qgsplottoolxaxiszoom.h>

Inheritance diagram for QgsPlotToolXAxisZoom:
Inheritance graph
[legend]

Public Member Functions

 QgsPlotToolXAxisZoom (QgsElevationProfileCanvas *canvas)
 Constructor for QgsPlotToolXAxisZoom, with the associated canvas. More...
 
 ~QgsPlotToolXAxisZoom () override
 
- Public Member Functions inherited from QgsPlotToolZoom
 QgsPlotToolZoom (QgsPlotCanvas *canvas)
 Constructor for QgsPlotToolZoom, with the associated canvas. More...
 
 ~QgsPlotToolZoom () override
 
void deactivate () override
 Called when the tool is being deactivated. More...
 
void keyPressEvent (QKeyEvent *event) override
 Key press event for overriding. More...
 
void keyReleaseEvent (QKeyEvent *event) override
 Key release event for overriding. More...
 
void plotMoveEvent (QgsPlotMouseEvent *event) override
 Mouse move event for overriding. More...
 
void plotPressEvent (QgsPlotMouseEvent *event) override
 Mouse press event for overriding. More...
 
void plotReleaseEvent (QgsPlotMouseEvent *event) override
 Mouse release event for overriding. More...
 
- Public Member Functions inherited from QgsPlotTool
 ~QgsPlotTool () override
 
QAction * action ()
 Returns the action associated with the tool or nullptr if no action is associated. More...
 
virtual void activate ()
 Called when the tool is set as the currently active plot tool. More...
 
QgsPlotCanvascanvas () const
 Returns the tool's plot canvas. More...
 
virtual bool canvasToolTipEvent (QHelpEvent *event)
 Tooltip event for overriding. More...
 
virtual void deactivate ()
 Called when the tool is being deactivated. More...
 
virtual Qgis::PlotToolFlags flags () const
 Returns the flags for the plot tool. More...
 
virtual bool gestureEvent (QGestureEvent *event)
 Gesture event for overriding. More...
 
bool isActive () const
 Returns true if this tool is the current tool active on the plot canvas. More...
 
virtual void keyPressEvent (QKeyEvent *event)
 Key press event for overriding. More...
 
virtual void keyReleaseEvent (QKeyEvent *event)
 Key release event for overriding. More...
 
virtual void plotDoubleClickEvent (QgsPlotMouseEvent *event)
 Mouse double-click event for overriding. More...
 
virtual void plotMoveEvent (QgsPlotMouseEvent *event)
 Mouse move event for overriding. More...
 
virtual void plotPressEvent (QgsPlotMouseEvent *event)
 Mouse press event for overriding. More...
 
virtual void plotReleaseEvent (QgsPlotMouseEvent *event)
 Mouse release event for overriding. More...
 
virtual bool populateContextMenuWithEvent (QMenu *menu, QgsPlotMouseEvent *event)
 Allows the tool to populate and customize the given menu, prior to showing it in response to a right-mouse button click. More...
 
void setAction (QAction *action)
 Associates an action with this tool. More...
 
void setCursor (const QCursor &cursor)
 Sets a user defined cursor for use when the tool is active. More...
 
QString toolName () const
 Returns a user-visible, translated name for the tool. More...
 
virtual void wheelEvent (QWheelEvent *event)
 Mouse wheel event for overriding. More...
 

Protected Member Functions

QRectF constrainBounds (const QRectF &sceneBounds) const override
 Applies constraints to the overall bounds of the rubber band. More...
 
QPointF constrainMovePoint (QPointF scenePoint) const override
 Applies constraints to a move point of the zoom rubber band. More...
 
QPointF constrainStartPoint (QPointF scenePoint) const override
 Applies constraints to the start point of the zoom rubber band. More...
 
void zoomInClickOn (QPointF scenePoint) override
 Handles a zoom out click on the given point. More...
 
void zoomOutClickOn (QPointF scenePoint) override
 Handles a zoom out click on the given point. More...
 
virtual QRectF constrainBounds (const QRectF &sceneBounds) const
 Applies constraints to the overall bounds of the rubber band. More...
 
virtual QPointF constrainMovePoint (QPointF scenePoint) const
 Applies constraints to a move point of the zoom rubber band. More...
 
virtual QPointF constrainStartPoint (QPointF scenePoint) const
 Applies constraints to the start point of the zoom rubber band. More...
 
virtual void zoomInClickOn (QPointF scenePoint)
 Handles a zoom out click on the given point. More...
 
virtual void zoomOutClickOn (QPointF scenePoint)
 Handles a zoom out click on the given point. More...
 
- Protected Member Functions inherited from QgsPlotTool
 QgsPlotTool (QgsPlotCanvas *canvas, const QString &name)
 Constructor takes a plot canvas as a parameter. More...
 
bool isClickAndDrag (QPoint startViewPoint, QPoint endViewPoint) const
 Returns true if a mouse press/release operation which started at startViewPoint and ended at endViewPoint should be considered a "click and drag". More...
 
QgsPointXY toCanvasCoordinates (const QgsPoint &point) const
 Converts a point in map coordinates to the associated canvas point. More...
 
QgsPoint toMapCoordinates (const QgsPointXY &point) const
 Converts a point on the canvas to the associated map coordinate. More...
 

Additional Inherited Members

- Signals inherited from QgsPlotTool
void activated ()
 Emitted when the tool is activated. More...
 
void deactivated ()
 Emitted when the tool is deactivated. More...
 
- Static Protected Member Functions inherited from QgsPlotTool
static QPointF constrainPointToRect (QPointF point, const QRectF &rect)
 Constrains a point to force it to fall within the specified rectangle. More...
 
- Protected Attributes inherited from QgsPlotToolZoom
bool mMarqueeZoom = false
 Will be true will marquee zoom operation is in progress. More...
 
- Protected Attributes inherited from QgsPlotTool
QPointer< QAction > mAction
 Optional action associated with tool. More...
 
QgsPlotCanvasmCanvas = nullptr
 The pointer to the canvas. More...
 
QCursor mCursor = Qt::ArrowCursor
 Cursor used by tool. More...
 
QString mToolName
 Translated name of the map tool. More...
 

Detailed Description

Plot tool for zooming into and out of the plot's x-axis only.

Since
QGIS 3.26

Definition at line 38 of file qgsplottoolxaxiszoom.h.

Constructor & Destructor Documentation

◆ QgsPlotToolXAxisZoom()

QgsPlotToolXAxisZoom::QgsPlotToolXAxisZoom ( QgsElevationProfileCanvas canvas)

Constructor for QgsPlotToolXAxisZoom, with the associated canvas.

Definition at line 26 of file qgsplottoolxaxiszoom.cpp.

◆ ~QgsPlotToolXAxisZoom()

QgsPlotToolXAxisZoom::~QgsPlotToolXAxisZoom ( )
overridedefault

Member Function Documentation

◆ constrainBounds()

QRectF QgsPlotToolXAxisZoom::constrainBounds ( const QRectF &  sceneBounds) const
overrideprotectedvirtual

Applies constraints to the overall bounds of the rubber band.

Note
Not available in Python bindings

Reimplemented from QgsPlotToolZoom.

Definition at line 49 of file qgsplottoolxaxiszoom.cpp.

◆ constrainMovePoint()

QPointF QgsPlotToolXAxisZoom::constrainMovePoint ( QPointF  scenePoint) const
overrideprotectedvirtual

Applies constraints to a move point of the zoom rubber band.

Note
Not available in Python bindings

Reimplemented from QgsPlotToolZoom.

Definition at line 42 of file qgsplottoolxaxiszoom.cpp.

◆ constrainStartPoint()

QPointF QgsPlotToolXAxisZoom::constrainStartPoint ( QPointF  scenePoint) const
overrideprotectedvirtual

Applies constraints to the start point of the zoom rubber band.

Note
Not available in Python bindings

Reimplemented from QgsPlotToolZoom.

Definition at line 35 of file qgsplottoolxaxiszoom.cpp.

◆ zoomInClickOn()

void QgsPlotToolXAxisZoom::zoomInClickOn ( QPointF  scenePoint)
overrideprotectedvirtual

Handles a zoom out click on the given point.

Note
Not available in Python bindings

Reimplemented from QgsPlotToolZoom.

Definition at line 64 of file qgsplottoolxaxiszoom.cpp.

◆ zoomOutClickOn()

void QgsPlotToolXAxisZoom::zoomOutClickOn ( QPointF  scenePoint)
overrideprotectedvirtual

Handles a zoom out click on the given point.

Note
Not available in Python bindings

Reimplemented from QgsPlotToolZoom.

Definition at line 56 of file qgsplottoolxaxiszoom.cpp.


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