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/core/vselection.cc | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'karbon/core/vselection.cc') diff --git a/karbon/core/vselection.cc b/karbon/core/vselection.cc index ec9626ce..30398ec4 100644 --- a/karbon/core/vselection.cc +++ b/karbon/core/vselection.cc @@ -32,11 +32,11 @@ uint VSelection::m_handleNodeSize = 3; -VSelection::VSelection( VObject* parent ) - : VObject( parent ), m_showhandle( true ) +VSelection::VSelection( VObject* tqparent ) + : VObject( tqparent ), m_showhandle( true ) { m_handleRect = new KoRect[ 10 ]; - setStroke( VStroke( VColor( Qt::black ) ) ); + setStroke( VStroke( VColor( TQt::black ) ) ); setFill( VFill() ); m_selectObjects = true; @@ -79,7 +79,7 @@ VSelection::take( VObject& object ) m_objects.removeRef( &object ); if( object.state() >= selected ) object.setState( normal ); - invalidateBoundingBox(); + tqinvalidateBoundingBox(); } bool @@ -90,7 +90,7 @@ VSelection::take( const KoRect& rect, bool selectObjects, bool exclusive ) if( selectObjects ) { VSelectObjects op( m_objects, rect, false ); - if( op.visit( *static_cast( parent() ) ) ) + if( op.visit( *static_cast( tqparent() ) ) ) { selectNodes(); success = true; @@ -112,7 +112,7 @@ VSelection::take( const KoRect& rect, bool selectObjects, bool exclusive ) } } - invalidateBoundingBox(); + tqinvalidateBoundingBox(); return success; } @@ -123,10 +123,10 @@ VSelection::append() clear(); VSelectObjects op( m_objects ); - op.visit( *static_cast( parent() ) ); + op.visit( *static_cast( tqparent() ) ); selectNodes(); - invalidateBoundingBox(); + tqinvalidateBoundingBox(); } void @@ -135,10 +135,10 @@ VSelection::append( VObject* object ) // only append if item is not deleted or not already in list if( object->state() != deleted ) { - if( ! m_objects.containsRef( object ) ) + if( ! m_objects.tqcontainsRef( object ) ) m_objects.append( object ); object->setState( selected ); - invalidateBoundingBox(); + tqinvalidateBoundingBox(); } } @@ -159,7 +159,7 @@ VSelection::append( const KoRect& rect, bool selectObjects, bool exclusive ) { //m_objects.clear(); VSelectObjects op( m_objects, rect ); - if( op.visit( *static_cast( parent() ) ) ) + if( op.visit( *static_cast( tqparent() ) ) ) { selectNodes(); success = true; @@ -186,7 +186,7 @@ VSelection::append( const KoRect& rect, bool selectObjects, bool exclusive ) take( *( jtr.current() ) ); } - invalidateBoundingBox(); + tqinvalidateBoundingBox(); return success; } @@ -206,7 +206,7 @@ VSelection::clear() } m_objects.clear(); - invalidateBoundingBox(); + tqinvalidateBoundingBox(); } void @@ -222,8 +222,8 @@ VSelection::draw( VPainter* painter, double zoomFactor ) const const KoRect& rect = boundingBox(); // calculate displaycoords of big handle rect: - m_handleRect[ 0 ].setCoords( qRound( rect.left() ), qRound( rect.top() ), - qRound( rect.right() ), qRound( rect.bottom() ) ); + m_handleRect[ 0 ].setCoords( tqRound( rect.left() ), tqRound( rect.top() ), + tqRound( rect.right() ), tqRound( rect.bottom() ) ); KoPoint center = m_handleRect[ 0 ].center(); @@ -242,18 +242,18 @@ VSelection::draw( VPainter* painter, double zoomFactor ) const if( !m_showhandle ) return; // draw handle rect: - painter->setPen( Qt::blue.light() ); - painter->setBrush( Qt::NoBrush ); + painter->setPen( TQt::blue.light() ); + painter->setBrush( TQt::NoBrush ); painter->drawRect( KoRect( m_handleRect[ 0 ].x() * zoomFactor, m_handleRect[ 0 ].y() * zoomFactor, m_handleRect[ 0 ].width() * zoomFactor, m_handleRect[ 0 ].height() * zoomFactor ) ); - painter->setPen( Qt::blue.light() ); + painter->setPen( TQt::blue.light() ); // draw nodes: if( state() == VObject::selected ) { - painter->setPen( Qt::blue.light() ); - painter->setBrush( Qt::white ); + painter->setPen( TQt::blue.light() ); + painter->setBrush( TQt::white ); KoRect temp; for( uint i = node_lt; i <= node_rb; ++i ) @@ -295,14 +295,14 @@ VSelection::handleNode( const KoPoint &point ) const { for( uint i = node_lt; i <= node_rb; ++i ) { - if( m_handleRect[i].contains( point ) ) + if( m_handleRect[i].tqcontains( point ) ) return static_cast( i ); } return node_none; } -QPtrList +TQPtrList VSelection::getSegments( const KoRect& rect ) { VTestNodes op( rect ); -- cgit v1.2.1