diff options
Diffstat (limited to 'krita/plugins/tools/tool_polyline')
4 files changed, 34 insertions, 32 deletions
diff --git a/krita/plugins/tools/tool_polyline/kis_tool_polyline.cc b/krita/plugins/tools/tool_polyline/kis_tool_polyline.cc index 2f7a8e59..baeb946d 100644 --- a/krita/plugins/tools/tool_polyline/kis_tool_polyline.cc +++ b/krita/plugins/tools/tool_polyline/kis_tool_polyline.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> @@ -68,7 +68,7 @@ void KisToolPolyline::update (KisCanvasSubject *subject) void KisToolPolyline::buttonPress(KisButtonPressEvent *event) { if (m_currentImage) { - if (event->button() == LeftButton && event->state() != Qt::ShiftButton ) { + if (event->button() == LeftButton && event->state() != TQt::ShiftButton ) { m_dragging = true; @@ -82,7 +82,7 @@ void KisToolPolyline::buttonPress(KisButtonPressEvent *event) m_dragEnd = event->pos(); draw(); } - } else if (event->button() == LeftButton && event->state() == Qt::ShiftButton ) { + } else if (event->button() == LeftButton && event->state() == TQt::ShiftButton ) { finish(); } } @@ -176,7 +176,7 @@ void KisToolPolyline::paint(KisCanvasPainter& gc) draw(gc); } -void KisToolPolyline::paint(KisCanvasPainter& gc, const QRect&) +void KisToolPolyline::paint(KisCanvasPainter& gc, const TQRect&) { draw(gc); } @@ -197,19 +197,19 @@ void KisToolPolyline::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) { @@ -220,8 +220,8 @@ void KisToolPolyline::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); @@ -236,13 +236,13 @@ void KisToolPolyline::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("&Polyline"), "polyline", shortcut, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); @@ -253,14 +253,14 @@ void KisToolPolyline::setup(KActionCollection *collection) } } -QString KisToolPolyline::quickHelp() const +TQString KisToolPolyline::quickHelp() const { return i18n("Press shift-mouseclick to end the polyline."); } -void KisToolPolyline::keyPress(QKeyEvent *e) +void KisToolPolyline::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_polyline/kis_tool_polyline.h b/krita/plugins/tools/tool_polyline/kis_tool_polyline.h index 5dfff695..b234c53b 100644 --- a/krita/plugins/tools/tool_polyline/kis_tool_polyline.h +++ b/krita/plugins/tools/tool_polyline/kis_tool_polyline.h @@ -21,8 +21,8 @@ #ifndef KIS_TOOL_POLYLINE_H_ #define KIS_TOOL_POLYLINE_H_ -#include <qvaluevector.h> -#include <qstring.h> +#include <tqvaluevector.h> +#include <tqstring.h> #include "kis_tool_paint.h" #include "kis_point.h" @@ -38,6 +38,7 @@ class KisToolPolyline : public KisToolPaint { typedef KisToolPaint super; Q_OBJECT + TQ_OBJECT public: KisToolPolyline(); @@ -55,15 +56,15 @@ public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_SHAPE; } - virtual Q_UINT32 priority() { return 5; } + virtual TQ_UINT32 priority() { return 5; } virtual void buttonPress(KisButtonPressEvent *event); virtual void doubleClick(KisDoubleClickEvent *e); virtual void move(KisMoveEvent *event); virtual void buttonRelease(KisButtonReleaseEvent *event); - virtual QString quickHelp() const; + virtual TQString quickHelp() const; void finish(); - virtual void keyPress(QKeyEvent *e); + virtual void keyPress(TQKeyEvent *e); public slots: @@ -71,7 +72,7 @@ public slots: 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(); @@ -82,7 +83,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_polyline/tool_polyline.cc b/krita/plugins/tools/tool_polyline/tool_polyline.cc index ae1fdda5..830a2d22 100644 --- a/krita/plugins/tools/tool_polyline/tool_polyline.cc +++ b/krita/plugins/tools/tool_polyline/tool_polyline.cc @@ -20,7 +20,7 @@ #include <stdlib.h> #include <vector> -#include <qpoint.h> +#include <tqpoint.h> #include <klocale.h> #include <kiconloader.h> @@ -43,14 +43,14 @@ typedef KGenericFactory<ToolPolyline> ToolPolylineFactory; K_EXPORT_COMPONENT_FACTORY( kritatoolpolyline, ToolPolylineFactory( "krita" ) ) -ToolPolyline::ToolPolyline(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +ToolPolyline::ToolPolyline(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(ToolPolylineFactory::instance()); - if ( parent->inherits("KisToolRegistry") ) + if ( tqparent->inherits("KisToolRegistry") ) { - KisToolRegistry * r = dynamic_cast<KisToolRegistry*>(parent); + KisToolRegistry * r = dynamic_cast<KisToolRegistry*>(tqparent); r->add(new KisToolPolylineFactory()); } diff --git a/krita/plugins/tools/tool_polyline/tool_polyline.h b/krita/plugins/tools/tool_polyline/tool_polyline.h index 14987487..9f483363 100644 --- a/krita/plugins/tools/tool_polyline/tool_polyline.h +++ b/krita/plugins/tools/tool_polyline/tool_polyline.h @@ -29,8 +29,9 @@ class KisView; class ToolPolyline : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - ToolPolyline(QObject *parent, const char *name, const QStringList &); + ToolPolyline(TQObject *tqparent, const char *name, const TQStringList &); virtual ~ToolPolyline(); private: |