17 #ifndef QGSCOMPOSERMOUSEHANDLES_H
18 #define QGSCOMPOSERMOUSEHANDLES_H
20 #include <QGraphicsRectItem>
101 void selectionChanged();
104 void selectedItemSizeChanged();
107 void selectedItemRotationChanged();
124 double mBeginHandleWidth;
125 double mBeginHandleHeight;
143 QRectF selectionBounds()
const;
146 bool selectionRotation(
double & rotation )
const;
149 void updateHandles();
151 void drawHandles(
QPainter* painter,
double rectHandlerSize );
153 void drawSelectedItemBounds(
QPainter* painter );
157 double rectHandlerBorderTolerance();
160 Qt::CursorShape cursorForPosition(
QPointF itemCoordPos );
166 void dragMouseMove(
QPointF currentPosition,
bool lockMovement,
bool preventSnap );
172 void resizeMouseMove(
QPointF currentPosition,
bool lockAspect,
bool fromCenter );
176 void deleteHAlignSnapItem();
179 void deleteVAlignSnapItem();
180 void deleteAlignItems();
185 QPointF alignItem(
double& alignX,
double& alignY,
double unalignedX,
double unalignedY );
192 void checkNearestItem(
double checkCoord,
const QMap< double, const QgsComposerItem* >& alignCoords,
double& smallestDiff,
double itemCoordOffset,
double& itemCoord,
double& alignCoord );
198 void setViewportCursor( Qt::CursorShape cursor );
201 void resetStatusBar();
204 #endif // QGSCOMPOSERMOUSEHANDLES_H
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
MouseAction
Describes the action (move or resize in different directon) to be done during mouse move...
A item that forms part of a map composition.
bool isDragging()
Returns true is user is currently dragging the handles.
bool isResizing()
Returns true is user is currently resizing with the handles.
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event)
Graphics scene for map printing.
void setComposition(QgsComposition *c)
QgsComposition * composition()
Handles drawing of selection outlines and mouse handles.
virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event)