diff options
Diffstat (limited to 'karbon/tools/vgradienttool.cc')
-rw-r--r-- | karbon/tools/vgradienttool.cc | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/karbon/tools/vgradienttool.cc b/karbon/tools/vgradienttool.cc index dbd82720..9c7274ea 100644 --- a/karbon/tools/vgradienttool.cc +++ b/karbon/tools/vgradienttool.cc @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qcursor.h> -#include <qlabel.h> +#include <tqcursor.h> +#include <tqlabel.h> #include <klocale.h> @@ -64,7 +64,7 @@ VGradientTool::activate() m_active = true; m_state = normal; view()->statusMessage()->setText( i18n( "Gradient" ) ); - view()->setCursor( QCursor( Qt::crossCursor ) ); + view()->setCursor( TQCursor( TQt::crossCursor ) ); VTool::activate(); if( view() ) @@ -75,10 +75,10 @@ VGradientTool::activate() VStrokeFillPreview* preview = view()->strokeFillPreview(); if( preview ) { - connect( preview, SIGNAL( fillSelected() ), this, SLOT( targetChanged() ) ); - connect( preview, SIGNAL( strokeSelected() ), this, SLOT( targetChanged() ) ); + connect( preview, TQT_SIGNAL( fillSelected() ), this, TQT_SLOT( targetChanged() ) ); + connect( preview, TQT_SIGNAL( strokeSelected() ), this, TQT_SLOT( targetChanged() ) ); } - view()->repaintAll( view()->part()->document().selection()->boundingBox() ); + view()->tqrepaintAll( view()->part()->document().selection()->boundingBox() ); } } @@ -94,23 +94,23 @@ VGradientTool::deactivate() VStrokeFillPreview* preview = view()->strokeFillPreview(); if( preview ) { - disconnect( preview, SIGNAL( fillSelected() ), this, SLOT( targetChanged() ) ); - disconnect( preview, SIGNAL( strokeSelected() ), this, SLOT( targetChanged() ) ); + disconnect( preview, TQT_SIGNAL( fillSelected() ), this, TQT_SLOT( targetChanged() ) ); + disconnect( preview, TQT_SIGNAL( strokeSelected() ), this, TQT_SLOT( targetChanged() ) ); } - view()->repaintAll( view()->part()->document().selection()->boundingBox() ); + view()->tqrepaintAll( view()->part()->document().selection()->boundingBox() ); } } -QString +TQString VGradientTool::statusText() { return i18n( "Gradient Tool" ); } -QString +TQString VGradientTool::contextHelp() { - QString s = i18n( "<qt><b>Gradient tool:</b><br>" ); + TQString s = i18n( "<qt><b>Gradient tool:</b><br>" ); s += i18n( "<i>Click and drag</i> to choose the gradient vector.<br>" ); s += i18n( "<i>Click and drag</i> a gradient vector handle to change the gradient vector.<br>" ); s += i18n( "<i>Shift click and drag</i> to move the radial gradient focal point.<br>" ); @@ -194,9 +194,9 @@ VGradientTool::draw( VPainter* painter ) m_vector = KoRect( e.x()-m_handleSize, e.y()-m_handleSize, 2*m_handleSize, 2*m_handleSize ); m_center = KoRect( f.x()-m_handleSize, f.y()-m_handleSize, 2*m_handleSize, 2*m_handleSize ); - painter->setPen( Qt::blue.light() ); - painter->setBrush( Qt::blue.light() ); - painter->setRasterOp( Qt::XorROP ); + painter->setPen( TQt::blue.light() ); + painter->setBrush( TQt::blue.light() ); + painter->setRasterOp( TQt::XorROP ); // draw the gradient vector painter->newPath(); @@ -231,9 +231,9 @@ VGradientTool::draw() return; VPainter *painter = view()->painterFactory()->editpainter(); - painter->setRasterOp( Qt::NotROP ); + painter->setRasterOp( TQt::NotROP ); - painter->setPen( Qt::DotLine ); + painter->setPen( TQt::DotLine ); painter->newPath(); // differentiate between moving a handle and creating a complete new vector @@ -289,16 +289,16 @@ VGradientTool::mouseButtonPress() m_current = first(); // set the apropriate editing state - if( m_center.contains( m_current ) && shiftPressed()) + if( m_center.tqcontains( m_current ) && shiftPressed()) { m_state = moveCenter; } - else if( m_origin.contains( m_current ) ) + else if( m_origin.tqcontains( m_current ) ) { m_state = moveOrigin; m_fixed = m_vector.center(); } - else if( m_vector.contains( m_current ) ) + else if( m_vector.tqcontains( m_current ) ) { m_state = moveVector; m_fixed = m_origin.center(); @@ -466,7 +466,7 @@ VGradientTool::cancel() bool VGradientTool::showDialog() const { - return m_optionsWidget->exec() == QDialog::Accepted; + return m_optionsWidget->exec() == TQDialog::Accepted; } void @@ -476,7 +476,7 @@ VGradientTool::setup( KActionCollection *collection ) if( m_action == 0 ) { - m_action = new KRadioAction( i18n( "Gradient Tool" ), "14_gradient", Qt::Key_G, this, SLOT( activate() ), collection, name() ); + m_action = new KRadioAction( i18n( "Gradient Tool" ), "14_gradient", TQt::Key_G, this, TQT_SLOT( activate() ), collection, name() ); m_action->setToolTip( i18n( "Gradient" ) ); m_action->setExclusiveGroup( "misc" ); //m_ownAction = true; @@ -489,19 +489,19 @@ VGradientTool::setCursor() const if( !view() ) return; // set a different cursor if mouse is inside the handle rects - if( m_origin.contains( last() ) || m_vector.contains( last() ) || m_center.contains( last() ) ) - view()->setCursor( QCursor( Qt::SizeAllCursor ) ); + if( m_origin.tqcontains( last() ) || m_vector.tqcontains( last() ) || m_center.tqcontains( last() ) ) + view()->setCursor( TQCursor( TQt::SizeAllCursor ) ); else - view()->setCursor( QCursor( Qt::arrowCursor ) ); + view()->setCursor( TQCursor( TQt::arrowCursor ) ); } bool -VGradientTool::keyReleased( Qt::Key key ) +VGradientTool::keyReleased( TQt::Key key ) { // increase/decrease the handle size switch( key ) { - case Qt::Key_I: + case TQt::Key_I: if( shiftPressed() ) m_handleSize++; else if( m_handleSize > 3 ) @@ -511,7 +511,7 @@ VGradientTool::keyReleased( Qt::Key key ) } if( view() ) - view()->repaintAll( view()->part()->document().selection()->boundingBox() ); + view()->tqrepaintAll( view()->part()->document().selection()->boundingBox() ); return true; } @@ -520,7 +520,7 @@ void VGradientTool::targetChanged() { if( view() ) - view()->repaintAll( view()->part()->document().selection()->boundingBox() ); + view()->tqrepaintAll( view()->part()->document().selection()->boundingBox() ); } #include "vgradienttool.moc" |