Krita Source Code Documentation
Loading...
Searching...
No Matches
KoInteractionStrategy.cpp
Go to the documentation of this file.
1/* This file is part of the KDE project
2 * SPDX-FileCopyrightText: 2006 Thomas Zander <zander@kde.org>
3 * SPDX-FileCopyrightText: 2011 Jan Hambrecht <jaham@gmx.net>
4 *
5 * SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7
10#include "KoCanvasBase.h"
11#include "KoShapeController.h"
14
15#include <kundo2command.h>
16
21
23{
25 if (cmd) {
26 cmd->redo(); //some applications rely an redo being called here
27 cmd->undo();
28 delete cmd;
29 }
30}
31
36
41
43{
44}
45
47{
48 Q_D(const KoInteractionStrategy);
49 return d->tool;
50}
51
53{
54 return tool()->canvas()->resourceManager()->handleRadius();
55}
56
58{
59 return tool()->canvas()->resourceManager()->decorationThickness();
60}
61
63{
64 return tool()->canvas()->shapeController()->resourceManager()->grabSensitivity();
65}
unsigned int uint
virtual void undo()
virtual void redo()
QPointer< KoShapeController > shapeController
QPointer< KoCanvasResourceProvider > resourceManager
KoInteractionStrategyPrivate * d_ptr
uint grabSensitivity() const
Convenience function to get the global grab sensitivity.
KoInteractionStrategy(KoToolBase *parent)
constructor
virtual ~KoInteractionStrategy()
Destructor.
virtual KUndo2Command * createCommand()=0
virtual void paint(QPainter &painter, const KoViewConverter &converter)
uint handleRadius() const
Convenience function to get the global handle radius.
KoCanvasBase * canvas() const
Returns the canvas the tool is working on.