From f008adb5a77e094eaf6abf3fc0f36958e66896a5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 25 Jun 2011 05:28:35 +0000 Subject: 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 --- .../plugins/tools/defaulttools/kis_tool_rectangle.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'krita/plugins/tools/defaulttools/kis_tool_rectangle.cc') diff --git a/krita/plugins/tools/defaulttools/kis_tool_rectangle.cc b/krita/plugins/tools/defaulttools/kis_tool_rectangle.cc index 13b81c7f1..741b5051b 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_rectangle.cc +++ b/krita/plugins/tools/defaulttools/kis_tool_rectangle.cc @@ -21,7 +21,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include #include @@ -76,23 +76,23 @@ void KisToolRectangle::move(KisMoveEvent *event) // erase old lines on canvas draw(m_dragStart, m_dragEnd); // move (alt) or resize rectangle - if (event->state() & Qt::AltButton) { + if (event->state() & TQt::AltButton) { KisPoint trans = event->pos() - m_dragEnd; m_dragStart += trans; m_dragEnd += trans; } else { - KisPoint diag = event->pos() - (event->state() & Qt::ControlButton + KisPoint diag = event->pos() - (event->state() & TQt::ControlButton ? m_dragCenter : m_dragStart); // square? - if (event->state() & Qt::ShiftButton) { - double size = QMAX(fabs(diag.x()), fabs(diag.y())); + if (event->state() & TQt::ShiftButton) { + double size = TQMAX(fabs(diag.x()), fabs(diag.y())); double w = diag.x() < 0 ? -size : size; double h = diag.y() < 0 ? -size : size; diag = KisPoint(w, h); } // resize around center point? - if (event->state() & Qt::ControlButton) { + if (event->state() & TQt::ControlButton) { m_dragStart = m_dragCenter - diag; m_dragEnd = m_dragCenter + diag; } else { @@ -161,8 +161,8 @@ void KisToolRectangle::draw(const KisPoint& start, const KisPoint& end ) KisCanvas *canvas = controller->kiscanvas(); KisCanvasPainter p (canvas); - p.setRasterOp (Qt::NotROP); - p.drawRect (QRect (controller->windowToView (start).floorQPoint(), controller->windowToView (end).floorQPoint())); + p.setRasterOp (TQt::NotROP); + p.drawRect (TQRect (controller->windowToView (start).floorTQPoint(), controller->windowToView (end).floorTQPoint())); p.end (); } @@ -173,9 +173,9 @@ void KisToolRectangle::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Rectangle"), "tool_rectangle", - Qt::Key_F6, + TQt::Key_F6, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); m_action->setToolTip(i18n("Draw a rectangle")); -- cgit v1.2.3