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 --- karbon/tools/vpolylinetool.cc | 46 +++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'karbon/tools/vpolylinetool.cc') diff --git a/karbon/tools/vpolylinetool.cc b/karbon/tools/vpolylinetool.cc index 59b72a0e..673503f9 100644 --- a/karbon/tools/vpolylinetool.cc +++ b/karbon/tools/vpolylinetool.cc @@ -18,9 +18,9 @@ */ -#include -#include -#include +#include +#include +#include #include @@ -35,7 +35,7 @@ #include #include #include "vpolylinetool.h" -#include +#include #include #include @@ -44,7 +44,7 @@ VPolylineTool::VPolylineTool( KarbonView *view ) { m_bezierPoints.setAutoDelete( true ); registerTool( this ); - m_crossCursor = new QCursor( VCursor::createCursor( VCursor::CrossHair ) ); + m_crossCursor = new TQCursor( VCursor::createCursor( VCursor::CrossHair ) ); } VPolylineTool::~VPolylineTool() @@ -52,10 +52,10 @@ VPolylineTool::~VPolylineTool() delete m_crossCursor; } -QString +TQString VPolylineTool::contextHelp() { - QString s = i18n( "Polyline tool:
" ); + TQString s = i18n( "Polyline tool:
" ); s += i18n( "- Click to add a node and drag to set its bezier vector.
" ); s += i18n( "- Press Ctrl while dragging to edit the previous bezier vector.
" ); s += i18n( "- Press Shift while dragging to change the curve in a straight line.
" ); @@ -76,7 +76,7 @@ VPolylineTool::activate() m_bezierPoints.clear(); m_close = false; - connect( view()->part()->commandHistory(), SIGNAL(commandExecuted()), this, SLOT(commandExecuted()) ); + connect( view()->part()->commandHistory(), TQT_SIGNAL(commandExecuted()), this, TQT_SLOT(commandExecuted()) ); } void @@ -145,14 +145,14 @@ VPolylineTool::deactivate() createObject(); - disconnect( view()->part()->commandHistory(), SIGNAL(commandExecuted()), this, SLOT(commandExecuted()) ); + disconnect( view()->part()->commandHistory(), TQT_SIGNAL(commandExecuted()), this, TQT_SLOT(commandExecuted()) ); } void VPolylineTool::draw() { VPainter* painter = view()->painterFactory()->editpainter(); - painter->setRasterOp( Qt::NotROP ); + painter->setRasterOp( TQt::NotROP ); if( m_bezierPoints.count() > 2 ) { @@ -173,21 +173,21 @@ VPolylineTool::drawBezierVector( KoPoint& start, KoPoint& end ) float zoomFactor = view()->zoom(); - painter->setRasterOp( Qt::NotROP ); + painter->setRasterOp( TQt::NotROP ); painter->newPath(); -/* VStroke stroke( Qt::blue, 0L, 1.0 ); - QValueList array; +/* VStroke stroke( TQt::blue, 0L, 1.0 ); + TQValueList array; array << 2.0 << 3.0; stroke.dashPattern().setArray( array );*/ - painter->setPen( Qt::DotLine /*stroke*/ ); - painter->setBrush( Qt::NoBrush ); + painter->setPen( TQt::DotLine /*stroke*/ ); + painter->setBrush( TQt::NoBrush ); painter->moveTo( start ); painter->lineTo( end ); painter->strokePath(); - painter->setRasterOp( Qt::XorROP ); + painter->setRasterOp( TQt::XorROP ); painter->newPath(); - painter->setPen( Qt::yellow ); + painter->setPen( TQt::yellow ); float width = 2.0; @@ -262,10 +262,10 @@ VPolylineTool::mouseButtonRelease() VPainter* painter = view()->painterFactory()->editpainter(); painter->save(); painter->setZoomFactor( view()->zoom() ); - painter->setRasterOp( Qt::XorROP ); - VStroke stroke( Qt::yellow, 0L, 1.0 ); + painter->setRasterOp( TQt::XorROP ); + VStroke stroke( TQt::yellow, 0L, 1.0 ); painter->setPen( stroke ); - painter->setBrush( Qt::yellow ); + painter->setBrush( TQt::yellow ); painter->newPath(); painter->drawNode( m_lastVectorStart, 2 ); painter->strokePath(); @@ -486,9 +486,9 @@ VPolylineTool::setup( KActionCollection *collection ) if( m_action == 0 ) { - KShortcut shortcut( Qt::Key_Plus ); - shortcut.append( KShortcut( Qt::Key_F9 ) ); - m_action = new KRadioAction( i18n( "Polyline Tool" ), "14_polyline", shortcut, this, SLOT( activate() ), collection, name() ); + KShortcut shortcut( TQt::Key_Plus ); + shortcut.append( KShortcut( TQt::Key_F9 ) ); + m_action = new KRadioAction( i18n( "Polyline Tool" ), "14_polyline", shortcut, this, TQT_SLOT( activate() ), collection, name() ); m_action->setToolTip( i18n( "Polyline" ) ); m_action->setExclusiveGroup( "freehand" ); //m_ownAction = true; -- cgit v1.2.1