|
| enum | MoveDirection { Up
, Down
, Left
, Right
} |
| |
| enum | MoveToolMode { MoveSelectedLayer
, MoveFirstLayer
, MoveGroup
} |
| |
| enum | { FLAG_USES_CUSTOM_PRESET =0x01
, FLAG_USES_CUSTOM_COMPOSITEOP =0x02
, FLAG_USES_CUSTOM_SIZE =0x04
} |
| |
| enum | AlternateAction {
ChangeSize = AlternateChangeSize
, ChangeSizeSnap = AlternateChangeSizeSnap
, SampleFgNode = AlternateSampleFgNode
, SampleBgNode = AlternateSampleBgNode
,
SampleFgImage = AlternateSampleFgImage
, SampleBgImage = AlternateSampleBgImage
, Secondary = AlternateSecondary
, Third = AlternateThird
,
Fourth = AlternateFourth
, Fifth = AlternateFifth
, NONE = 10000
} |
| |
| enum | NodePaintAbility {
VECTOR
, CLONE
, PAINT
, UNPAINTABLE
,
MYPAINTBRUSH_UNPAINTABLE
} |
| |
| enum | ToolAction {
Primary
, AlternateChangeSize
, AlternateChangeSizeSnap
, AlternateSampleFgNode
,
AlternateSampleBgNode
, AlternateSampleFgImage
, AlternateSampleBgImage
, AlternateSecondary
,
AlternateThird
, AlternateFourth
, AlternateFifth
, Alternate_NONE = 10000
} |
| |
|
| void | beginAlternateAction (KoPointerEvent *event, AlternateAction action) override |
| |
| void | beginPrimaryAction (KoPointerEvent *event) override |
| |
| void | continueAction (KoPointerEvent *event) |
| |
| void | continueAlternateAction (KoPointerEvent *event, AlternateAction action) override |
| |
| void | continuePrimaryAction (KoPointerEvent *event) override |
| |
| QWidget * | createOptionWidget () override |
| |
| void | endAction (KoPointerEvent *event) |
| |
| void | endAlternateAction (KoPointerEvent *event, AlternateAction action) override |
| |
| void | endPrimaryAction (KoPointerEvent *event) override |
| |
| | KisToolMove (KoCanvasBase *canvas) |
| |
| void | mouseMoveEvent (KoPointerEvent *event) override |
| |
| MoveToolMode | moveToolMode () const |
| |
| void | paint (QPainter &gc, const KoViewConverter &converter) override |
| |
| void | setShowCoordinates (bool value) |
| |
| void | startAction (KoPointerEvent *event, MoveToolMode mode) |
| |
| void | updateUIUnit (int newUnit) |
| |
| bool | wantsAutoScroll () const override |
| | wantsAutoScroll reimplemented from KoToolBase there's an issue where autoscrolling with this tool never makes the stroke end, so we return false here so that users don't get stuck with the tool. See bug 362659
|
| |
| | ~KisToolMove () override |
| |
| virtual void | activateAlternateAction (AlternateAction action) |
| |
| virtual void | activatePrimaryAction () |
| |
| virtual bool | alternateActionSupportsHiResEvents (AlternateAction action) const |
| |
| virtual void | beginAlternateDoubleClickAction (KoPointerEvent *event, AlternateAction action) |
| |
| virtual void | beginPrimaryDoubleClickAction (KoPointerEvent *event) |
| |
| virtual void | deactivateAlternateAction (AlternateAction action) |
| |
| virtual void | deactivatePrimaryAction () |
| |
| void | deleteSelection () override |
| |
| virtual int | flags () const |
| |
| bool | isActive () const |
| |
| | KisTool (KoCanvasBase *canvas, const QCursor &cursor) |
| |
| void | mouseDoubleClickEvent (KoPointerEvent *event) override |
| |
| void | mousePressEvent (KoPointerEvent *event) override |
| |
| void | mouseReleaseEvent (KoPointerEvent *event) override |
| |
| void | mouseTripleClickEvent (KoPointerEvent *event) override |
| |
| virtual void | newActivationWithExternalSource (KisPaintDeviceSP externalSource) |
| | newActivationWithExternalSource Makes sure that the tool is active and starts a new stroke, which will be able to access the pixels from the specified external source.
|
| |
| KisTool::NodePaintAbility | nodePaintAbility () |
| |
| virtual bool | primaryActionSupportsHiResEvents () const |
| |
| virtual bool | supportsPaintingAssistants () const |
| |
| | ~KisTool () override |
| |
| | Private (KisCanvas2 *c) |
| |
| QAction * | action (const QString &name) const |
| |
| KoCanvasBase * | canvas () const |
| | Returns the canvas the tool is working on.
|
| |
| virtual void | copy () const |
| |
| QCursor | cursor () const |
| | return the last emitted cursor
|
| |
| virtual void | customMoveEvent (KoPointerEvent *event) |
| |
| virtual void | customPressEvent (KoPointerEvent *event) |
| |
| virtual void | customReleaseEvent (KoPointerEvent *event) |
| |
| virtual void | cut () |
| |
| virtual QRectF | decorationsRect () const |
| |
| int | decorationThickness () const |
| | decorationThickness The minimum thickness for tool decoration lines, this is derived from the screen magnification, thus the HiDPI settings. Note: to use this effectively, also set the pen to isCosmetic(true);
|
| |
| virtual void | deselect () |
| | deselect the tool should clear the selection if it has one.
|
| |
| virtual void | dragLeaveEvent (QDragLeaveEvent *event) |
| |
| virtual void | dragMoveEvent (QDragMoveEvent *event, const QPointF &point) |
| |
| virtual void | dropEvent (QDropEvent *event, const QPointF &point) |
| |
| virtual void | explicitUserStrokeEndRequest () |
| | explicitUserStrokeEndRequest is called by the input manager when the user presses Enter key or any equivalent. This callback comes before requestStrokeEnd(), which comes from a different source.
|
| |
| KoToolFactoryBase * | factory () const |
| |
| virtual void | focusInEvent (QFocusEvent *event) |
| |
| virtual void | focusOutEvent (QFocusEvent *event) |
| |
| virtual bool | hasSelection () |
| |
| virtual void | inputMethodEvent (QInputMethodEvent *event) |
| |
| virtual QVariant | inputMethodQuery (Qt::InputMethodQuery query) const |
| |
| bool | isInTextMode () const |
| |
| bool | isOpacityPresetMode () const |
| |
| virtual void | keyPressEvent (QKeyEvent *event) |
| |
| virtual void | keyReleaseEvent (QKeyEvent *event) |
| |
| | KoToolBase (KoCanvasBase *canvas) |
| |
| bool | maskSyntheticEvents () const |
| |
| QList< QPointer< QWidget > > | optionWidgets () |
| |
| virtual bool | paste () |
| |
| virtual QMenu * | popupActionsMenu () |
| |
| virtual KisPopupWidgetInterface * | popupWidget () |
| |
| virtual bool | selectAll () |
| | selectAll select all data the tool can select.
|
| |
| virtual KoToolSelection * | selection () |
| |
| Q_INVOKABLE QString | toolId () const |
| |
| | ~KoToolBase () override |
| |
|
| static AlternateAction | actionToAlternateAction (ToolAction action) |
| |
| KoColor | currentBgColor |
| |
| float | currentExposure {1.0} |
| |
| KoColor | currentFgColor |
| |
| KisFilterConfigurationSP | currentGenerator |
| |
| KoAbstractGradientSP | currentGradient |
| |
| KoPatternSP | currentPattern |
| |
| QCursor | cursor |
| |
| bool | m_isActive {false} |
| |
| ToolMode | m_mode {HOVER_MODE} |
| |
| QWidget * | optionWidget {0} |
| |
| KisCanvas2 * | canvas |
| |
| int | displayedFrame |
| |
| int | intendedFrame |
| |
| enum | ToolMode : int {
HOVER_MODE
, PAINT_MODE
, SECONDARY_PAINT_MODE
, MIRROR_AXIS_SETUP_MODE
,
GESTURE_MODE
, PAN_MODE
, OTHER
, OTHER_1
} |
| |
| bool | blockUntilOperationsFinished () |
| |
| void | blockUntilOperationsFinishedForced () |
| |
| QPointF | convertDocumentToWidget (const QPointF &pt) |
| |
| QPoint | convertToImagePixelCoordFloored (KoPointerEvent *e) |
| |
| QPointF | convertToPixelCoord (const QPointF &pt) |
| |
| QPointF | convertToPixelCoord (KoPointerEvent *e) |
| |
| QPointF | convertToPixelCoordAndAlignOnWidget (const QPointF &pt) |
| |
| QPointF | convertToPixelCoordAndSnap (const QPointF &pt, const QPointF &offset=QPointF()) |
| |
| QPointF | convertToPixelCoordAndSnap (KoPointerEvent *e, const QPointF &offset=QPointF(), bool useModifiers=true) |
| |
| QRectF | convertToPt (const QRectF &rect) |
| |
| qreal | convertToPt (qreal value) |
| |
| KoColor | currentBgColor () |
| |
| KoColor | currentFgColor () |
| |
| KisFilterConfigurationSP | currentGenerator () |
| |
| KoAbstractGradientSP | currentGradient () |
| |
| KisImageWSP | currentImage () |
| |
| KisNodeSP | currentNode () const |
| |
| KisPaintOpPresetSP | currentPaintOpPreset () |
| |
| KoPatternSP | currentPattern () |
| |
| QCursor | cursor () const |
| |
| KisImageWSP | image () const |
| |
| virtual bool | listeningToModifiers () |
| |
| virtual void | listenToModifiers (bool listen) |
| |
| virtual ToolMode | mode () const |
| |
| bool | nodeEditable () |
| | Checks checks if the current node is editable.
|
| |
| bool | overrideCursorIfNotEditable () |
| | Override the cursor appropriately if current node is not editable.
|
| |
| void | paintToolOutline (QPainter *painter, const KisOptimizedBrushOutline &path) |
| |
| KisOptimizedBrushOutline | pixelToView (const KisOptimizedBrushOutline &path) const |
| |
| QPainterPath | pixelToView (const QPainterPath &pixelPath) const |
| | Convert a pixel path into a view path.
|
| |
| QPointF | pixelToView (const QPoint &pixelCoord) const |
| |
| QPointF | pixelToView (const QPointF &pixelCoord) const |
| | Convert a floating point pixel coordinate into a view coordinate.
|
| |
| QPolygonF | pixelToView (const QPolygonF &pixelPolygon) const |
| | Convert a pixel polygon into a view path.
|
| |
| QRectF | pixelToView (const QRectF &pixelRect) const |
| | Convert a pixel rectangle into a view rectangle.
|
| |
| KisNodeList | selectedNodes () const |
| |
| bool | selectionEditable () |
| | Checks checks if the selection is editable, only applies to local selection as global selection is always editable.
|
| |
| void | setCursor (const QCursor &cursor) |
| |
| virtual void | setMode (ToolMode mode) |
| |
| void | updateCanvasPixelRect (const QRectF &pixelRect) |
| | Update the canvas for the given rectangle in image pixel coordinates.
|
| |
| void | updateCanvasViewRect (const QRectF &viewRect) |
| | Update the canvas for the given rectangle in view coordinates.
|
| |
| QPointF | viewToPixel (const QPointF &viewCoord) const |
| |
| QPointF | widgetCenterInWidgetPixels () |
| |
| virtual QList< QPointer< QWidget > > | createOptionWidgets () |
| |
| int | grabSensitivity () const |
| | Convenience function to get the current grab sensitivity.
|
| |
| qreal | handleDocRadius () const |
| |
| QRectF | handleGrabRect (const QPointF &position) const |
| |
| QRectF | handlePaintRect (const QPointF &position) const |
| |
| int | handleRadius () const |
| | Convenience function to get the current handle radius.
|
| |
| bool | isActivated () const |
| |
| | KoToolBase (KoToolBasePrivate &dd) |
| |
| KoPointerEvent * | lastDeliveredPointerEvent () const |
| |
| void | setAbstractResource (KoAbstractCanvasResourceInterfaceSP abstractResource) |
| |
| void | setConverter (KoDerivedResourceConverterSP converter) |
| |
| void | setIsOpacityPresetMode (bool value) |
| |
| void | setMaskSyntheticEvents (bool value) |
| |
| void | setTextMode (bool value) |
| |
| QHash< int, KoAbstractCanvasResourceInterfaceSP > | toolAbstractResources () |
| |
| QHash< int, KoDerivedResourceConverterSP > | toolConverters () |
| |
| void | useCursor (const QCursor &cursor) |
| |
| KoToolBasePrivate * | d_ptr |
| |
| bool | isActive |
| |
Definition at line 33 of file kis_tool_move.h.
| void KisToolMove::activate |
( |
const QSet< KoShape * > & | shapes | ) |
|
|
overrideslot |
Definition at line 391 of file kis_tool_move.cc.
392{
394
403
412
415
421
425
426
428}
void addUniqueConnection(Sender sender, Signal signal, Receiver receiver, Method method)
void addConnection(Sender sender, Signal signal, Receiver receiver, Method method, Qt::ConnectionType type=Qt::AutoConnection)
References KoToolBase::action(), KisTool::activate(), KisSignalAutoConnectionsStore::addConnection(), KisSignalAutoConnectionsStore::addUniqueConnection(), Private::canvas, commitChanges(), connect(), m_actionConnections, m_canvasConnections, m_changesTracker, m_optionsWidget, m_showCoordinatesAction, moveBySpinX(), moveBySpinY(), KisTool::selectedNodes(), setShowCoordinates(), slotMoveDiscreteDown(), slotMoveDiscreteDownMore(), slotMoveDiscreteLeft(), slotMoveDiscreteLeftMore(), slotMoveDiscreteRight(), slotMoveDiscreteRightMore(), slotMoveDiscreteUp(), slotMoveDiscreteUpMore(), slotNodeChanged(), slotSelectionChanged(), and slotTrackerChangedConfig().
| void KisToolMove::resetCursorStyle |
( |
| ) |
|
|
overrideprotectedslot |
noop; whatever the cursor position, we always show move cursor, because we don't use 'layer under cursor' mode for moving selections
we cannot pick layer's pixel data while the stroke is running, because it may run in lodN mode; therefore, we delegate this work to the stroke itself
Definition at line 88 of file kis_tool_move.cc.
89{
91
92 bool canMove = true;
93
105
107 return;
108 }
109 } else {
113
116
117 const bool canUseSelectionMode =
120 !
selection->selectedExactRect().isEmpty();
121
122 if (canUseSelectionMode) {
124 } else {
130
132 canMove = false;
133 }
134 }
135 }
136
137 if (canMove) {
139 } else {
141 }
142}
KisNodeList selectNodesToProcess() const
bool isEditable(bool checkVisibility=true) const
References KisResourcesSnapshot::activeSelection(), KisImage::addJob(), Private::canvas, KisTool::currentNode(), currentOffset(), KisSharedPtr< T >::data(), KisTool::image(), KisTool::isActive, KisBaseNode::isEditable(), m_currentlyUsingSelection, m_currentMode, m_handlesRect, m_lastCursorPos, m_strokeId, MoveSelectedLayer, moveToolMode(), KisTool::resetCursorStyle(), KisTool::selectedNodes(), KoToolBase::selection(), KisNodeSelectionRecipe::selectNodesToProcess(), and KoToolBase::useCursor().
| void KisToolMove::slotStrokeStartedEmpty |
( |
| ) |
|
|
slot |
| bool KisToolMove::startStrokeImpl |
( |
MoveToolMode | mode, |
|
|
const QPoint * | pos ) |
|
private |
Definition at line 144 of file kis_tool_move.cc.
145{
148
152
155
156
157
158 const bool canUseSelectionMode =
161 !
selection->selectedExactRect().isEmpty();
162
163 if (pos) {
164
167 return false;
168 }
169
170
171
178
180 }
181 }
182
184
185
187
188
189 return false;
190 }
191
193
195
196 bool isMoveSelection = false;
197 if (canUseSelectionMode) {
199
205
207 SIGNAL(sigHandlesRectCalculated(const QRect&)),
210 SIGNAL(sigStrokeStartedEmpty()),
212
213 strategy = moveStrategy;
214 isMoveSelection = true;
215 nodes = {paintLayer};
216
217 } else {
219 pos ?
223 *pos) :
225
226
230 SIGNAL(sigHandlesRectCalculated(const QRect&)),
233 SIGNAL(sigStrokeStartedEmpty()),
238
239 strategy = moveStrategy;
241 }
242
243 {
244 KConfigGroup group = KSharedConfig::openConfig()->group(
toolId());
245 const bool forceLodMode = group.readEntry("forceLodMode", false);
247 }
248
249
250
257
258 if (!isMoveSelection) {
260 }
261
264 }
266
267 return true;
268}
void startUpdateStream(KisStrokesFacade *strokesFacade, KisStrokeId strokeId)
KisStrokeId startStroke(KisStrokeStrategy *strokeStrategy) override
QRect bounds() const override
KisNodeList selectedNodes
void setForceLodModeIfPossible(bool forceLodModeIfPossible)
#define KIS_SAFE_ASSERT_RECOVER(cond)
#define KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE(cond, val)
References KisResourcesSnapshot::activeSelection(), KisImage::bounds(), Private::canvas, commitChanges(), connect(), KisTool::currentNode(), currentOffset(), KisSharedPtr< T >::data(), KisWeakSharedPtr< T >::data(), endStroke(), KisTool::image(), KisToolChangesTracker::isEmpty(), KIS_SAFE_ASSERT_RECOVER, KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE, m_accumulatedOffset, m_asyncUpdateHelper, m_changesTracker, m_currentlyProcessingNodes, m_currentlyUsingSelection, m_currentMode, m_handlesRect, m_strokeId, KisTool::mode(), MoveSelectedLayer, KisTool::nodeEditable(), KisToolChangesTracker::reset(), KisTool::selectedNodes(), KisNodeSelectionRecipe::selectedNodes, KoToolBase::selection(), KisStrokeStrategy::setForceLodModeIfPossible(), slotHandlesRectCalculated(), slotStrokePickedLayers(), slotStrokeStartedEmpty(), KisImage::startStroke(), KisAsynchronousStrokeUpdateHelper::startUpdateStream(), and KoToolBase::toolId().