17#ifndef QGSLAYOUTMOUSEHANDLES_H
18#define QGSLAYOUTMOUSEHANDLES_H
47class GUI_EXPORT QgsLayoutMouseHandles :
public QgsGraphicsViewMouseHandles
57 void setLayout(
QgsLayout *layout ) { mLayout = layout; }
65 void paint( QPainter *painter,
const QStyleOptionGraphicsItem *option, QWidget *widget =
nullptr )
override;
68 void setViewportCursor( Qt::CursorShape cursor )
override;
69 QList<QGraphicsItem *> sceneItemsAtPoint( QPointF scenePoint )
override;
70 QList<QGraphicsItem *> selectedSceneItems(
bool includeLockedItems =
true )
const override;
71 bool itemIsLocked( QGraphicsItem *item )
override;
72 bool itemIsGroupMember( QGraphicsItem *item )
override;
73 QRectF itemRect( QGraphicsItem *item )
const override;
74 void expandItemList(
const QList<QGraphicsItem *> &items, QList<QGraphicsItem *> &collected )
const override;
75 void expandItemList(
const QList<QgsLayoutItem *> &items, QList<QGraphicsItem *> &collected )
const;
76 void moveItem( QGraphicsItem *item,
double deltaX,
double deltaY )
override;
77 void setItemRect( QGraphicsItem *item, QRectF rect )
override;
78 void showStatusMessage(
const QString &message )
override;
79 void hideAlignItems()
override;
80 QPointF snapPoint( QPointF originalPoint, SnapGuideMode mode,
bool snapHorizontal =
true,
bool snapVertical =
true )
override;
81 void createItemCommand( QGraphicsItem *item )
override;
82 void endItemCommand( QGraphicsItem *item )
override;
83 void startMacroCommand(
const QString &text )
override;
84 void endMacroCommand()
override;
87 void mouseDoubleClickEvent( QGraphicsSceneMouseEvent *event )
override;
92 void selectionChanged();
96 QPointer<QgsLayoutView> mView;
99 QGraphicsLineItem *mHorizontalSnapLine =
nullptr;
100 QGraphicsLineItem *mVerticalSnapLine =
nullptr;
102 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.