17#ifndef QGSLAYOUTMOUSEHANDLES_H
18#define QGSLAYOUTMOUSEHANDLES_H
48class GUI_EXPORT QgsLayoutMouseHandles:
public QgsGraphicsViewMouseHandles
59 void setLayout(
QgsLayout *layout ) { mLayout = layout; }
67 void paint( QPainter *painter,
const QStyleOptionGraphicsItem *option, QWidget *widget =
nullptr )
override;
71 void setViewportCursor( Qt::CursorShape cursor )
override;
72 QList<QGraphicsItem *> sceneItemsAtPoint( QPointF scenePoint )
override;
73 QList<QGraphicsItem *> selectedSceneItems(
bool includeLockedItems =
true )
const override;
74 bool itemIsLocked( QGraphicsItem *item )
override;
75 bool itemIsGroupMember( QGraphicsItem *item )
override;
76 QRectF itemRect( QGraphicsItem *item )
const override;
77 void expandItemList(
const QList< QGraphicsItem * > &items, QList< QGraphicsItem * > &collected )
const override;
78 void moveItem( QGraphicsItem *item,
double deltaX,
double deltaY )
override;
79 void setItemRect( QGraphicsItem *item, QRectF rect )
override;
80 void showStatusMessage(
const QString &message )
override;
81 void hideAlignItems()
override;
82 QPointF snapPoint( QPointF originalPoint, SnapGuideMode mode,
bool snapHorizontal =
true,
bool snapVertical =
true )
override;
83 void createItemCommand( QGraphicsItem *item )
override;
84 void endItemCommand( QGraphicsItem *item )
override;
85 void startMacroCommand(
const QString &text )
override;
86 void endMacroCommand()
override;
90 void selectionChanged();
95 QPointer< QgsLayoutView > mView;
98 QGraphicsLineItem *mHorizontalSnapLine =
nullptr;
99 QGraphicsLineItem *mVerticalSnapLine =
nullptr;
101 std::unique_ptr< QgsAbstractLayoutUndoCommand > mItemCommand;
Base class for commands to undo/redo layout and layout object changes.
Base class for graphical items within a QgsLayout.
A graphical widget to display and interact with QgsLayouts.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.