22 : QMouseEvent( event->type(), event->pos(), event->button(), event->buttons(), event->modifiers() )
25 mLayoutPoint = mView->mapToScene( x(), y() );
32 mSnappedPoint = mLayoutPoint;
40 mSnappedPoint = mView->
currentLayout()->
snapper().
snapPoint( mLayoutPoint, mView->transform().m11(), mSnapped, horizontalSnapLine, verticalSnapLine, &excludeItems );
A graphical widget to display and interact with QgsLayouts.
QgsLayoutSnapper & snapper()
Returns a reference to the layout's snapper, which stores handles layout snap grids and lines and sna...
QgsLayoutViewMouseEvent(QgsLayoutView *view, QMouseEvent *event, bool snap=false)
Constructor for QgsLayoutViewMouseEvent.
void snapPoint(QGraphicsLineItem *horizontalSnapLine=nullptr, QGraphicsLineItem *verticalSnapLine=nullptr, const QList< QgsLayoutItem *> &ignoreItems=QList< QgsLayoutItem * >())
Manually triggers a snap for the mouse event position using the layout's snapper. ...
QPointF snapPoint(QPointF point, double scaleFactor, bool &snapped, QGraphicsLineItem *horizontalSnapLine=nullptr, QGraphicsLineItem *verticalSnapLine=nullptr, const QList< QgsLayoutItem * > *ignoreItems=nullptr) const
Snaps a layout coordinate point.
QPointF layoutPoint() const
Returns the event point location in layout coordinates.