QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsPlotToolTemporaryKeyPan Class Reference

Plot tool for temporarily panning a plot while a key is depressed. More...

#include <qgsplottransienttools.h>

Inheritance diagram for QgsPlotToolTemporaryKeyPan:
Inheritance graph
[legend]

Public Member Functions

 QgsPlotToolTemporaryKeyPan (QgsPlotCanvas *canvas)
 Constructor for QgsPlotToolTemporaryKeyPan.
 
void activate () override
 Called when the tool is set as the currently active plot tool.
 
void keyReleaseEvent (QKeyEvent *event) override
 Key release event for overriding.
 
void plotMoveEvent (QgsPlotMouseEvent *event) override
 Mouse move event for overriding.
 
- Public Member Functions inherited from QgsPlotTool
 ~QgsPlotTool () override
 
QAction * action ()
 Returns the action associated with the tool or nullptr if no action is associated.
 
QgsPlotCanvascanvas () const
 Returns the tool's plot canvas.
 
virtual bool canvasToolTipEvent (QHelpEvent *event)
 Tooltip event for overriding.
 
virtual void deactivate ()
 Called when the tool is being deactivated.
 
virtual Qgis::PlotToolFlags flags () const
 Returns the flags for the plot tool.
 
virtual bool gestureEvent (QGestureEvent *event)
 Gesture event for overriding.
 
bool isActive () const
 Returns true if this tool is the current tool active on the plot canvas.
 
virtual void keyPressEvent (QKeyEvent *event)
 Key press event for overriding.
 
virtual void plotDoubleClickEvent (QgsPlotMouseEvent *event)
 Mouse double-click event for overriding.
 
virtual void plotPressEvent (QgsPlotMouseEvent *event)
 Mouse press event for overriding.
 
virtual void plotReleaseEvent (QgsPlotMouseEvent *event)
 Mouse release event for overriding.
 
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.
 
void setAction (QAction *action)
 Associates an action with this tool.
 
void setCursor (const QCursor &cursor)
 Sets a user defined cursor for use when the tool is active.
 
QString toolName () const
 Returns a user-visible, translated name for the tool.
 
virtual void wheelEvent (QWheelEvent *event)
 Mouse wheel event for overriding.
 

Additional Inherited Members

- Signals inherited from QgsPlotTool
void activated ()
 Emitted when the tool is activated.
 
void deactivated ()
 Emitted when the tool is deactivated.
 
- Protected Member Functions inherited from QgsPlotTool
 QgsPlotTool (QgsPlotCanvas *canvas, const QString &name)
 Constructor takes a plot canvas as a parameter.
 
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".
 
QgsPointXY toCanvasCoordinates (const QgsPoint &point) const
 Converts a point in map coordinates to the associated canvas point.
 
QgsPoint toMapCoordinates (const QgsPointXY &point) const
 Converts a point on the canvas to the associated map coordinate.
 
- 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.
 
- Protected Attributes inherited from QgsPlotTool
QPointer< QAction > mAction
 Optional action associated with tool.
 
QgsPlotCanvasmCanvas = nullptr
 The pointer to the canvas.
 
QCursor mCursor = Qt::ArrowCursor
 Cursor used by tool.
 
QString mToolName
 Translated name of the map tool.
 

Detailed Description

Plot tool for temporarily panning a plot while a key is depressed.

Since
QGIS 3.26

Definition at line 32 of file qgsplottransienttools.h.

Constructor & Destructor Documentation

◆ QgsPlotToolTemporaryKeyPan()

QgsPlotToolTemporaryKeyPan::QgsPlotToolTemporaryKeyPan ( QgsPlotCanvas canvas)

Constructor for QgsPlotToolTemporaryKeyPan.

Definition at line 31 of file qgsplottransienttools.cpp.

Member Function Documentation

◆ activate()

void QgsPlotToolTemporaryKeyPan::activate ( )
overridevirtual

Called when the tool is set as the currently active plot tool.

Reimplemented from QgsPlotTool.

Definition at line 52 of file qgsplottransienttools.cpp.

◆ keyReleaseEvent()

void QgsPlotToolTemporaryKeyPan::keyReleaseEvent ( QKeyEvent *  event)
overridevirtual

Key release event for overriding.

The default implementation does nothing. When subclasses implement this method and have acted on the event, they must explicitly call event->accept() to prevent the event from being passed on to other widgets.

Reimplemented from QgsPlotTool.

Definition at line 44 of file qgsplottransienttools.cpp.

◆ plotMoveEvent()

void QgsPlotToolTemporaryKeyPan::plotMoveEvent ( QgsPlotMouseEvent event)
overridevirtual

Mouse move event for overriding.

The default implementation does nothing. When subclasses implement this method and have acted on the event, they must explicitly call event->accept() to prevent the event from being passed on to other widgets.

Reimplemented from QgsPlotTool.

Definition at line 37 of file qgsplottransienttools.cpp.


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