summaryrefslogtreecommitdiffstats
path: root/krita/plugins/tools/tool_polygon
diff options
context:
space:
mode:
Diffstat (limited to 'krita/plugins/tools/tool_polygon')
-rw-r--r--krita/plugins/tools/tool_polygon/kis_tool_polygon.cc32
-rw-r--r--krita/plugins/tools/tool_polygon/kis_tool_polygon.h13
-rw-r--r--krita/plugins/tools/tool_polygon/tool_polygon.cc10
-rw-r--r--krita/plugins/tools/tool_polygon/tool_polygon.h3
4 files changed, 30 insertions, 28 deletions
diff --git a/krita/plugins/tools/tool_polygon/kis_tool_polygon.cc b/krita/plugins/tools/tool_polygon/kis_tool_polygon.cc
index 9589e19f..35ffd5ed 100644
--- a/krita/plugins/tools/tool_polygon/kis_tool_polygon.cc
+++ b/krita/plugins/tools/tool_polygon/kis_tool_polygon.cc
@@ -21,8 +21,8 @@
#include <math.h>
-#include <qpainter.h>
-#include <qspinbox.h>
+#include <tqpainter.h>
+#include <tqspinbox.h>
#include <kaction.h>
#include <kdebug.h>
@@ -159,7 +159,7 @@ void KisToolPolygon::paint(KisCanvasPainter& gc)
draw(gc);
}
-void KisToolPolygon::paint(KisCanvasPainter& gc, const QRect&)
+void KisToolPolygon::paint(KisCanvasPainter& gc, const TQRect&)
{
draw(gc);
}
@@ -180,19 +180,19 @@ void KisToolPolygon::draw(KisCanvasPainter& gc)
if (!m_subject || !m_currentImage)
return;
- QPen pen(Qt::white, 0, Qt::SolidLine);
+ TQPen pen(TQt::white, 0, TQt::SolidLine);
gc.setPen(pen);
- gc.setRasterOp(Qt::XorROP);
+ gc.setRasterOp(TQt::XorROP);
KisCanvasController *controller = m_subject->canvasController();
KisPoint start, end;
- QPoint startPos;
- QPoint endPos;
+ TQPoint startPos;
+ TQPoint endPos;
if (m_dragging) {
- startPos = controller->windowToView(m_dragStart.floorQPoint());
- endPos = controller->windowToView(m_dragEnd.floorQPoint());
+ startPos = controller->windowToView(m_dragStart.floorTQPoint());
+ endPos = controller->windowToView(m_dragEnd.floorTQPoint());
gc.drawLine(startPos, endPos);
} else {
for (KisPointVector::iterator it = m_points.begin(); it != m_points.end(); ++it) {
@@ -203,8 +203,8 @@ void KisToolPolygon::draw(KisCanvasPainter& gc)
} 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);
@@ -221,13 +221,13 @@ void KisToolPolygon::setup(KActionCollection *collection)
m_action = static_cast<KRadioAction *>(collection->action(name()));
if (m_action == 0) {
- KShortcut shortcut(Qt::Key_Plus);
- shortcut.append(KShortcut(Qt::Key_F9));
+ KShortcut shortcut(TQt::Key_Plus);
+ shortcut.append(KShortcut(TQt::Key_F9));
m_action = new KRadioAction(i18n("&Polygon"),
"tool_polygon",
shortcut,
this,
- SLOT(activate()),
+ TQT_SLOT(activate()),
collection,
name());
Q_CHECK_PTR(m_action);
@@ -238,9 +238,9 @@ void KisToolPolygon::setup(KActionCollection *collection)
}
}
-void KisToolPolygon::keyPress(QKeyEvent *e)
+void KisToolPolygon::keyPress(TQKeyEvent *e)
{
- if (e->key()==Qt::Key_Escape) {
+ if (e->key()==TQt::Key_Escape) {
// erase old lines on canvas
draw();
m_dragging = false;
diff --git a/krita/plugins/tools/tool_polygon/kis_tool_polygon.h b/krita/plugins/tools/tool_polygon/kis_tool_polygon.h
index 7ca24914..f68cae64 100644
--- a/krita/plugins/tools/tool_polygon/kis_tool_polygon.h
+++ b/krita/plugins/tools/tool_polygon/kis_tool_polygon.h
@@ -21,7 +21,7 @@
#ifndef KIS_TOOL_POLYGON_H_
#define KIS_TOOL_POLYGON_H_
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
#include "kis_tool_shape.h"
@@ -35,6 +35,7 @@ class KisToolPolygon : public KisToolShape {
typedef KisToolShape super;
Q_OBJECT
+ TQ_OBJECT
public:
KisToolPolygon();
@@ -52,22 +53,22 @@ public:
virtual void setup(KActionCollection *collection);
virtual enumToolType toolType() { return TOOL_SHAPE; }
- virtual Q_UINT32 priority() { return 4; }
+ virtual TQ_UINT32 priority() { return 4; }
virtual void buttonPress(KisButtonPressEvent *event);
virtual void move(KisMoveEvent *event);
virtual void buttonRelease(KisButtonReleaseEvent *event);
- virtual QString quickHelp() const {
+ virtual TQString quickHelp() const {
return i18n("Shift-click will end the polygon.");
}
virtual void doubleClick(KisDoubleClickEvent * event);
protected:
virtual void paint(KisCanvasPainter& gc);
- virtual void paint(KisCanvasPainter& gc, const QRect& rc);
+ virtual void paint(KisCanvasPainter& gc, const TQRect& rc);
void draw(KisCanvasPainter& gc);
void draw();
void finish();
- virtual void keyPress(QKeyEvent *e);
+ virtual void keyPress(TQKeyEvent *e);
protected:
KisPoint m_dragStart;
KisPoint m_dragEnd;
@@ -75,7 +76,7 @@ protected:
bool m_dragging;
KisImageSP m_currentImage;
private:
- typedef QValueVector<KisPoint> KisPointVector;
+ typedef TQValueVector<KisPoint> KisPointVector;
KisPointVector m_points;
};
diff --git a/krita/plugins/tools/tool_polygon/tool_polygon.cc b/krita/plugins/tools/tool_polygon/tool_polygon.cc
index a1fec49c..81abbb95 100644
--- a/krita/plugins/tools/tool_polygon/tool_polygon.cc
+++ b/krita/plugins/tools/tool_polygon/tool_polygon.cc
@@ -20,7 +20,7 @@
#include <stdlib.h>
#include <vector>
-#include <qpoint.h>
+#include <tqpoint.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -42,14 +42,14 @@ typedef KGenericFactory<ToolPolygon> ToolPolygonFactory;
K_EXPORT_COMPONENT_FACTORY( kritatoolpolygon, ToolPolygonFactory( "krita" ) )
-ToolPolygon::ToolPolygon(QObject *parent, const char *name, const QStringList &)
- : KParts::Plugin(parent, name)
+ToolPolygon::ToolPolygon(TQObject *tqparent, const char *name, const TQStringList &)
+ : KParts::Plugin(tqparent, name)
{
setInstance(ToolPolygonFactory::instance());
- if ( parent->inherits("KisToolRegistry") )
+ if ( tqparent->inherits("KisToolRegistry") )
{
- KisToolRegistry * r = dynamic_cast<KisToolRegistry*>( parent );
+ KisToolRegistry * r = dynamic_cast<KisToolRegistry*>( tqparent );
r->add(new KisToolPolygonFactory());
}
diff --git a/krita/plugins/tools/tool_polygon/tool_polygon.h b/krita/plugins/tools/tool_polygon/tool_polygon.h
index 6249d935..ec816736 100644
--- a/krita/plugins/tools/tool_polygon/tool_polygon.h
+++ b/krita/plugins/tools/tool_polygon/tool_polygon.h
@@ -27,10 +27,11 @@
class ToolPolygon : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- ToolPolygon(QObject *parent, const char *name, const QStringList &);
+ ToolPolygon(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~ToolPolygon();
};