Skip to content

Commit 24d1106

Browse files
nyalldawsonmhugent
authored andcommittedOct 2, 2013
[FEATURE] Allow multi item drag and resize in composer (fix #7918)
[FEATURE] Always draw selection handles on top of composition, add dashed border for selected items (fix #7793) Move responsibility for drawing selection mouse handles and mouse interaction with selection to new class
1 parent 7bc72d4 commit 24d1106

File tree

10 files changed

+1133
-702
lines changed

10 files changed

+1133
-702
lines changed
 

‎python/core/composer/qgscomposeritem.sip

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -332,10 +332,6 @@ class QgsComposerItem: QObject, QGraphicsRectItem
332332
@note this method was added in version 1.2*/
333333
bool positionLock() const;
334334

335-
/**Update mouse cursor at (item) position
336-
@note this method was added in version 1.2*/
337-
void updateCursor( const QPointF& itemPos );
338-
339335
double rotation() const;
340336

341337
/**Updates item, with the possibility to do custom update for subclasses*/
@@ -367,22 +363,6 @@ class QgsComposerItem: QObject, QGraphicsRectItem
367363

368364
virtual void hoverMoveEvent( QGraphicsSceneHoverEvent * event );
369365

370-
/**Finds out the appropriate cursor for the current mouse position in the widget (e.g. move in the middle, resize at border)*/
371-
Qt::CursorShape cursorForPosition( const QPointF& itemCoordPos );
372-
373-
/**Finds out which mouse move action to choose depending on the cursor position inside the widget*/
374-
QgsComposerItem::MouseMoveAction mouseMoveActionForPosition( const QPointF& itemCoordPos );
375-
376-
/**Changes the rectangle of an item depending on current mouse action (resize or move)
377-
@param currentPosition current position of mouse cursor
378-
@param mouseMoveStartPos cursor position at the start of the current mouse action
379-
@param originalItem Item position at the start of the mouse action
380-
@param dx x-Change of mouse cursor
381-
@param dy y-Change of mouse cursor
382-
@param changeItem Item to change size (can be the same as originalItem or a differen one)
383-
*/
384-
void changeItemRectangle( const QPointF& currentPosition, const QPointF& mouseMoveStartPos, const QGraphicsRectItem* originalItem, double dx, double dy, QGraphicsRectItem* changeItem );
385-
386366
/**Draw selection boxes around item*/
387367
virtual void drawSelectionBoxes( QPainter* p );
388368

‎python/core/composer/qgscomposition.sip

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -213,23 +213,6 @@ class QgsComposition : QGraphicsScene
213213
/**Snaps a scene coordinate point to grid*/
214214
QPointF snapPointToGrid( const QPointF& scenePoint ) const;
215215

216-
/**Snaps item position to align with other items (left / middle / right or top / middle / bottom
217-
@param item current item
218-
@param alignX x-coordinate of align or -1 if not aligned to x
219-
@param alignY y-coordinate of align or -1 if not aligned to y
220-
@param dx item shift in x direction
221-
@param dy item shift in y direction
222-
@return new upper left point after the align*/
223-
QPointF alignItem( const QgsComposerItem* item, double& alignX, double& alignY, double dx = 0, double dy = 0 );
224-
225-
/**Snaps position to align with the boundaries of other items
226-
@param pos position to snap
227-
@param excludeItem item to exclude
228-
@param alignX snapped x coordinate or -1 if not snapped
229-
@param alignY snapped y coordinate or -1 if not snapped
230-
@return snapped position or original position if no snap*/
231-
QPointF alignPos( const QPointF& pos, const QgsComposerItem* excludeItem, double& alignX, double& alignY );
232-
233216
/**Add a custom snap line (can be horizontal or vertical)*/
234217
QGraphicsLineItem* addSnapLine();
235218
/**Remove custom snap line (and delete the object)*/

‎src/core/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ SET(QGIS_CORE_SRCS
133133
composer/qgscomposermultiframecommand.cpp
134134
composer/qgscomposerarrow.cpp
135135
composer/qgscomposerframe.cpp
136+
composer/qgscomposermousehandles.cpp
136137
composer/qgscomposeritem.cpp
137138
composer/qgscomposeritemcommand.cpp
138139
composer/qgscomposeritemgroup.cpp
@@ -324,6 +325,7 @@ SET(QGIS_CORE_MOC_HDRS
324325
composer/qgscomposerscalebar.h
325326
composer/qgscomposeritem.h
326327
composer/qgscomposeritemgroup.h
328+
composer/qgscomposermousehandles.h
327329
composer/qgscomposerlabel.h
328330
composer/qgscomposershape.h
329331
composer/qgscomposerattributetable.h

0 commit comments

Comments
 (0)