18#ifndef QGSPLOTCANVAS_H
19#define QGSPLOTCANVAS_H
25#include <QGraphicsView>
57 if ( qobject_cast<QgsElevationProfileCanvas *>( sipCpp ) !=
nullptr )
58 sipType = sipType_QgsElevationProfileCanvas;
59 else if ( qobject_cast<QgsPlotCanvas *>( sipCpp ) !=
nullptr )
60 sipType = sipType_QgsPlotCanvas;
128 virtual void panContentsBy(
double dx,
double dy );
135 virtual void centerPlotOn(
double x,
double y );
142 virtual void scalePlot(
double factor );
149 virtual void zoomToRect(
const QRectF &rect );
158 virtual QgsPointXY snapToPlot( QPoint point );
165 virtual void refresh();
192 bool event( QEvent *e )
override;
193 void keyPressEvent( QKeyEvent *e )
override;
194 void keyReleaseEvent( QKeyEvent *e )
override;
195 void mouseDoubleClickEvent( QMouseEvent *e )
override;
196 void mouseMoveEvent( QMouseEvent *e )
override;
197 void mousePressEvent( QMouseEvent *e )
override;
198 void mouseReleaseEvent( QMouseEvent *e )
override;
199 void wheelEvent( QWheelEvent *e )
override;
200 void resizeEvent( QResizeEvent *e )
override;
201 bool viewportEvent( QEvent *event )
override;
208 virtual void wheelZoom( QWheelEvent *event );
212 QGraphicsScene *mScene =
nullptr;
215 QPointer<QgsPlotTool> mTool;
This class represents a coordinate reference system (CRS).
Plot canvas is a class for displaying interactive 2d charts and plots.
void plotAreaChanged()
Emitted whenever the visible area of the plot is changed.
void toolChanged(QgsPlotTool *newTool)
Emitted when the plot tool is changed.
void contextMenuAboutToShow(QMenu *menu, QgsPlotMouseEvent *event)
Emitted before the canvas context menu will be shown.
void willBeDeleted()
Emitted in the destructor when the canvas is about to be deleted, but is still in a perfectly valid s...
A QgsPlotMouseEvent is the result of a user interaction with the mouse on a QgsPlotCanvas.
A class to represent a 2D point.
Point geometry type, with support for z-dimension and m-values.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
const QgsCoordinateReferenceSystem & crs