|
Krita Source Code Documentation
|
#include <KoShapeRubberSelectStrategy.h>
Inheritance diagram for KoShapeRubberSelectStrategy:Public Member Functions | |
| KUndo2Command * | createCommand () override |
| void | handleMouseMove (const QPointF &mouseLocation, Qt::KeyboardModifiers modifiers) override |
| KoShapeRubberSelectStrategy (KoToolBase *tool, const QPointF &clicked, bool useSnapToGrid=false) | |
| void | paint (QPainter &painter, const KoViewConverter &converter) override |
Public Member Functions inherited from KoInteractionStrategy | |
| virtual void | cancelInteraction () |
| virtual void | finishInteraction (Qt::KeyboardModifiers modifiers)=0 |
| KoInteractionStrategy (KoToolBase *parent) | |
| constructor | |
| KoToolBase * | tool () const |
| virtual | ~KoInteractionStrategy () |
| Destructor. | |
Protected Types | |
| enum | SelectionMode { CrossingSelection , CoveringSelection } |
Protected Member Functions | |
| virtual SelectionMode | currentMode () const |
| KoShapeRubberSelectStrategy (KoShapeRubberSelectStrategyPrivate &) | |
| constructor | |
| QRectF | selectedRectangle () const |
Protected Member Functions inherited from KoInteractionStrategy | |
| uint | decorationThickness () const |
| uint | grabSensitivity () const |
| Convenience function to get the global grab sensitivity. | |
| uint | handleRadius () const |
| Convenience function to get the global handle radius. | |
| KoInteractionStrategy (KoInteractionStrategyPrivate &) | |
| constructor | |
Additional Inherited Members | |
Protected Attributes inherited from KoInteractionStrategy | |
| KoInteractionStrategyPrivate * | d_ptr |
This is a base class for interactions based on dragging a rectangular area on the canvas, such as selection, zooming or shape creation.
When the user selects stuff in left-to-right way, selection is in "covering" (or "containing") mode, when in "left-to-right" in "crossing" mode
Definition at line 28 of file KoShapeRubberSelectStrategy.h.
|
protected |
| Enumerator | |
|---|---|
| CrossingSelection | |
| CoveringSelection | |
Definition at line 52 of file KoShapeRubberSelectStrategy.h.
| KoShapeRubberSelectStrategy::KoShapeRubberSelectStrategy | ( | KoToolBase * | tool, |
| const QPointF & | clicked, | ||
| bool | useSnapToGrid = false ) |
Constructor that initiates the rubber select. A rubber select is basically rectangle area that the user drags out from clicked to a point later provided in the handleMouseMove() continuously showing a semi-transparent 'rubber-mat' over the objects it is about to select.
| tool | the parent tool which controls this strategy |
| clicked | the initial point that the user depressed (in pt). |
| useSnapToGrid | use the snap-to-grid settings while doing the rubberstamp. |
Definition at line 19 of file KoShapeRubberSelectStrategy.cpp.
References KoSnapGuide::GridSnapping.
|
protected |
constructor
|
overridevirtual |
For interactions that are undo-able this method should be implemented to return such a command. Implementations should return 0 otherwise.
Implements KoInteractionStrategy.
Definition at line 103 of file KoShapeRubberSelectStrategy.cpp.
|
protectedvirtual |
Reimplemented in KoZoomStrategy.
Definition at line 97 of file KoShapeRubberSelectStrategy.cpp.
References CoveringSelection, and CrossingSelection.
|
overridevirtual |
Extending classes should implement this method to update the selectedShapes based on the new mouse position.
| mouseLocation | the new location in pt |
| modifiers | OR-ed set of keys pressed. |
Implements KoInteractionStrategy.
Definition at line 56 of file KoShapeRubberSelectStrategy.cpp.
|
overridevirtual |
Reimplement this if the action needs to draw a "blob" on the canvas; that is, a transient decoration like a rubber band.
Reimplemented from KoInteractionStrategy.
Reimplemented in SelectionInteractionStrategy.
Definition at line 29 of file KoShapeRubberSelectStrategy.cpp.
References CrossingSelection, currentMode(), KoInteractionStrategy::decorationThickness(), and KoViewConverter::documentToView().
|
protected |
Definition at line 108 of file KoShapeRubberSelectStrategy.cpp.