|
QGIS API Documentation 3.99.0-Master (26c88405ac0)
|
A mouse event which is the result of a user interaction with a QgsModelGraphicsView. More...
#include <qgsmodelviewmouseevent.h>

Public Member Functions | |
| QgsModelViewMouseEvent (QgsModelGraphicsView *view, QMouseEvent *event, bool snaps) | |
| Constructor for QgsModelViewMouseEvent. | |
| bool | isSnapped () const |
Returns true if point was snapped, e.g. | |
| QPointF | modelPoint () const |
| Returns the event point location in model coordinates. | |
| QPointF | snappedPoint () const |
| Returns the snapped event point location in model coordinates. | |
| void | snapPoint () |
| Manually triggers a snap for the mouse event position using the model's snapper. | |
A mouse event which is the result of a user interaction with a QgsModelGraphicsView.
It is sent whenever the user moves, clicks, releases or double clicks the mouse. In addition to the coordinates in pixel space it also knows the coordinates the model space.
Definition at line 36 of file qgsmodelviewmouseevent.h.
| QgsModelViewMouseEvent::QgsModelViewMouseEvent | ( | QgsModelGraphicsView * | view, |
| QMouseEvent * | event, | ||
| bool | snaps ) |
Constructor for QgsModelViewMouseEvent.
Should only be required to be called from the QgsModelGraphicsView.
| view | The view in which the event occurred. |
| event | The original mouse event |
| snaps | set to true if the event should be snapped |
Definition at line 21 of file qgsmodelviewmouseevent.cpp.
|
inline |
Returns true if point was snapped, e.g.
to grid.
Definition at line 69 of file qgsmodelviewmouseevent.h.
| QPointF QgsModelViewMouseEvent::modelPoint | ( | ) | const |
Returns the event point location in model coordinates.
Definition at line 45 of file qgsmodelviewmouseevent.cpp.
|
inline |
Returns the snapped event point location in model coordinates.
The snapped point will consider all possible snapping methods, such as snapping to grid.
Definition at line 63 of file qgsmodelviewmouseevent.h.
| void QgsModelViewMouseEvent::snapPoint | ( | ) |
Manually triggers a snap for the mouse event position using the model's snapper.
Definition at line 37 of file qgsmodelviewmouseevent.cpp.