26#include "moc_qgsplottool.cpp"
38 return mCanvas->toMapCoordinates( point );
43 return mCanvas->toCanvasCoordinates( point );
48 const int diffX = endViewPoint.x() - startViewPoint.x();
49 const int diffY = endViewPoint.y() - startViewPoint.y();
50 return std::abs( diffX ) >= 2 || std::abs( diffY ) >= 2;
55 if ( point.x() < rect.left() )
56 point.setX( rect.left() );
57 else if ( point.x() > rect.right() )
58 point.setX( rect.right() );
60 if ( point.y() < rect.top() )
61 point.setY( rect.top() );
62 else if ( point.y() > rect.bottom() )
63 point.setY( rect.bottom() );
QFlags< PlotToolFlag > PlotToolFlags
Plot canvas is a class for displaying interactive 2d charts and plots.
void willBeDeleted()
Emitted in the destructor when the canvas is about to be deleted, but is still in a perfectly valid s...
A mouse event which is the result of a user interaction with a QgsPlotCanvas.
Point geometry type, with support for z-dimension and m-values.