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 );
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.
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.
QgsLayoutViewMouseEvent(QgsLayoutView *view, QMouseEvent *event, bool snap=false)
Constructor for QgsLayoutViewMouseEvent.
QPointF layoutPoint() const
Returns the event point location in layout coordinates.
A graphical widget to display and interact with QgsLayouts.
QgsLayout * currentLayout
QgsLayoutSnapper & snapper()
Returns a reference to the layout's snapper, which stores handles layout snap grids and lines and sna...