diff options
Diffstat (limited to 'krita/plugins/tools/defaulttools/kis_tool_line.cc')
| -rw-r--r-- | krita/plugins/tools/defaulttools/kis_tool_line.cc | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/krita/plugins/tools/defaulttools/kis_tool_line.cc b/krita/plugins/tools/defaulttools/kis_tool_line.cc index cbdf54487..a335f9184 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_line.cc +++ b/krita/plugins/tools/defaulttools/kis_tool_line.cc @@ -20,9 +20,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qpainter.h> -#include <qlayout.h> -#include <qwidget.h> +#include <tqpainter.h> +#include <tqlayout.h> +#include <tqwidget.h> #include <kdebug.h> #include <kaction.h> @@ -72,10 +72,10 @@ void KisToolLine::update(KisCanvasSubject *subject) void KisToolLine::paint(KisCanvasPainter& gc) { if (m_dragging) - paintLine(gc, QRect()); + paintLine(gc, TQRect()); } -void KisToolLine::paint(KisCanvasPainter& gc, const QRect& rc) +void KisToolLine::paint(KisCanvasPainter& gc, const TQRect& rc) { if (m_dragging) paintLine(gc, rc); @@ -87,7 +87,7 @@ void KisToolLine::buttonPress(KisButtonPressEvent *e) if (!m_subject->currentBrush()) return; - if (e->button() == QMouseEvent::LeftButton) { + if (e->button() == TQMouseEvent::LeftButton) { m_dragging = true; //KisCanvasController *controller = m_subject->canvasController(); m_startPos = e->pos(); //controller->windowToView(e->pos()); @@ -102,11 +102,11 @@ void KisToolLine::move(KisMoveEvent *e) paintLine(); //KisCanvasController *controller = m_subject->canvasController(); - if (e->state() & Qt::AltButton) { + if (e->state() & TQt::AltButton) { KisPoint trans = e->pos() - m_endPos; m_startPos += trans; m_endPos += trans; - } else if (e->state() & Qt::ShiftButton) + } else if (e->state() & TQt::ShiftButton) m_endPos = straightLine(e->pos()); else m_endPos = e->pos();//controller->windowToView(e->pos()); @@ -116,7 +116,7 @@ void KisToolLine::move(KisMoveEvent *e) void KisToolLine::buttonRelease(KisButtonReleaseEvent *e) { - if (m_dragging && e->button() == QMouseEvent::LeftButton) { + if (m_dragging && e->button() == TQMouseEvent::LeftButton) { m_dragging = false; KisCanvasController *controller = m_subject->canvasController(); KisImageSP img = m_subject->currentImg(); @@ -127,7 +127,7 @@ void KisToolLine::buttonRelease(KisButtonReleaseEvent *e) return; } - if ((e->state() & Qt::ShiftButton) == Qt::ShiftButton) { + if ((e->state() & TQt::ShiftButton) == TQt::ShiftButton) { m_endPos = straightLine(e->pos()); } else { @@ -196,19 +196,19 @@ void KisToolLine::paintLine() KisCanvasController *controller = m_subject->canvasController(); KisCanvas *canvas = controller->kiscanvas(); KisCanvasPainter gc(canvas); - QRect rc; + TQRect rc; paintLine(gc, rc); } } -void KisToolLine::paintLine(KisCanvasPainter& gc, const QRect&) +void KisToolLine::paintLine(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); KisPoint start; KisPoint end; @@ -223,9 +223,9 @@ void KisToolLine::paintLine(KisCanvasPainter& gc, const QRect&) // end.setY((end.y() - start.y())); // start *= m_subject->zoomFactor(); // end *= m_subject->zoomFactor(); - gc.setRasterOp(Qt::NotROP); + gc.setRasterOp(TQt::NotROP); gc.setPen(pen); - gc.drawLine(start.floorQPoint(), end.floorQPoint()); + gc.drawLine(start.floorTQPoint(), end.floorTQPoint()); gc.setRasterOp(op); gc.setPen(old); } @@ -237,8 +237,8 @@ void KisToolLine::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Line"), - "tool_line", Qt::Key_L, this, - SLOT(activate()), collection, + "tool_line", TQt::Key_L, this, + TQT_SLOT(activate()), collection, name()); m_action->setToolTip(i18n("Draw a line")); m_action->setExclusiveGroup("tools"); @@ -246,7 +246,7 @@ void KisToolLine::setup(KActionCollection *collection) } } -QString KisToolLine::quickHelp() const { +TQString KisToolLine::quickHelp() const { return i18n("Alt+Drag will move the origin of the currently displayed line around, Shift+Drag will force you to draw straight lines"); } |
