26#include "moc_qgsplottool.cpp"
40 return mCanvas->toMapCoordinates( point );
45 return mCanvas->toCanvasCoordinates( point );
50 const int diffX = endViewPoint.x() - startViewPoint.x();
51 const int diffY = endViewPoint.y() - startViewPoint.y();
52 return std::abs( diffX ) >= 2 || std::abs( diffY ) >= 2;
57 if ( point.x() < rect.left() )
58 point.setX( rect.left() );
59 else if ( point.x() > rect.right() )
60 point.setX( rect.right() );
62 if ( point.y() < rect.top() )
63 point.setY( rect.top() );
64 else if ( point.y() > rect.bottom() )
65 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.