summaryrefslogtreecommitdiffstats
path: root/krita/plugins/tools/tool_perspectivetransform
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /krita/plugins/tools/tool_perspectivetransform
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'krita/plugins/tools/tool_perspectivetransform')
-rw-r--r--krita/plugins/tools/tool_perspectivetransform/kis_tool_perspectivetransform.cc122
-rw-r--r--krita/plugins/tools/tool_perspectivetransform/kis_tool_perspectivetransform.h19
-rw-r--r--krita/plugins/tools/tool_perspectivetransform/tool_perspectivetransform.cc10
-rw-r--r--krita/plugins/tools/tool_perspectivetransform/tool_perspectivetransform.h3
4 files changed, 78 insertions, 76 deletions
diff --git a/krita/plugins/tools/tool_perspectivetransform/kis_tool_perspectivetransform.cc b/krita/plugins/tools/tool_perspectivetransform/kis_tool_perspectivetransform.cc
index f334c429c..b662c9403 100644
--- a/krita/plugins/tools/tool_perspectivetransform/kis_tool_perspectivetransform.cc
+++ b/krita/plugins/tools/tool_perspectivetransform/kis_tool_perspectivetransform.cc
@@ -24,13 +24,13 @@
#include "kis_tool_perspectivetransform.h"
-#include <qpainter.h>
-#include <qpen.h>
-#include <qpushbutton.h>
-#include <qobject.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qapplication.h>
+#include <tqpainter.h>
+#include <tqpen.h>
+#include <tqpushbutton.h>
+#include <tqobject.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqapplication.h>
#include <kdebug.h>
#include <kaction.h>
@@ -65,19 +65,19 @@ namespace {
typedef KisSelectedTransaction super;
public:
- PerspectiveTransformCmd(KisToolPerspectiveTransform *tool, KisPaintDeviceSP device, KisPaintDeviceSP origDevice, KisPoint topleft, KisPoint topright, KisPoint bottomleft, KisPoint bottomright, KisSelectionSP origSel, QRect initialRect);
+ PerspectiveTransformCmd(KisToolPerspectiveTransform *tool, KisPaintDeviceSP device, KisPaintDeviceSP origDevice, KisPoint topleft, KisPoint topright, KisPoint bottomleft, KisPoint bottomright, KisSelectionSP origSel, TQRect initialRect);
virtual ~PerspectiveTransformCmd();
public:
virtual void execute();
virtual void unexecute();
void transformArgs(KisPoint &topleft, KisPoint &topright, KisPoint &bottomleft, KisPoint& bottomright) const;
- KisSelectionSP origSelection(QRect& initialRect) const;
+ KisSelectionSP origSelection(TQRect& initialRect) const;
KisPaintDeviceSP theDevice();
KisPaintDeviceSP origDevice();
private:
- QRect m_initialRect;
+ TQRect m_initialRect;
KisPoint m_topleft, m_topright, m_bottomleft, m_bottomright;
KisToolPerspectiveTransform *m_tool;
KisSelectionSP m_origSelection;
@@ -85,7 +85,7 @@ namespace {
KisPaintDeviceSP m_origDevice;
};
- PerspectiveTransformCmd::PerspectiveTransformCmd(KisToolPerspectiveTransform *tool, KisPaintDeviceSP device, KisPaintDeviceSP origDevice, KisPoint topleft, KisPoint topright, KisPoint bottomleft, KisPoint bottomright, KisSelectionSP origSel, QRect initialRect) :
+ PerspectiveTransformCmd::PerspectiveTransformCmd(KisToolPerspectiveTransform *tool, KisPaintDeviceSP device, KisPaintDeviceSP origDevice, KisPoint topleft, KisPoint topright, KisPoint bottomleft, KisPoint bottomright, KisSelectionSP origSel, TQRect initialRect) :
super(i18n("Perspective Transform"), device), m_initialRect(initialRect)
, m_topleft(topleft), m_topright(topright), m_bottomleft(bottomleft), m_bottomright(bottomright)
, m_tool(tool), m_origSelection(origSel), m_device(device), m_origDevice(origDevice)
@@ -104,7 +104,7 @@ namespace {
bottomright = m_bottomright;
}
- KisSelectionSP PerspectiveTransformCmd::origSelection(QRect& initialRect) const
+ KisSelectionSP PerspectiveTransformCmd::origSelection(TQRect& initialRect) const
{
initialRect = m_initialRect;
return m_origSelection;
@@ -157,7 +157,7 @@ void KisToolPerspectiveTransform::deactivate()
paintOutline();
- disconnect(m_subject->currentImg().data(), SIGNAL(sigLayerActivated(KisLayerSP)), this, SLOT(slotLayerActivated(KisLayerSP)));
+ disconnect(m_subject->currentImg().data(), TQT_SIGNAL(sigLayerActivated(KisLayerSP)), this, TQT_SLOT(slotLayerActivated(KisLayerSP)));
}
void KisToolPerspectiveTransform::activate()
@@ -196,12 +196,12 @@ void KisToolPerspectiveTransform::activate()
initHandles();
}
}
- connect(m_subject->currentImg(), SIGNAL(sigLayerActivated(KisLayerSP)), this, SLOT(slotLayerActivated(KisLayerSP)));
+ connect(m_subject->currentImg(), TQT_SIGNAL(sigLayerActivated(KisLayerSP)), this, TQT_SLOT(slotLayerActivated(KisLayerSP)));
}
void KisToolPerspectiveTransform::initHandles()
{
-// Q_INT32 x,y,w,h;
+// TQ_INT32 x,y,w,h;
KisImageSP img = m_subject->currentImg();
KisPaintDeviceSP dev = img->activeDevice();
@@ -230,17 +230,17 @@ void KisToolPerspectiveTransform::initHandles()
void KisToolPerspectiveTransform::paint(KisCanvasPainter& gc)
{
- paintOutline(gc, QRect());
+ paintOutline(gc, TQRect());
}
-void KisToolPerspectiveTransform::paint(KisCanvasPainter& gc, const QRect& rc)
+void KisToolPerspectiveTransform::paint(KisCanvasPainter& gc, const TQRect& rc)
{
paintOutline(gc, rc);
}
-bool KisToolPerspectiveTransform::mouseNear(const QPoint& mousep, const QPoint point)
+bool KisToolPerspectiveTransform::mouseNear(const TQPoint& mousep, const TQPoint point)
{
- return (QRect( (point.x() - m_handleHalfSize), (point.y() - m_handleHalfSize), m_handleSize, m_handleSize).contains(mousep) );
+ return (TQRect( (point.x() - m_handleHalfSize), (point.y() - m_handleHalfSize), m_handleSize, m_handleSize).tqcontains(mousep) );
}
void KisToolPerspectiveTransform::buttonPress(KisButtonPressEvent *event)
@@ -272,43 +272,43 @@ void KisToolPerspectiveTransform::buttonPress(KisButtonPressEvent *event)
m_actualyMoveWhileSelected = false;
m_dragEnd = event->pos();
KisCanvasController *controller = m_subject->canvasController();
- QPoint mousep = controller->windowToView( event->pos().roundQPoint() );
- if( mouseNear( mousep, controller->windowToView(m_topleft.roundQPoint() ) ) )
+ TQPoint mousep = controller->windowToView( event->pos().roundTQPoint() );
+ if( mouseNear( mousep, controller->windowToView(m_topleft.roundTQPoint() ) ) )
{
kdDebug() << " PRESS TOPLEFT HANDLE " << endl;
m_currentSelectedPoint = &m_topleft;
}
- else if( mouseNear( mousep, controller->windowToView(m_topright.roundQPoint() ) ) )
+ else if( mouseNear( mousep, controller->windowToView(m_topright.roundTQPoint() ) ) )
{
kdDebug() << " PRESS TOPRIGHT HANDLE " << endl;
m_currentSelectedPoint = &m_topright;
}
- else if( mouseNear( mousep, controller->windowToView(m_bottomleft.roundQPoint() ) ) )
+ else if( mouseNear( mousep, controller->windowToView(m_bottomleft.roundTQPoint() ) ) )
{
kdDebug() << " PRESS BOTTOMLEFT HANDLE " << endl;
m_currentSelectedPoint = &m_bottomleft;
}
- else if( mouseNear( mousep, controller->windowToView(m_bottomright.roundQPoint() ) ) )
+ else if( mouseNear( mousep, controller->windowToView(m_bottomright.roundTQPoint() ) ) )
{
kdDebug() << " PRESS BOTTOMRIGHT HANDLE " << endl;
m_currentSelectedPoint = &m_bottomright;
- } else if( mouseNear( mousep, controller->windowToView(KisPoint((m_topleft+m_topright)*0.5).roundQPoint() ) ) )
+ } else if( mouseNear( mousep, controller->windowToView(KisPoint((m_topleft+m_topright)*0.5).roundTQPoint() ) ) )
{
kdDebug() << " PRESS TOP HANDLE " << endl;
m_handleSelected = TOPHANDLE;
- }else if( mouseNear( mousep, controller->windowToView(KisPoint((m_topleft+m_bottomleft)*0.5).roundQPoint() ) ) )
+ }else if( mouseNear( mousep, controller->windowToView(KisPoint((m_topleft+m_bottomleft)*0.5).roundTQPoint() ) ) )
{
kdDebug() << " PRESS LEFT HANDLE " << endl;
m_handleSelected = LEFTHANDLE;
- }else if( mouseNear( mousep, controller->windowToView(KisPoint((m_bottomleft+m_bottomright)*0.5).roundQPoint() ) ) )
+ }else if( mouseNear( mousep, controller->windowToView(KisPoint((m_bottomleft+m_bottomright)*0.5).roundTQPoint() ) ) )
{
kdDebug() << " PRESS BOTTOM HANDLE " << endl;
m_handleSelected = BOTTOMHANDLE;
- }else if( mouseNear( mousep, controller->windowToView(KisPoint((m_bottomright+m_topright)*0.5).roundQPoint() ) ) )
+ }else if( mouseNear( mousep, controller->windowToView(KisPoint((m_bottomright+m_topright)*0.5).roundTQPoint() ) ) )
{
kdDebug() << " PRESS RIGHT HANDLE " << endl;
m_handleSelected = RIGHTHANDLE;
- }else if( mouseNear( mousep, controller->windowToView(KisPoint((m_topleft+m_bottomleft + m_bottomright+m_topright)*0.25).roundQPoint() ) ) )
+ }else if( mouseNear( mousep, controller->windowToView(KisPoint((m_topleft+m_bottomleft + m_bottomright+m_topright)*0.25).roundTQPoint() ) ) )
{
kdDebug() << " PRESS MIDDLE HANDLE " << endl;
m_handleSelected = MIDDLEHANDLE;
@@ -368,7 +368,7 @@ void KisToolPerspectiveTransform::move(KisMoveEvent *event)
KisPoint topRight = KisPerspectiveMath::matProd(matrixFrom, m_initialRect.topRight() );
KisPoint bottomLeft = KisPerspectiveMath::matProd(matrixFrom, m_initialRect.bottomLeft() );
KisPoint bottomRight = KisPerspectiveMath::matProd(matrixFrom, m_initialRect.bottomRight() );
- QRect dstRect = m_initialRect;
+ TQRect dstRect = m_initialRect;
switch(m_handleSelected)
{
case TOPHANDLE:
@@ -458,9 +458,9 @@ void KisToolPerspectiveTransform::buttonRelease(KisButtonReleaseEvent * event)
m_bottomright = KisPerspectiveMath::matProd(matrix, m_initialRect.bottomRight());
m_interractionMode = EDITRECTINTERRACTION;
paintOutline();
- QApplication::setOverrideCursor(KisCursor::waitCursor());
+ TQApplication::setOverrideCursor(KisCursor::waitCursor());
transform();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
} else {
paintOutline();
}
@@ -475,9 +475,9 @@ void KisToolPerspectiveTransform::buttonRelease(KisButtonReleaseEvent * event)
if(m_actualyMoveWhileSelected)
{
paintOutline();
- QApplication::setOverrideCursor(KisCursor::waitCursor());
+ TQApplication::setOverrideCursor(KisCursor::waitCursor());
transform();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
}
if(m_handleSelected != NOHANDLE)
@@ -486,9 +486,9 @@ void KisToolPerspectiveTransform::buttonRelease(KisButtonReleaseEvent * event)
if(m_actualyMoveWhileSelected)
{
// paintOutline();
- QApplication::setOverrideCursor(KisCursor::waitCursor());
+ TQApplication::setOverrideCursor(KisCursor::waitCursor());
transform();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
}
}
@@ -503,19 +503,19 @@ void KisToolPerspectiveTransform::paintOutline()
KisCanvasController *controller = m_subject->canvasController();
KisCanvas *canvas = controller->kiscanvas();
KisCanvasPainter gc(canvas);
- QRect rc;
+ TQRect rc;
paintOutline(gc, rc);
}
}
-void KisToolPerspectiveTransform::paintOutline(KisCanvasPainter& gc, const QRect&)
+void KisToolPerspectiveTransform::paintOutline(KisCanvasPainter& gc, const TQRect&)
{
if (m_subject) {
KisCanvasController *controller = m_subject->canvasController();
RasterOp op = gc.rasterOp();
- QPen old = gc.pen();
- QPen pen(Qt::SolidLine);
+ TQPen old = gc.pen();
+ TQPen pen(TQt::SolidLine);
pen.setWidth(1);
Q_ASSERT(controller);
@@ -525,8 +525,8 @@ void KisToolPerspectiveTransform::paintOutline(KisCanvasPainter& gc, const QRect
{
kdDebug() << "DRAWRECTINTERRACTION paintOutline " << m_points.size() << endl;
KisPoint start, end;
- QPoint startPos;
- QPoint endPos;
+ TQPoint startPos;
+ TQPoint endPos;
for (KisPointVector::iterator it = m_points.begin(); it != m_points.end(); ++it) {
if (it == m_points.begin())
@@ -535,8 +535,8 @@ void KisToolPerspectiveTransform::paintOutline(KisCanvasPainter& gc, const QRect
} else {
end = (*it);
- startPos = controller->windowToView(start.floorQPoint());
- endPos = controller->windowToView(end.floorQPoint());
+ startPos = controller->windowToView(start.floorTQPoint());
+ endPos = controller->windowToView(end.floorTQPoint());
gc.drawLine(startPos, endPos);
@@ -547,12 +547,12 @@ void KisToolPerspectiveTransform::paintOutline(KisCanvasPainter& gc, const QRect
break;
case EDITRECTINTERRACTION:
{
- QPoint topleft = controller->windowToView(m_topleft ).roundQPoint();
- QPoint topright = controller->windowToView(m_topright).roundQPoint();
- QPoint bottomleft = controller->windowToView(m_bottomleft).roundQPoint();
- QPoint bottomright = controller->windowToView(m_bottomright).roundQPoint();
+ TQPoint topleft = controller->windowToView(m_topleft ).roundTQPoint();
+ TQPoint topright = controller->windowToView(m_topright).roundTQPoint();
+ TQPoint bottomleft = controller->windowToView(m_bottomleft).roundTQPoint();
+ TQPoint bottomright = controller->windowToView(m_bottomright).roundTQPoint();
- gc.setRasterOp(Qt::NotROP);
+ gc.setRasterOp(TQt::NotROP);
gc.setPen(pen);
gc.drawRect(topleft.x()-4, topleft.y()-4, 8, 8);
gc.drawLine(topleft.x(), topleft.y(), (topleft.x()+topright.x())/2, (topleft.y()+topright.y())/2);
@@ -593,7 +593,7 @@ void KisToolPerspectiveTransform::transform()
m_topleft, m_topright, m_bottomleft, m_bottomright, m_origSelection, m_initialRect);
// Copy the original state back.
- QRect rc = m_origDevice->extent();
+ TQRect rc = m_origDevice->extent();
rc = rc.normalize();
img->activeDevice()->clear();
KisPainter gc(img->activeDevice());
@@ -603,7 +603,7 @@ void KisToolPerspectiveTransform::transform()
// Also restore the original selection.
if(m_origSelection)
{
- QRect rc = m_origSelection->selectedRect();
+ TQRect rc = m_origSelection->selectedRect();
rc = rc.normalize();
img->activeDevice()->selection()->clear();
KisPainter sgc(img->activeDevice()->selection().data());
@@ -681,27 +681,27 @@ void KisToolPerspectiveTransform::slotLayerActivated(KisLayerSP)
}
-QWidget* KisToolPerspectiveTransform::createOptionWidget(QWidget* /*parent*/)
+TQWidget* KisToolPerspectiveTransform::createOptionWidget(TQWidget* /*tqparent*/)
{
#if 0
- m_optWidget = new WdgToolPerspectiveTransform(parent);
+ m_optWidget = new WdgToolPerspectiveTransform(tqparent);
Q_CHECK_PTR(m_optWidget);
m_optWidget->cmbFilter->clear();
m_optWidget->cmbFilter->setIDList(KisFilterStrategyRegistry::instance()->listKeys());
m_optWidget->cmbFilter->setCurrentText("Mitchell");
- connect(m_optWidget->cmbFilter, SIGNAL(activated(const KisID &)),
- this, SLOT(slotSetFilter(const KisID &)));
+ connect(m_optWidget->cmbFilter, TQT_SIGNAL(activated(const KisID &)),
+ this, TQT_SLOT(slotSetFilter(const KisID &)));
KisID filterID = m_optWidget->cmbFilter->currentItem();
m_filter = KisFilterStrategyRegistry::instance()->get(filterID);
/*
- connect(m_optWidget->intStartX, SIGNAL(valueChanged(int)), this, SLOT(setStartX(int)));
- connect(m_optWidget->intStartY, SIGNAL(valueChanged(int)), this, SLOT(setStartY(int)));
- connect(m_optWidget->intEndX, SIGNAL(valueChanged(int)), this, SLOT(setEndX(int)));
- connect(m_optWidget->intEndY, SIGNAL(valueChanged(int)), this, SLOT(setEndY(int)));
+ connect(m_optWidget->intStartX, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setStartX(int)));
+ connect(m_optWidget->intStartY, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setStartY(int)));
+ connect(m_optWidget->intEndX, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setEndX(int)));
+ connect(m_optWidget->intEndY, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setEndY(int)));
*/
m_optWidget->intStartX->hide();
m_optWidget->intStartY->hide();
@@ -715,7 +715,7 @@ QWidget* KisToolPerspectiveTransform::createOptionWidget(QWidget* /*parent*/)
return 0;
}
-QWidget* KisToolPerspectiveTransform::optionWidget()
+TQWidget* KisToolPerspectiveTransform::optionWidget()
{
return 0;
}
@@ -729,7 +729,7 @@ void KisToolPerspectiveTransform::setup(KActionCollection *collection)
"tool_perspectivetransform",
0,
this,
- SLOT(activate()),
+ TQT_SLOT(activate()),
collection,
name());
Q_CHECK_PTR(m_action);
diff --git a/krita/plugins/tools/tool_perspectivetransform/kis_tool_perspectivetransform.h b/krita/plugins/tools/tool_perspectivetransform/kis_tool_perspectivetransform.h
index e2600cfcb..94b808c22 100644
--- a/krita/plugins/tools/tool_perspectivetransform/kis_tool_perspectivetransform.h
+++ b/krita/plugins/tools/tool_perspectivetransform/kis_tool_perspectivetransform.h
@@ -24,7 +24,7 @@
#ifndef KIS_TOOL_PERSPECTIVETRANSFORM_H_
#define KIS_TOOL_PERSPECTIVETRANSFORM_H_
-#include <qpoint.h>
+#include <tqpoint.h>
#include <kis_layer.h>
#include <kis_point.h>
@@ -46,20 +46,21 @@ class KisToolPerspectiveTransform : public KisToolNonPaint, KisCommandHistoryLis
typedef KisToolNonPaint super;
Q_OBJECT
+ TQ_OBJECT
enum InterractionMode { DRAWRECTINTERRACTION, EDITRECTINTERRACTION };
enum HandleSelected { NOHANDLE, TOPHANDLE, BOTTOMHANDLE, RIGHTHANDLE, LEFTHANDLE, MIDDLEHANDLE };
public:
KisToolPerspectiveTransform();
virtual ~KisToolPerspectiveTransform();
- virtual QWidget* createOptionWidget(QWidget* parent);
- virtual QWidget* optionWidget();
+ virtual TQWidget* createOptionWidget(TQWidget* tqparent);
+ virtual TQWidget* optionWidget();
virtual void setup(KActionCollection *collection);
virtual enumToolType toolType() { return TOOL_TRANSFORM; }
- virtual Q_UINT32 priority() { return 4; }
+ virtual TQ_UINT32 priority() { return 4; }
virtual void paint(KisCanvasPainter& gc);
- virtual void paint(KisCanvasPainter& gc, const QRect& rc);
+ virtual void paint(KisCanvasPainter& gc, const TQRect& rc);
virtual void buttonPress(KisButtonPressEvent *e);
virtual void move(KisMoveEvent *e);
virtual void buttonRelease(KisButtonReleaseEvent *e);
@@ -75,8 +76,8 @@ public:
private:
- bool mouseNear(const QPoint& mousep, const QPoint point);
- void paintOutline(KisCanvasPainter& gc, const QRect& rc);
+ bool mouseNear(const TQPoint& mousep, const TQPoint point);
+ void paintOutline(KisCanvasPainter& gc, const TQRect& rc);
void transform();
void initHandles();
@@ -89,7 +90,7 @@ protected slots:
private:
bool m_dragging;
InterractionMode m_interractionMode;
- QRect m_initialRect;
+ TQRect m_initialRect;
KisPoint m_dragStart, m_dragEnd;
KisPoint m_topleft, m_topright, m_bottomleft, m_bottomright;
KisPoint* m_currentSelectedPoint;
@@ -102,7 +103,7 @@ private:
int m_handleHalfSize, m_handleSize;
// The following variables are used in during the draw rect interraction mode
- typedef QValueVector<KisPoint> KisPointVector;
+ typedef TQValueVector<KisPoint> KisPointVector;
KisPointVector m_points;
// The following variables are used when moving a middle handle
HandleSelected m_handleSelected;
diff --git a/krita/plugins/tools/tool_perspectivetransform/tool_perspectivetransform.cc b/krita/plugins/tools/tool_perspectivetransform/tool_perspectivetransform.cc
index 3fdbe3bbe..9102bb0cc 100644
--- a/krita/plugins/tools/tool_perspectivetransform/tool_perspectivetransform.cc
+++ b/krita/plugins/tools/tool_perspectivetransform/tool_perspectivetransform.cc
@@ -20,7 +20,7 @@
#include <stdlib.h>
#include <vector>
-#include <qpoint.h>
+#include <tqpoint.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -42,15 +42,15 @@ typedef KGenericFactory<ToolPerspectiveTransform> ToolPerspectiveTransformFactor
K_EXPORT_COMPONENT_FACTORY( kritatoolperspectivetransform, ToolPerspectiveTransformFactory( "krita" ) )
-ToolPerspectiveTransform::ToolPerspectiveTransform(QObject *parent, const char *name, const QStringList &)
- : KParts::Plugin(parent, name)
+ToolPerspectiveTransform::ToolPerspectiveTransform(TQObject *tqparent, const char *name, const TQStringList &)
+ : KParts::Plugin(tqparent, name)
{
setInstance(ToolPerspectiveTransformFactory::instance());
- if ( parent->inherits("KisToolRegistry") )
+ if ( tqparent->inherits("KisToolRegistry") )
{
kdDebug() << " add perspective transform tool to the registry" << endl;
- KisToolRegistry * r = dynamic_cast<KisToolRegistry*>(parent);
+ KisToolRegistry * r = dynamic_cast<KisToolRegistry*>(tqparent);
r->add(new KisToolPerspectiveTransformFactory());
}
diff --git a/krita/plugins/tools/tool_perspectivetransform/tool_perspectivetransform.h b/krita/plugins/tools/tool_perspectivetransform/tool_perspectivetransform.h
index 6cc6370fa..1cbeadee3 100644
--- a/krita/plugins/tools/tool_perspectivetransform/tool_perspectivetransform.h
+++ b/krita/plugins/tools/tool_perspectivetransform/tool_perspectivetransform.h
@@ -29,8 +29,9 @@ class KisView;
class ToolPerspectiveTransform : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- ToolPerspectiveTransform(QObject *parent, const char *name, const QStringList &);
+ ToolPerspectiveTransform(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~ToolPerspectiveTransform();
private: