diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /karbon/visitors | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
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
Diffstat (limited to 'karbon/visitors')
-rw-r--r-- | karbon/visitors/vdrawselection.cc | 32 | ||||
-rw-r--r-- | karbon/visitors/vselectiondesc.h | 10 | ||||
-rw-r--r-- | karbon/visitors/vselectnodes.cc | 10 | ||||
-rw-r--r-- | karbon/visitors/vselectnodes.h | 4 | ||||
-rw-r--r-- | karbon/visitors/vselectobjects.cc | 16 | ||||
-rw-r--r-- | karbon/visitors/vtransformnodes.cc | 6 | ||||
-rw-r--r-- | karbon/visitors/vtransformnodes.h | 6 |
7 files changed, 42 insertions, 42 deletions
diff --git a/karbon/visitors/vdrawselection.cc b/karbon/visitors/vdrawselection.cc index ad597027..dbd93247 100644 --- a/karbon/visitors/vdrawselection.cc +++ b/karbon/visitors/vdrawselection.cc @@ -39,7 +39,7 @@ VDrawSelection::visitVPath( VPath &composite ) m_painter->save(); - m_painter->setPen( Qt::SolidLine ); + m_painter->setPen( TQt::SolidLine ); const bool editnodes = composite.state() == VObject::edit && m_nodeediting; @@ -53,10 +53,10 @@ VDrawSelection::visitVPath( VPath &composite ) m_painter->newPath(); if( editnodes ) - m_painter->setRasterOp( Qt::XorROP ); + m_painter->setRasterOp( TQt::XorROP ); - m_painter->setPen( editnodes ? Qt::yellow : Qt::blue ); - m_painter->setBrush( Qt::NoBrush ); + m_painter->setPen( editnodes ? TQt::yellow : TQt::blue ); + m_painter->setBrush( TQt::NoBrush ); for( itr.toFirst(); itr.current(); ++itr ) { @@ -89,7 +89,7 @@ VDrawSelection::visitVPath( VPath &composite ) for( ; jtr.current(); ++jtr ) { if( editnodes ) - m_painter->setRasterOp( Qt::XorROP ); + m_painter->setRasterOp( TQt::XorROP ); VColor color; color.set( 0.5, 0.5, 1.0 ); @@ -100,12 +100,12 @@ VDrawSelection::visitVPath( VPath &composite ) if( !editnodes ) { m_painter->setPen( stroke ); - m_painter->setPen( Qt::blue ); + m_painter->setPen( TQt::blue ); } else - m_painter->setPen( Qt::yellow ); + m_painter->setPen( TQt::yellow ); - m_painter->setBrush( Qt::NoBrush ); + m_painter->setBrush( TQt::NoBrush ); if( ( editnodes || composite.state() == VObject::selected && m_nodeediting ) && jtr.current()->isCurve() ) @@ -124,7 +124,7 @@ VDrawSelection::visitVPath( VPath &composite ) m_painter->strokePath(); // Draw control node2: m_painter->newPath(); - m_painter->setBrush( editnodes ? Qt::yellow : Qt::blue ); + m_painter->setBrush( editnodes ? TQt::yellow : TQt::blue ); m_painter->drawNode( curr->point( curr->degree()-2 ), m_nodeSize ); m_painter->strokePath(); } @@ -138,21 +138,21 @@ VDrawSelection::visitVPath( VPath &composite ) m_painter->strokePath(); // Draw control node1: m_painter->newPath(); - m_painter->setBrush( editnodes ? Qt::yellow : Qt::blue ); + m_painter->setBrush( editnodes ? TQt::yellow : TQt::blue ); m_painter->drawNode( curr->point( 0 ), m_nodeSize ); m_painter->strokePath(); } } // Draw knot. - m_painter->setPen( editnodes ? Qt::yellow : Qt::blue ); + m_painter->setPen( editnodes ? TQt::yellow : TQt::blue ); if( !m_nodeediting ) - m_painter->setBrush( Qt::blue ); + m_painter->setBrush( TQt::blue ); else if( jtr.current()->knotIsSelected() ) - m_painter->setBrush( editnodes ? Qt::yellow : Qt::blue ); + m_painter->setBrush( editnodes ? TQt::yellow : TQt::blue ); else - m_painter->setBrush( Qt::white ); + m_painter->setBrush( TQt::white ); m_painter->drawNode( jtr.current()->knot(), m_nodeSize ); } @@ -162,8 +162,8 @@ VDrawSelection::visitVPath( VPath &composite ) // Draw center node. if( composite.drawCenterNode() && composite.state() == VObject::selected && !m_nodeediting ) { - m_painter->setPen( Qt::NoPen ); - m_painter->setBrush( Qt::blue.light() ); + m_painter->setPen( TQt::NoPen ); + m_painter->setBrush( TQt::blue.light() ); m_painter->drawNode( composite.boundingBox().center(), m_nodeSize ); } diff --git a/karbon/visitors/vselectiondesc.h b/karbon/visitors/vselectiondesc.h index c019c107..036d2b85 100644 --- a/karbon/visitors/vselectiondesc.h +++ b/karbon/visitors/vselectiondesc.h @@ -21,7 +21,7 @@ #define __VSELECTIONDESC_H__ #include "vvisitor.h" -#include <qstring.h> +#include <tqstring.h> #include <koffice_export.h> /** * This visitors visits structures and tries to capture relevant object type info @@ -42,12 +42,12 @@ public: virtual void visitVText( VText& ); virtual void visitVImage( VImage& ); - QString description() { return m_desc; } - QString shortDescription() { return m_shortdesc; } + TQString description() { return m_desc; } + TQString shortDescription() { return m_shortdesc; } private: - QString m_desc; - QString m_shortdesc; + TQString m_desc; + TQString m_shortdesc; }; #endif diff --git a/karbon/visitors/vselectnodes.cc b/karbon/visitors/vselectnodes.cc index 00f56de3..28789956 100644 --- a/karbon/visitors/vselectnodes.cc +++ b/karbon/visitors/vselectnodes.cc @@ -54,7 +54,7 @@ VSelectNodes::visitVSubpath( VSubpath& path ) // select all control points inside the selection rect for( int i = 0; i < curr->degree()-1; ++i ) { - if( m_rect.contains( curr->point( i ) ) ) + if( m_rect.tqcontains( curr->point( i ) ) ) { curr->selectPoint( i, m_select ); setSuccess(); @@ -81,7 +81,7 @@ VSelectNodes::visitVSubpath( VSubpath& path ) } } - if( m_rect.contains( curr->knot() ) ) + if( m_rect.tqcontains( curr->knot() ) ) { curr->selectKnot( m_select ); // select the last control point before the knot, if segment is curve @@ -101,7 +101,7 @@ VSelectNodes::visitVSubpath( VSubpath& path ) void VSelectNodes::visitVLayer( VLayer& layer ) { - VDocument* doc = (VDocument*)layer.parent(); + VDocument* doc = (VDocument*)layer.tqparent(); if ( ( layer.state() != VObject::deleted ) && ( ( doc->selectionMode() == VDocument::AllLayers ) || ( doc->selectionMode() == VDocument::VisibleLayers && ( layer.state() == VObject::normal || layer.state() == VObject::normal_locked ) ) || @@ -122,7 +122,7 @@ VTestNodes::visitVSubpath( VSubpath& path ) while( path.current() ) { for( int i = 0; i < path.current()->degree(); i++ ) - if( m_rect.contains( path.current()->point( i ) ) ) //&& + if( m_rect.tqcontains( path.current()->point( i ) ) ) //&& //path.current()->pointIsSelected( i ) ) { m_segments.append( path.current() ); @@ -138,7 +138,7 @@ VTestNodes::visitVSubpath( VSubpath& path ) void VTestNodes::visitVLayer( VLayer& layer ) { - VDocument* doc = (VDocument*)layer.parent(); + VDocument* doc = (VDocument*)layer.tqparent(); if ( ( layer.state() != VObject::deleted ) && ( ( doc->selectionMode() == VDocument::AllLayers ) || ( doc->selectionMode() == VDocument::VisibleLayers && ( layer.state() == VObject::normal || layer.state() == VObject::normal_locked ) ) || diff --git a/karbon/visitors/vselectnodes.h b/karbon/visitors/vselectnodes.h index c4efc93c..d1e95c8f 100644 --- a/karbon/visitors/vselectnodes.h +++ b/karbon/visitors/vselectnodes.h @@ -59,11 +59,11 @@ public: virtual void visitVSubpath( VSubpath& path ); virtual void visitVLayer( VLayer& layer ); - QPtrList<VSegment> &result() { return m_segments; } + TQPtrList<VSegment> &result() { return m_segments; } private: KoRect m_rect; - QPtrList<VSegment> m_segments; + TQPtrList<VSegment> m_segments; }; #endif diff --git a/karbon/visitors/vselectobjects.cc b/karbon/visitors/vselectobjects.cc index 060eeacb..d64900db 100644 --- a/karbon/visitors/vselectobjects.cc +++ b/karbon/visitors/vselectobjects.cc @@ -44,7 +44,7 @@ VSelectObjects::visitVPath( VPath& composite ) { // Check if composite is completely inside the selection rectangle. // This test should be the first test since it's the less expensive one. - if( m_rect.contains( composite.boundingBox() ) ) + if( m_rect.tqcontains( composite.boundingBox() ) ) { selected = true; } @@ -117,7 +117,7 @@ VSelectObjects::visitVPath( VPath& composite ) if( m_select ) { composite.setState( VObject::selected ); - if( ! m_selection.containsRef( &composite ) ) + if( ! m_selection.tqcontainsRef( &composite ) ) m_selection.append( &composite ); } else @@ -148,7 +148,7 @@ VSelectObjects::visitVObject( VObject& object ) if( m_rect.intersects( object.boundingBox() ) ) { object.setState( VObject::selected ); - if( ! m_selection.containsRef( &object ) ) + if( ! m_selection.tqcontainsRef( &object ) ) m_selection.append( &object ); setSuccess(); } @@ -168,7 +168,7 @@ VSelectObjects::visitVObject( VObject& object ) if( m_select ) { object.setState( VObject::selected ); - if( ! m_selection.containsRef( &object ) ) + if( ! m_selection.tqcontainsRef( &object ) ) m_selection.append( &object ); setSuccess(); } @@ -183,12 +183,12 @@ VSelectObjects::visitVObject( VObject& object ) // selection by point else { - if( object.boundingBox().contains( m_point ) ) + if( object.boundingBox().tqcontains( m_point ) ) { if( m_select ) { object.setState( VObject::selected ); - if( ! m_selection.containsRef( &object ) ) + if( ! m_selection.tqcontainsRef( &object ) ) m_selection.append( &object ); } else @@ -205,7 +205,7 @@ VSelectObjects::visitVObject( VObject& object ) void VSelectObjects::visitVLayer( VLayer& layer ) { - VDocument* doc = (VDocument*)layer.parent(); + VDocument* doc = (VDocument*)layer.tqparent(); if ( ( layer.state() != VObject::deleted ) && ( ( doc->selectionMode() == VDocument::AllLayers ) || ( doc->selectionMode() == VDocument::VisibleLayers && ( layer.state() == VObject::normal || layer.state() == VObject::normal_locked ) ) || @@ -239,7 +239,7 @@ VSelectObjects::visitVText( VText& text ) kdDebug(38000) << "selected: " << itr.current() << endl; m_selection.remove( &c ); text.setState( VObject::selected ); - if( ! m_selection.containsRef( &text ) ) + if( ! m_selection.tqcontainsRef( &text ) ) m_selection.append( &text ); return; } diff --git a/karbon/visitors/vtransformnodes.cc b/karbon/visitors/vtransformnodes.cc index ed670538..102bb33d 100644 --- a/karbon/visitors/vtransformnodes.cc +++ b/karbon/visitors/vtransformnodes.cc @@ -23,7 +23,7 @@ #include "vtransformnodes.h" -VTransformNodes::VTransformNodes( const QWMatrix& m ) +VTransformNodes::VTransformNodes( const TQWMatrix& m ) : m_matrix( m ) { } @@ -44,7 +44,7 @@ VTransformNodes::visitVSubpath( VSubpath& path ) path.current()->isSmooth() ) { // Do extra reverse trafo for smooth beziers - QWMatrix m2( m_matrix.m11(), m_matrix.m12(), m_matrix.m21(), m_matrix.m22(), + TQWMatrix m2( m_matrix.m11(), m_matrix.m12(), m_matrix.m21(), m_matrix.m22(), -m_matrix.dx(), -m_matrix.dy() ); path.current()->next()->setPoint( 0, path.current()->next()->point( 0 ).transform( m2 ) ); } @@ -56,7 +56,7 @@ VTransformNodes::visitVSubpath( VSubpath& path ) path.current()->prev()->isSmooth() ) { // Do extra reverse trafo for smooth beziers - QWMatrix m2( m_matrix.m11(), m_matrix.m12(), m_matrix.m21(), m_matrix.m22(), + TQWMatrix m2( m_matrix.m11(), m_matrix.m12(), m_matrix.m21(), m_matrix.m22(), -m_matrix.dx(), -m_matrix.dy() ); path.current()->prev()->setPoint( 1, path.current()->prev()->point( 1 ).transform( m2 ) ); } diff --git a/karbon/visitors/vtransformnodes.h b/karbon/visitors/vtransformnodes.h index 5c384e61..176fbd37 100644 --- a/karbon/visitors/vtransformnodes.h +++ b/karbon/visitors/vtransformnodes.h @@ -20,7 +20,7 @@ #ifndef __VTRANSFORMNODES_H__ #define __VTRANSFORMNODES_H__ -#include <qwmatrix.h> +#include <tqwmatrix.h> #include <koffice_export.h> #include "vvisitor.h" @@ -31,12 +31,12 @@ class VSegment; class KARBONBASE_EXPORT VTransformNodes : public VVisitor { public: - VTransformNodes( const QWMatrix& m ); + VTransformNodes( const TQWMatrix& m ); virtual void visitVSubpath( VSubpath& path ); private: - QWMatrix m_matrix; + TQWMatrix m_matrix; }; #endif |