17 #ifndef QGSCOMPOSERMOUSEHANDLES_H
18 #define QGSCOMPOSERMOUSEHANDLES_H
20 #include <QGraphicsRectItem>
100 void selectionChanged();
103 void selectedItemSizeChanged();
106 void selectedItemRotationChanged();
123 double mBeginHandleWidth;
124 double mBeginHandleHeight;
142 QRectF selectionBounds()
const;
145 bool selectionRotation(
double & rotation )
const;
148 void updateHandles();
150 void drawHandles(
QPainter* painter,
double rectHandlerSize );
152 void drawSelectedItemBounds(
QPainter* painter );
156 double rectHandlerBorderTolerance();
159 Qt::CursorShape cursorForPosition(
const QPointF& itemCoordPos );
165 void dragMouseMove(
const QPointF& currentPosition,
bool lockMovement,
bool preventSnap );
171 void resizeMouseMove(
const QPointF& currentPosition,
bool lockAspect,
bool fromCenter );
175 void deleteHAlignSnapItem();
178 void deleteVAlignSnapItem();
179 void deleteAlignItems();
184 QPointF alignItem(
double& alignX,
double& alignY,
double unalignedX,
double unalignedY );
186 QPointF alignPos(
const QPointF& pos,
double& alignX,
double& alignY );
191 void checkNearestItem(
double checkCoord,
const QMap< double, const QgsComposerItem* >& alignCoords,
double& smallestDiff,
double itemCoordOffset,
double& itemCoord,
double& alignCoord );
197 void setViewportCursor( Qt::CursorShape cursor );
200 void resetStatusBar();
203 #endif // QGSCOMPOSERMOUSEHANDLES_H
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
A item that forms part of a map composition.
bool isDragging()
Returns true is user is currently dragging the handles.
MouseAction
Describes the action (move or resize in different directon) to be done during mouse move...
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)