Commit a94be23f authored by Thomas Zander's avatar Thomas Zander

Rename KoTool => KoToolBase

svn path=/trunk/koffice/; revision=1081945
parent 2eb74acc
......@@ -30,7 +30,7 @@
<UML:DataType stereotype="15470" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="15496" isRoot="false" isAbstract="false" name="K3Command*" elementReference="15482" />
<UML:DataType stereotype="15470" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="15500" isRoot="false" isAbstract="false" name="KoShapeManager*" elementReference="15483" />
<UML:DataType stereotype="15470" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="15503" isRoot="false" isAbstract="false" name="const QRectF&amp;" elementReference="15502" />
<UML:DataType stereotype="15470" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="15506" isRoot="false" isAbstract="false" name="KoTool*" elementReference="15484" />
<UML:DataType stereotype="15470" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="15506" isRoot="false" isAbstract="false" name="KoToolBase*" elementReference="15484" />
<UML:DataType stereotype="15470" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="15510" isRoot="false" isAbstract="false" name="KoViewConverter*" elementReference="15485" />
<UML:DataType stereotype="15470" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="15513" isRoot="false" isAbstract="false" name="QWidget*" elementReference="15512" />
<UML:DataType stereotype="15470" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="15529" isRoot="false" isAbstract="false" name="KoCanvasBase*" elementReference="15486" />
......@@ -223,7 +223,7 @@ updates to the tree are done when they are asked for but when they are needed. "
</UML:Enumeration>
</UML:Namespace.ownedElement>
</UML:Class>
<UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="15484" isRoot="false" isAbstract="false" name="KoTool" />
<UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="15484" isRoot="false" isAbstract="false" name="KoToolBase" />
<UML:Class comment="This file is part of the KDE project
Copyright (C) 2006 Thomas Zander &lt;zander@kde.org>
......
......@@ -74,7 +74,7 @@ public:
virtual ~KisRulerAssistantToolFactory() {}
virtual KoTool * createTool(KoCanvasBase * canvas) {
virtual KoToolBase * createTool(KoCanvasBase * canvas) {
return new KisRulerAssistantTool(canvas);
}
......
......@@ -68,7 +68,7 @@ struct MixerTool::Private {
};
MixerTool::MixerTool(MixerCanvas* mixer)
: KoTool(mixer)
: KoToolBase(mixer)
, m_d( new Private )
{
m_d->mixer = mixer;
......
......@@ -21,14 +21,14 @@
#ifndef MIXERTOOL_H_
#define MIXERTOOL_H_
#include <KoTool.h>
#include <KoToolBase.h>
class KoPointerEvent;
class MixerCanvas;
class QRegion;
class KisPaintInformation;
class MixerTool : public KoTool
class MixerTool : public KoToolBase
{
Q_OBJECT
......@@ -49,7 +49,7 @@ public:
void setDirty(const QRegion &region);
// KoTool Implementation.
// KoToolBase Implementation.
public slots:
......
......@@ -92,7 +92,7 @@ public:
virtual ~KisToolBrushFactory() {}
virtual KoTool * createTool(KoCanvasBase *canvas) {
virtual KoToolBase * createTool(KoCanvasBase *canvas) {
return new KisToolBrush(canvas);
}
......
......@@ -97,7 +97,7 @@ public:
virtual ~KisToolColorPickerFactory() {}
virtual KoTool * createTool(KoCanvasBase *canvas) {
virtual KoToolBase * createTool(KoCanvasBase *canvas) {
return new KisToolColorPicker(canvas);
}
};
......
......@@ -62,7 +62,7 @@ public:
virtual ~KisToolEllipseFactory() {}
virtual KoTool * createTool(KoCanvasBase *canvas) {
virtual KoToolBase * createTool(KoCanvasBase *canvas) {
return new KisToolEllipse(canvas);
}
......
......@@ -99,7 +99,7 @@ public:
virtual ~KisToolFillFactory() {}
virtual KoTool * createTool(KoCanvasBase *canvas) {
virtual KoToolBase * createTool(KoCanvasBase *canvas) {
return new KisToolFill(canvas);
}
......
......@@ -132,7 +132,7 @@ public:
virtual ~KisToolGradientFactory() {}
virtual KoTool * createTool(KoCanvasBase *canvas) {
virtual KoToolBase * createTool(KoCanvasBase *canvas) {
return new KisToolGradient(canvas);
}
......
......@@ -89,7 +89,7 @@ public:
virtual ~KisToolLineFactory() {}
virtual KoTool * createTool(KoCanvasBase *canvas) {
virtual KoToolBase * createTool(KoCanvasBase *canvas) {
return new KisToolLine(canvas);
}
......
......@@ -118,7 +118,7 @@ public:
virtual ~KisToolMeasureFactory() {}
virtual KoTool * createTool(KoCanvasBase *canvas) {
virtual KoToolBase * createTool(KoCanvasBase *canvas) {
return new KisToolMeasure(canvas);
}
......
......@@ -100,7 +100,7 @@ public:
virtual ~KisToolMoveFactory() {}
virtual KoTool * createTool(KoCanvasBase *canvas) {
virtual KoToolBase * createTool(KoCanvasBase *canvas) {
return new KisToolMove(canvas);
}
......
......@@ -56,7 +56,7 @@ public:
virtual ~KisToolPathFactory() {}
virtual KoTool * createTool(KoCanvasBase *canvas) {
virtual KoToolBase * createTool(KoCanvasBase *canvas) {
return new KisToolPath(canvas);
}
};
......
......@@ -70,7 +70,7 @@ public:
virtual ~KisToolRectangleFactory() {}
virtual KoTool * createTool(KoCanvasBase *canvas) {
virtual KoToolBase * createTool(KoCanvasBase *canvas) {
return new KisToolRectangle(canvas);
}
......
......@@ -68,7 +68,7 @@ public:
virtual ~KisToolSelectContiguousFactory() {}
virtual KoTool * createTool(KoCanvasBase *canvas) {
virtual KoToolBase * createTool(KoCanvasBase *canvas) {
return new KisToolSelectContiguous(canvas);
}
......
......@@ -76,7 +76,7 @@ public:
virtual ~KisToolSelectEllipticalFactory() {}
virtual KoTool * createTool(KoCanvasBase *canvas) {
virtual KoToolBase * createTool(KoCanvasBase *canvas) {
return new KisToolSelectElliptical(canvas);
}
......
......@@ -69,7 +69,7 @@ public:
virtual ~KisToolSelectOutlineFactory() {}
virtual KoTool * createTool(KoCanvasBase *canvas) {
virtual KoToolBase * createTool(KoCanvasBase *canvas) {
return new KisToolSelectOutline(canvas);
}
};
......
......@@ -79,7 +79,7 @@ public:
virtual ~KisToolSelectPathFactory() {}
virtual KoTool * createTool(KoCanvasBase *canvas) {
virtual KoToolBase * createTool(KoCanvasBase *canvas) {
return new KisToolSelectPath(canvas);
}
};
......
......@@ -76,7 +76,7 @@ public:
virtual ~KisToolSelectPolygonalFactory() {}
virtual KoTool * createTool(KoCanvasBase *canvas) {
virtual KoToolBase * createTool(KoCanvasBase *canvas) {
return new KisToolSelectPolygonal(canvas);
}
};
......
......@@ -74,7 +74,7 @@ public:
virtual ~KisToolSelectRectangularFactory() {}
virtual KoTool * createTool(KoCanvasBase *canvas) {
virtual KoToolBase * createTool(KoCanvasBase *canvas) {
return new KisToolSelectRectangular(canvas);
}
};
......
......@@ -69,7 +69,7 @@ public:
virtual ~KisToolSelectSimilarFactory() {}
virtual KoTool * createTool(KoCanvasBase *canvas) {
virtual KoToolBase * createTool(KoCanvasBase *canvas) {
return new KisToolSelectSimilar(canvas);
}
......
......@@ -146,7 +146,7 @@ public:
virtual ~KisToolCropFactory() {}
virtual KoTool * createTool(KoCanvasBase *canvas) {
virtual KoToolBase * createTool(KoCanvasBase *canvas) {
return new KisToolCrop(canvas);
}
......
......@@ -55,7 +55,7 @@ public:
virtual ~KisToolBezierPaintFactory() {}
virtual KoTool * createTool(KoCanvasBase *canvas) {
virtual KoToolBase * createTool(KoCanvasBase *canvas) {
return new KisToolBezierPaint(canvas);
}
......
......@@ -64,7 +64,7 @@ public:
virtual ~KisToolBezierSelectFactory() {}
virtual KoTool * createTool(KoCanvasBase *canvas) {
virtual KoToolBase * createTool(KoCanvasBase *canvas) {
return new KisToolBezierSelect(canvas);
}
......
......@@ -58,7 +58,7 @@ public:
virtual ~KisToolExampleFactory() {}
virtual KoTool * createTool(KoCanvasBase *canvas) {
virtual KoToolBase * createTool(KoCanvasBase *canvas) {
return new KisToolExample(canvas);
}
};
......
......@@ -98,7 +98,7 @@ public:
virtual ~KisToolMagneticFactory() {}
virtual KoTool * createTool(KoCanvasBase *canvas) {
virtual KoToolBase * createTool(KoCanvasBase *canvas) {
return new KisToolMagnetic(canvas);
}
......
......@@ -181,7 +181,7 @@ public:
virtual ~KisToolDynaFactory() {}
virtual KoTool * createTool(KoCanvasBase *canvas) {
virtual KoToolBase * createTool(KoCanvasBase *canvas) {
return new KisToolDyna(canvas);
}
......
......@@ -75,7 +75,7 @@ public:
virtual ~KisToolGridFactory() {}
virtual KoTool * createTool(KoCanvasBase * canvas) {
virtual KoToolBase * createTool(KoCanvasBase * canvas) {
return new KisToolGrid(canvas);
}
......
......@@ -101,7 +101,7 @@ public:
virtual ~KisToolPerspectiveGridFactory() {}
virtual KoTool * createTool(KoCanvasBase * canvas) {
virtual KoToolBase * createTool(KoCanvasBase * canvas) {
return new KisToolPerspectiveGrid(canvas);
}
......
......@@ -127,7 +127,7 @@ public:
virtual ~KisToolPerspectiveTransformFactory() {}
virtual KoTool * createTool(KoCanvasBase *canvas) {
virtual KoToolBase * createTool(KoCanvasBase *canvas) {
return new KisToolPerspectiveTransform(canvas);
}
......
......@@ -57,7 +57,7 @@ public:
virtual ~KisToolPolygonFactory() {}
virtual KoTool * createTool(KoCanvasBase *canvas) {
virtual KoToolBase * createTool(KoCanvasBase *canvas) {
return new KisToolPolygon(canvas);
}
};
......
......@@ -61,7 +61,7 @@ public:
virtual ~KisToolPolylineFactory() {}
virtual KoTool * createTool(KoCanvasBase *canvas) {
virtual KoToolBase * createTool(KoCanvasBase *canvas) {
return new KisToolPolyline(canvas);
}
......
......@@ -89,7 +89,7 @@ public:
virtual ~KisToolStarFactory() {}
virtual KoTool * createTool(KoCanvasBase *canvas) {
virtual KoToolBase * createTool(KoCanvasBase *canvas) {
return new KisToolStar(canvas);
}
......
......@@ -147,7 +147,7 @@ public:
virtual ~KisToolTransformFactory() {}
virtual KoTool * createTool(KoCanvasBase *canvas) {
virtual KoToolBase * createTool(KoCanvasBase *canvas) {
return new KisToolTransform(canvas);
}
......
......@@ -53,7 +53,7 @@ public:
virtual ~KisTool%{APPNAME}Factory() {}
virtual KoTool * createTool(KoCanvasBase * canvas) {
virtual KoToolBase * createTool(KoCanvasBase * canvas) {
return new KisTool%{APPNAME}(canvas);
}
......
......@@ -41,7 +41,7 @@
#include "KritaShapeTool.moc"
KritaShapeTool::KritaShapeTool(KoCanvasBase* canvas)
: KoTool(canvas),
: KoToolBase(canvas),
m_kritaShapeshape(0)
{
}
......
......@@ -19,11 +19,11 @@
#ifndef KRITA_SHAPE_TOOL
#define KRITA_SHAPE_TOOL
#include <KoTool.h>
#include <KoToolBase.h>
class KritaShape;
class KritaShapeTool : public KoTool
class KritaShapeTool : public KoToolBase
{
Q_OBJECT
public:
......
......@@ -36,7 +36,7 @@ KritaShapeToolFactory::~KritaShapeToolFactory()
{
}
KoTool* KritaShapeToolFactory::createTool(KoCanvasBase* canvas)
KoToolBase* KritaShapeToolFactory::createTool(KoCanvasBase* canvas)
{
return new KritaShapeTool(canvas);
}
......
......@@ -28,7 +28,7 @@ public:
KritaShapeToolFactory(QObject* parent);
~KritaShapeToolFactory();
KoTool* createTool(KoCanvasBase* canvas);
KoToolBase* createTool(KoCanvasBase* canvas);
};
......
......@@ -29,7 +29,7 @@
#include <KoCanvasBase.h>
#include <KoCanvasController.h>
#include <KoShapeManager.h>
#include <KoTool.h>
#include <KoToolBase.h>
#include <KoColor.h>
#include <KoID.h>
#include <KoPointerEvent.h>
......@@ -92,7 +92,7 @@ struct KisTool::Private {
};
KisTool::KisTool(KoCanvasBase * canvas, const QCursor & cursor)
: KoTool(canvas)
: KoToolBase(canvas)
, d(new Private)
{
d->cursor = cursor;
......
......@@ -22,7 +22,7 @@
#include <QCursor>
#include <KoColor.h>
#include <KoTool.h>
#include <KoToolBase.h>
#include <KoID.h>
#include <KoResourceManager.h>
#include <krita_export.h>
......@@ -47,7 +47,7 @@ static const QString TOOL_TYPE_VIEW = "4 Krita/View"; // Tools th
static const QString TOOL_TYPE_SELECTED = "5 Krita/Select"; // Tools that select pixels
class KRITAUI_EXPORT KisTool
: public KoTool
: public KoToolBase
{
Q_OBJECT
......@@ -56,7 +56,7 @@ public:
KisTool(KoCanvasBase * canvas, const QCursor & cursor);
virtual ~KisTool();
// KoTool Implementation.
// KoToolBase Implementation.
public slots:
......
......@@ -29,7 +29,7 @@
#include <QVariant>
#include <KoResourceManager.h>
#include <KoTool.h>
#include <KoToolBase.h>
#include <KoAbstractGradient.h>
#include <krita_export.h>
......
......@@ -38,7 +38,7 @@ set(flake_SRCS
KoShapeManager.cpp
KoShapePainter.cpp
KoFrameShape.cpp
KoTool.cpp
KoToolBase.cpp
KoCanvasController.cpp
KoCanvasController_p.cpp
KoShapeRegistry.cpp
......@@ -253,7 +253,7 @@ install(
KoShapeUserData.h
KoShapeApplicationData.h
KoSharedSavingData.h
KoTool.h
KoToolBase.h
KoToolManager.h
KoToolFactoryBase.h
KoToolProxy.h
......
......@@ -19,7 +19,7 @@
#include "KoCopyController.h"
#include <KoTool.h>
#include <KoToolBase.h>
#include <KoCanvasBase.h>
#include <KoToolProxy.h>
#include <KoToolSelection.h>
......
......@@ -31,7 +31,7 @@ class KoCopyControllerPrivate;
* This class takes care of the copy actions integration into flake.
* Whenever the copy (KStandardAction::Copy) action is triggered the controller
* will use the currently selected tool and try to copy to the clipboard using that tool.
* Additionally; when the tool does not allow copying (KoTool::hasSelection() returns false)
* Additionally; when the tool does not allow copying (KoToolBase::hasSelection() returns false)
* the signal copyRequested will be emitted for applications to connect to.
*/
class FLAKE_EXPORT KoCopyController : public QObject
......
......@@ -26,7 +26,7 @@
* This class takes care of the cut actions integration into flake.
* Whenever the copy (KStandardAction::Cut) action is triggered the controller
* will use the currently selected tool and try to cut to the clipboard using that tool.
* Additionally; when the tool does not allow copying (KoTool::hasSelection() returns false)
* Additionally; when the tool does not allow copying (KoToolBase::hasSelection() returns false)
* the signal copyRequested will be emitted for applications to connect to.
*/
class FLAKE_EXPORT KoCutController : public KoCopyController
......
......@@ -24,7 +24,7 @@
#include "KoXmlReaderForward.h"
class KoShapeLoadingContext;
class KoShapeSavingContext;
class KoTool;
class KoToolBase;
/**
* This is the base class for actions that are executed on events.
......
......@@ -19,7 +19,7 @@
#include "KoPasteController.h"
// #include <KoTool.h>
// #include <KoToolBase.h>
#include <KoCanvasBase.h>
#include <KoToolProxy.h>
// #include <KoToolSelection.h>
......
......@@ -30,7 +30,7 @@ class KoCanvasBase;
* This class takes care of the paste actions integration into flake.
* Whenever the paste (KStandardAction::Paste) action is triggered the controller
* will use the currently selected tool and try to paste using that tool.
* Additionally; when the tool does not allow pasting (KoTool::hasSelection() returns false)
* Additionally; when the tool does not allow pasting (KoToolBase::hasSelection() returns false)
* the signal pasteRequested will be emitted for applications to connect to.
*/
class FLAKE_EXPORT KoPasteController : public QObject
......
......@@ -94,7 +94,7 @@ public:
* Create the new factory
* @param parent the parent QObject for memory management usage.
* @param id a string that will be used internally for referencing the shape, for
* example for use by the KoTool::activateTemporary.
* example for use by the KoToolBase::activateTemporary.
* @param name the user visible name of the shape this factory creates.
*/
KoShapeFactoryBase(QObject *parent, const QString &id, const QString &name);
......
......@@ -17,8 +17,8 @@
* Boston, MA 02110-1301, USA.
*/
#include "KoTool.h"
#include "KoTool_p.h"
#include "KoToolBase.h"
#include "KoToolBase_p.h"
#include "KoCanvasBase.h"
#include "KoPointerEvent.h"
#include "KoResourceManager.h"
......@@ -28,72 +28,72 @@
#include <kactioncollection.h>
#include <QWidget>
KoTool::KoTool(KoCanvasBase *canvas)
: d_ptr(new KoToolPrivate(this, canvas))
KoToolBase::KoToolBase(KoCanvasBase *canvas)
: d_ptr(new KoToolBasePrivate(this, canvas))
{
Q_D(KoTool);
Q_D(KoToolBase);
if (d->canvas) { // in the case of KoToolManagers dummytool it can be zero :(
KoResourceManager * crp = d->canvas->resourceManager();
Q_ASSERT_X(crp, "KoTool::KoTool", "No KoResourceManager");
Q_ASSERT_X(crp, "KoToolBase::KoToolBase", "No KoResourceManager");
if (crp)
connect(d->canvas->resourceManager(), SIGNAL(resourceChanged(int, const QVariant &)),
this, SLOT(resourceChanged(int, const QVariant &)));
}
}
KoTool::KoTool(KoToolPrivate &dd)
KoToolBase::KoToolBase(KoToolBasePrivate &dd)
: d_ptr(&dd)
{
}
KoTool::~KoTool()
KoToolBase::~KoToolBase()
{
delete d_ptr;
}
void KoTool::activate(bool temporary)
void KoToolBase::activate(bool temporary)
{
Q_UNUSED(temporary);
}
void KoTool::deactivate()
void KoToolBase::deactivate()
{
}
void KoTool::resourceChanged(int key, const QVariant & res)
void KoToolBase::resourceChanged(int key, const QVariant & res)
{
Q_UNUSED(key);
Q_UNUSED(res);
}
bool KoTool::wantsAutoScroll()
bool KoToolBase::wantsAutoScroll()
{
return true;
}
void KoTool::mouseDoubleClickEvent(KoPointerEvent *event)
void KoToolBase::mouseDoubleClickEvent(KoPointerEvent *event)
{
event->ignore();