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/shapes | |
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/shapes')
-rw-r--r-- | karbon/shapes/vellipse.cc | 64 | ||||
-rw-r--r-- | karbon/shapes/vellipse.h | 12 | ||||
-rw-r--r-- | karbon/shapes/vpolygon.cc | 50 | ||||
-rw-r--r-- | karbon/shapes/vpolygon.h | 14 | ||||
-rw-r--r-- | karbon/shapes/vpolyline.cc | 58 | ||||
-rw-r--r-- | karbon/shapes/vpolyline.h | 18 | ||||
-rw-r--r-- | karbon/shapes/vrectangle.cc | 50 | ||||
-rw-r--r-- | karbon/shapes/vrectangle.h | 12 | ||||
-rw-r--r-- | karbon/shapes/vsinus.cc | 30 | ||||
-rw-r--r-- | karbon/shapes/vsinus.h | 10 | ||||
-rw-r--r-- | karbon/shapes/vspiral.cc | 30 | ||||
-rw-r--r-- | karbon/shapes/vspiral.h | 10 | ||||
-rw-r--r-- | karbon/shapes/vstar.cc | 30 | ||||
-rw-r--r-- | karbon/shapes/vstar.h | 16 |
14 files changed, 202 insertions, 202 deletions
diff --git a/karbon/shapes/vellipse.cc b/karbon/shapes/vellipse.cc index c2afc804..15f5ce1c 100644 --- a/karbon/shapes/vellipse.cc +++ b/karbon/shapes/vellipse.cc @@ -27,17 +27,17 @@ #include <KoXmlNS.h> #include <vglobal.h> #include <vdocument.h> -#include <qdom.h> +#include <tqdom.h> #include <core/vfill.h> -VEllipse::VEllipse( VObject* parent, VState state ) : VPath( parent, state ) +VEllipse::VEllipse( VObject* tqparent, VState state ) : VPath( tqparent, state ) { } -VEllipse::VEllipse( VObject* parent, +VEllipse::VEllipse( VObject* tqparent, const KoPoint& topLeft, double width, double height, VEllipseType type, double startAngle, double endAngle ) - : VPath( parent ), m_type( type ), m_startAngle( startAngle ), m_endAngle( endAngle ) + : VPath( tqparent ), m_type( type ), m_startAngle( startAngle ), m_endAngle( endAngle ) { setDrawCenterNode(); @@ -94,7 +94,7 @@ VEllipse::init() close(); // Translate and scale: - QWMatrix m; + TQWMatrix m; m.translate( m_center.x(), m_center.y() ); m.scale( 2.0 * m_rx, 2.0 * m_ry ); @@ -105,15 +105,15 @@ VEllipse::init() m_matrix.reset(); } -QString +TQString VEllipse::name() const { - QString result = VObject::name(); + TQString result = VObject::name(); return !result.isEmpty() ? result : i18n( "Ellipse" ); } void -VEllipse::save( QDomElement& element ) const +VEllipse::save( TQDomElement& element ) const { VDocument *doc = document(); if( doc && doc->saveAsPath() ) @@ -124,7 +124,7 @@ VEllipse::save( QDomElement& element ) const if( state() != deleted ) { - QDomElement me = element.ownerDocument().createElement( "ELLIPSE" ); + TQDomElement me = element.ownerDocument().createElement( "ELLIPSE" ); element.appendChild( me ); // save fill/stroke untransformed @@ -152,7 +152,7 @@ VEllipse::save( QDomElement& element ) const else me.setAttribute( "kind", "full" ); - QString transform = buildSvgTransform(); + TQString transform = buildSvgTransform(); if( !transform.isEmpty() ) me.setAttribute( "transform", transform ); } @@ -192,11 +192,11 @@ VEllipse::saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainSt VObject::saveOasis( store, docWriter, mainStyles, index ); - QWMatrix tmpMat; + TQWMatrix tmpMat; tmpMat.scale( 1, -1 ); tmpMat.translate( 0, -document()->height() ); - QString transform = buildOasisTransform( m_matrix*tmpMat ); + TQString transform = buildOasisTransform( m_matrix*tmpMat ); if( !transform.isEmpty() ) docWriter->addAttribute( "draw:transform", transform ); @@ -204,44 +204,44 @@ VEllipse::saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainSt } bool -VEllipse::loadOasis( const QDomElement &element, KoOasisLoadingContext &context ) +VEllipse::loadOasis( const TQDomElement &element, KoOasisLoadingContext &context ) { setState( normal ); if( element.tagName() == "ellipse" ) { if( element.hasAttributeNS( KoXmlNS::svg, "rx" ) ) - m_rx = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "rx", QString::null ) ); + m_rx = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "rx", TQString() ) ); else - m_rx = 0.5 * KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "width", QString::null ) ); + m_rx = 0.5 * KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "width", TQString() ) ); if( element.hasAttributeNS( KoXmlNS::svg, "ry" ) ) - m_ry = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "ry", QString::null ) ); + m_ry = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "ry", TQString() ) ); else - m_ry = 0.5 * KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "height", QString::null ) ); + m_ry = 0.5 * KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "height", TQString() ) ); } else if( element.tagName() == "circle" ) { if( element.hasAttributeNS( KoXmlNS::svg, "r" ) ) - m_rx = m_ry = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "r", QString::null ) ); + m_rx = m_ry = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "r", TQString() ) ); else - m_rx = m_ry = 0.5 * KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "width", QString::null ) ); + m_rx = m_ry = 0.5 * KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "width", TQString() ) ); } if( element.hasAttributeNS( KoXmlNS::svg, "cx" ) ) - m_center.setX( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "cx", QString::null ) ) ); + m_center.setX( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "cx", TQString() ) ) ); else - m_center.setX( m_rx + KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "x", QString::null ) ) ); + m_center.setX( m_rx + KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "x", TQString() ) ) ); if( element.hasAttributeNS( KoXmlNS::svg, "cy" ) ) - m_center.setY( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "cy", QString::null ) ) ); + m_center.setY( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "cy", TQString() ) ) ); else - m_center.setY( m_ry + KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "y", QString::null ) ) ); + m_center.setY( m_ry + KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "y", TQString() ) ) ); // the meaning of cut and section is mixed up in karbon, so just set them so for now // be sure to do the right thing tm for karbon 2.0 - QString kind = element.attributeNS( KoXmlNS::draw, "kind", QString::null ); + TQString kind = element.attributeNS( KoXmlNS::draw, "kind", TQString() ); if( kind == "cut" ) m_type = section; else if( kind == "section" ) @@ -251,10 +251,10 @@ VEllipse::loadOasis( const QDomElement &element, KoOasisLoadingContext &context else m_type = full; - double startAngle = element.attributeNS( KoXmlNS::draw, "start-angle", QString::null ).toDouble(); - double endAngle = element.attributeNS( KoXmlNS::draw, "end-angle", QString::null ).toDouble(); + double startAngle = element.attributeNS( KoXmlNS::draw, "start-angle", TQString() ).toDouble(); + double endAngle = element.attributeNS( KoXmlNS::draw, "end-angle", TQString() ).toDouble(); - // the shape gets mirrored in y-direction, so make the angles temporary clockwise + // the tqshape gets mirrored in y-direction, so make the angles temporary clockwise // just for creating the path m_startAngle = 360.0 - endAngle; m_endAngle = 360.0 - startAngle; @@ -265,9 +265,9 @@ VEllipse::loadOasis( const QDomElement &element, KoOasisLoadingContext &context m_startAngle = startAngle; m_endAngle = endAngle; - transformByViewbox( element, element.attributeNS( KoXmlNS::svg, "viewBox", QString::null ) ); + transformByViewbox( element, element.attributeNS( KoXmlNS::svg, "viewBox", TQString() ) ); - QString trafo = element.attributeNS( KoXmlNS::draw, "transform", QString::null ); + TQString trafo = element.attributeNS( KoXmlNS::draw, "transform", TQString() ); if( !trafo.isEmpty() ) transformOasis( trafo ); @@ -275,11 +275,11 @@ VEllipse::loadOasis( const QDomElement &element, KoOasisLoadingContext &context } void -VEllipse::load( const QDomElement& element ) +VEllipse::load( const TQDomElement& element ) { setState( normal ); - QDomNodeList list = element.childNodes(); + TQDomNodeList list = element.childNodes(); for( uint i = 0; i < list.count(); ++i ) if( list.item( i ).isElement() ) VObject::load( list.item( i ).toElement() ); @@ -304,7 +304,7 @@ VEllipse::load( const QDomElement& element ) init(); - QString trafo = element.attribute( "transform" ); + TQString trafo = element.attribute( "transform" ); if( !trafo.isEmpty() ) transform( trafo ); } diff --git a/karbon/shapes/vellipse.h b/karbon/shapes/vellipse.h index e7decbd2..98f0ec11 100644 --- a/karbon/shapes/vellipse.h +++ b/karbon/shapes/vellipse.h @@ -33,17 +33,17 @@ public: cut, arc }; - VEllipse( VObject* parent, VState state = edit ); - VEllipse( VObject* parent, + VEllipse( VObject* tqparent, VState state = edit ); + VEllipse( VObject* tqparent, const KoPoint& topLeft, double width, double height, VEllipseType type = full, double startAngle = 0, double endAngle = 0 ); - virtual QString name() const; + virtual TQString name() const; - virtual void save( QDomElement& element ) const; + virtual void save( TQDomElement& element ) const; virtual void saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyles, int &index ) const; - virtual void load( const QDomElement& element ); - virtual bool loadOasis( const QDomElement &element, KoOasisLoadingContext &context ); + virtual void load( const TQDomElement& element ); + virtual bool loadOasis( const TQDomElement &element, KoOasisLoadingContext &context ); virtual VPath* clone() const; diff --git a/karbon/shapes/vpolygon.cc b/karbon/shapes/vpolygon.cc index aa74ca90..724b228f 100644 --- a/karbon/shapes/vpolygon.cc +++ b/karbon/shapes/vpolygon.cc @@ -18,7 +18,7 @@ */ -#include <qdom.h> +#include <tqdom.h> #include "vglobal.h" #include "vpolygon.h" @@ -30,14 +30,14 @@ #include <KoXmlNS.h> #include <vdocument.h> -VPolygon::VPolygon( VObject* parent, VState state ) - : VPath( parent, state ) +VPolygon::VPolygon( VObject* tqparent, VState state ) + : VPath( tqparent, state ) { } -VPolygon::VPolygon( VObject* parent, const QString &points, +VPolygon::VPolygon( VObject* tqparent, const TQString &points, const KoPoint& topLeft, double width, double height ) - : VPath( parent ), m_topLeft( topLeft ), m_width( width), m_height( height ), m_points( points ) + : VPath( tqparent ), m_topLeft( topLeft ), m_width( width), m_height( height ), m_points( points ) { init(); } @@ -47,13 +47,13 @@ VPolygon::init() { bool bFirst = true; - QString points = m_points.simplifyWhiteSpace(); - points.replace( ',', ' ' ); + TQString points = m_points.simplifyWhiteSpace(); + points.tqreplace( ',', ' ' ); points.remove( '\r' ); points.remove( '\n' ); - QStringList pointList = QStringList::split( ' ', points ); - QStringList::Iterator end(pointList.end()); - for( QStringList::Iterator it = pointList.begin(); it != end; ++it ) + TQStringList pointList = TQStringList::split( ' ', points ); + TQStringList::Iterator end(pointList.end()); + for( TQStringList::Iterator it = pointList.begin(); it != end; ++it ) { KoPoint point; point.setX( (*it).toDouble() ); @@ -68,7 +68,7 @@ VPolygon::init() } close(); - QWMatrix m; + TQWMatrix m; m.translate( m_topLeft.x(), m_topLeft.y() ); // only tranform the path data @@ -76,15 +76,15 @@ VPolygon::init() cmd.VVisitor::visitVPath( *this ); } -QString +TQString VPolygon::name() const { - QString result = VObject::name(); + TQString result = VObject::name(); return !result.isEmpty() ? result : i18n( "Polygon" ); } void -VPolygon::save( QDomElement& element ) const +VPolygon::save( TQDomElement& element ) const { VDocument *doc = document(); if( doc && doc->saveAsPath() ) @@ -95,7 +95,7 @@ VPolygon::save( QDomElement& element ) const if( state() != deleted ) { - QDomElement me = element.ownerDocument().createElement( "POLYGON" ); + TQDomElement me = element.ownerDocument().createElement( "POLYGON" ); element.appendChild( me ); // save fill/stroke untransformed @@ -108,12 +108,12 @@ VPolygon::save( QDomElement& element ) const me.setAttribute( "x", m_topLeft.x() ); me.setAttribute( "y", m_topLeft.y() ); - me.setAttribute( "width", QString("%1pt").arg( m_width ) ); - me.setAttribute( "height", QString("%1pt").arg( m_height ) ); + me.setAttribute( "width", TQString("%1pt").tqarg( m_width ) ); + me.setAttribute( "height", TQString("%1pt").tqarg( m_height ) ); me.setAttribute( "points", m_points ); - QString transform = buildSvgTransform(); + TQString transform = buildSvgTransform(); if( !transform.isEmpty() ) me.setAttribute( "transform", transform ); } @@ -136,11 +136,11 @@ VPolygon::saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainSt } void -VPolygon::load( const QDomElement& element ) +VPolygon::load( const TQDomElement& element ) { setState( normal ); - QDomNodeList list = element.childNodes(); + TQDomNodeList list = element.childNodes(); for( uint i = 0; i < list.count(); ++i ) if( list.item( i ).isElement() ) VObject::load( list.item( i ).toElement() ); @@ -155,23 +155,23 @@ VPolygon::load( const QDomElement& element ) init(); - QString trafo = element.attribute( "transform" ); + TQString trafo = element.attribute( "transform" ); if( !trafo.isEmpty() ) transform( trafo ); } bool -VPolygon::loadOasis( const QDomElement &element, KoOasisLoadingContext &context ) +VPolygon::loadOasis( const TQDomElement &element, KoOasisLoadingContext &context ) { setState( normal ); - m_points = element.attributeNS( KoXmlNS::draw, "points", QString::null ); + m_points = element.attributeNS( KoXmlNS::draw, "points", TQString() ); init(); - transformByViewbox( element, element.attributeNS( KoXmlNS::svg, "viewBox", QString::null ) ); + transformByViewbox( element, element.attributeNS( KoXmlNS::svg, "viewBox", TQString() ) ); - QString trafo = element.attributeNS( KoXmlNS::draw, "transform", QString::null ); + TQString trafo = element.attributeNS( KoXmlNS::draw, "transform", TQString() ); if( !trafo.isEmpty() ) transformOasis( trafo ); diff --git a/karbon/shapes/vpolygon.h b/karbon/shapes/vpolygon.h index 9b7bc940..fcb30850 100644 --- a/karbon/shapes/vpolygon.h +++ b/karbon/shapes/vpolygon.h @@ -25,16 +25,16 @@ class VPolygon : public VPath { public: - VPolygon( VObject* parent, VState state = edit ); - VPolygon( VObject* parent, const QString &points, + VPolygon( VObject* tqparent, VState state = edit ); + VPolygon( VObject* tqparent, const TQString &points, const KoPoint& topLeft, double width, double height ); - virtual QString name() const; + virtual TQString name() const; - virtual void save( QDomElement& element ) const; + virtual void save( TQDomElement& element ) const; virtual void saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyles, int &index ) const; - virtual void load( const QDomElement& element ); - virtual bool loadOasis( const QDomElement &element, KoOasisLoadingContext &context ); + virtual void load( const TQDomElement& element ); + virtual bool loadOasis( const TQDomElement &element, KoOasisLoadingContext &context ); virtual VPath* clone() const; @@ -45,7 +45,7 @@ private: KoPoint m_topLeft; double m_width; double m_height; - QString m_points; + TQString m_points; }; #endif diff --git a/karbon/shapes/vpolyline.cc b/karbon/shapes/vpolyline.cc index c55c0d14..de5d15f4 100644 --- a/karbon/shapes/vpolyline.cc +++ b/karbon/shapes/vpolyline.cc @@ -19,7 +19,7 @@ #include "vpolyline.h" -#include <qdom.h> +#include <tqdom.h> #include "vglobal.h" #include <klocale.h> @@ -30,18 +30,18 @@ #include <KoXmlWriter.h> #include <KoXmlNS.h> -VPolyline::VPolyline( VObject* parent, VState state ) - : VPath( parent, state ) +VPolyline::VPolyline( VObject* tqparent, VState state ) + : VPath( tqparent, state ) { } -/*VPolyline::VPolyline( VObject* parent, VState state ) - : VPath( parent, state ) +/*VPolyline::VPolyline( VObject* tqparent, VState state ) + : VPath( tqparent, state ) { }*/ -/*VPolyline::VPolyline( VObject* parent, const QString &points ) - : VPath( parent ), m_points( points ) +/*VPolyline::VPolyline( VObject* tqparent, const TQString &points ) + : VPath( tqparent ), m_points( points ) { init(); }*/ @@ -51,13 +51,13 @@ VPolyline::init() { bool bFirst = true; - QString points = m_points.simplifyWhiteSpace(); - points.replace( ',', ' ' ); + TQString points = m_points.simplifyWhiteSpace(); + points.tqreplace( ',', ' ' ); points.remove( '\r' ); points.remove( '\n' ); - QStringList pointList = QStringList::split( ' ', points ); - QStringList::Iterator end(pointList.end()); - for( QStringList::Iterator it = pointList.begin(); it != end; ++it ) + TQStringList pointList = TQStringList::split( ' ', points ); + TQStringList::Iterator end(pointList.end()); + for( TQStringList::Iterator it = pointList.begin(); it != end; ++it ) { KoPoint point; point.setX( (*it).toDouble() ); @@ -72,15 +72,15 @@ VPolyline::init() } } -QString +TQString VPolyline::name() const { - QString result = VObject::name(); + TQString result = VObject::name(); return !result.isEmpty() ? result : i18n( "Polyline" ); } void -VPolyline::save( QDomElement& element ) const +VPolyline::save( TQDomElement& element ) const { VDocument *doc = document(); if( doc && doc->saveAsPath() ) @@ -91,7 +91,7 @@ VPolyline::save( QDomElement& element ) const if( state() != deleted ) { - QDomElement me = element.ownerDocument().createElement( "POLYLINE" ); + TQDomElement me = element.ownerDocument().createElement( "POLYLINE" ); element.appendChild( me ); // save fill/stroke untransformed @@ -103,7 +103,7 @@ VPolyline::save( QDomElement& element ) const me.setAttribute( "points", m_points ); - QString transform = buildSvgTransform(); + TQString transform = buildSvgTransform(); if( !transform.isEmpty() ) me.setAttribute( "transform", transform ); } @@ -126,11 +126,11 @@ VPolyline::saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainS } void -VPolyline::load( const QDomElement& element ) +VPolyline::load( const TQDomElement& element ) { setState( normal ); - QDomNodeList list = element.childNodes(); + TQDomNodeList list = element.childNodes(); for( uint i = 0; i < list.count(); ++i ) if( list.item( i ).isElement() ) VObject::load( list.item( i ).toElement() ); @@ -139,38 +139,38 @@ VPolyline::load( const QDomElement& element ) init(); - QString trafo = element.attribute( "transform" ); + TQString trafo = element.attribute( "transform" ); if( !trafo.isEmpty() ) transform( trafo ); } bool -VPolyline::loadOasis( const QDomElement &element, KoOasisLoadingContext &context ) +VPolyline::loadOasis( const TQDomElement &element, KoOasisLoadingContext &context ) { setState( normal ); if( element.localName() == "line" ) { KoPoint p1, p2; - p1.setX( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "x1", QString::null ) ) ); - p1.setY( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "y1", QString::null ) ) ); - p2.setX( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "x2", QString::null ) ) ); - p2.setY( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "y2", QString::null ) ) ); + p1.setX( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "x1", TQString() ) ) ); + p1.setY( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "y1", TQString() ) ) ); + p2.setX( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "x2", TQString() ) ) ); + p2.setY( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "y2", TQString() ) ) ); - m_points = QString( "%1,%2 %3,%4" ).arg( p1.x() ).arg( p1.y() ).arg( p2.x() ).arg( p2.y() ); + m_points = TQString( "%1,%2 %3,%4" ).tqarg( p1.x() ).tqarg( p1.y() ).tqarg( p2.x() ).tqarg( p2.y() ); moveTo( p1 ); lineTo( p2 ); } else if( element.localName() == "polyline" ) { - m_points = element.attributeNS( KoXmlNS::draw, "points", QString::null ); + m_points = element.attributeNS( KoXmlNS::draw, "points", TQString() ); init(); } - transformByViewbox( element, element.attributeNS( KoXmlNS::svg, "viewBox", QString::null ) ); + transformByViewbox( element, element.attributeNS( KoXmlNS::svg, "viewBox", TQString() ) ); - QString trafo = element.attributeNS( KoXmlNS::draw, "transform", QString::null ); + TQString trafo = element.attributeNS( KoXmlNS::draw, "transform", TQString() ); if( !trafo.isEmpty() ) transformOasis( trafo ); diff --git a/karbon/shapes/vpolyline.h b/karbon/shapes/vpolyline.h index 34da9716..cc08c87b 100644 --- a/karbon/shapes/vpolyline.h +++ b/karbon/shapes/vpolyline.h @@ -21,21 +21,21 @@ #define __VPOLYLINE_H__ #include "vcomposite.h" -#include <qstring.h> +#include <tqstring.h> class VPolyline : public VPath { public: - VPolyline( VObject* parent, VState state = edit ); - //VPolyline( VObject* parent, VState state = edit ); - //VPolyline( VObject* parent, const QString &points ); + VPolyline( VObject* tqparent, VState state = edit ); + //VPolyline( VObject* tqparent, VState state = edit ); + //VPolyline( VObject* tqparent, const TQString &points ); - virtual QString name() const; + virtual TQString name() const; - virtual void save( QDomElement& element ) const; + virtual void save( TQDomElement& element ) const; virtual void saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyles, int &index ) const; - virtual void load( const QDomElement& element ); - virtual bool loadOasis( const QDomElement &element, KoOasisLoadingContext &context ); + virtual void load( const TQDomElement& element ); + virtual bool loadOasis( const TQDomElement &element, KoOasisLoadingContext &context ); virtual VPath* clone() const; @@ -43,7 +43,7 @@ protected: void init(); private: - QString m_points; + TQString m_points; }; #endif diff --git a/karbon/shapes/vrectangle.cc b/karbon/shapes/vrectangle.cc index 966c2bb2..01d1d243 100644 --- a/karbon/shapes/vrectangle.cc +++ b/karbon/shapes/vrectangle.cc @@ -24,20 +24,20 @@ #include <KoStore.h> #include <KoXmlWriter.h> #include <KoXmlNS.h> -#include <qdom.h> +#include <tqdom.h> #include <kdebug.h> #include "vglobal.h" #include <vdocument.h> #include "vtransformcmd.h" -VRectangle::VRectangle( VObject* parent, VState state ) - : VPath( parent, state ) +VRectangle::VRectangle( VObject* tqparent, VState state ) + : VPath( tqparent, state ) { } -VRectangle::VRectangle( VObject* parent, +VRectangle::VRectangle( VObject* tqparent, const KoPoint& topLeft, double width, double height, double rx, double ry ) - : VPath( parent ), m_topLeft( topLeft ), m_width( width), m_height( height ), m_rx( rx ), m_ry( ry ) + : VPath( tqparent ), m_topLeft( topLeft ), m_width( width), m_height( height ), m_rx( rx ), m_ry( ry ) { setDrawCenterNode(); @@ -93,15 +93,15 @@ VRectangle::init() close(); } -QString +TQString VRectangle::name() const { - QString result = VObject::name(); + TQString result = VObject::name(); return !result.isEmpty() ? result : i18n( "Rectangle" ); } void -VRectangle::save( QDomElement& element ) const +VRectangle::save( TQDomElement& element ) const { VDocument *doc = document(); if( doc && doc->saveAsPath() ) @@ -112,7 +112,7 @@ VRectangle::save( QDomElement& element ) const if( state() != deleted ) { - QDomElement me = element.ownerDocument().createElement( "RECT" ); + TQDomElement me = element.ownerDocument().createElement( "RECT" ); element.appendChild( me ); // save fill/stroke untransformed @@ -125,13 +125,13 @@ VRectangle::save( QDomElement& element ) const me.setAttribute( "x", m_topLeft.x() ); me.setAttribute( "y", m_topLeft.y() ); - me.setAttribute( "width", QString("%1pt").arg( m_width ) ); - me.setAttribute( "height", QString("%1pt").arg( m_height ) ); + me.setAttribute( "width", TQString("%1pt").tqarg( m_width ) ); + me.setAttribute( "height", TQString("%1pt").tqarg( m_height ) ); me.setAttribute( "rx", m_rx ); me.setAttribute( "ry", m_ry ); - QString transform = buildSvgTransform(); + TQString transform = buildSvgTransform(); if( !transform.isEmpty() ) me.setAttribute( "transform", transform ); } @@ -161,11 +161,11 @@ VRectangle::saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &main VObject::saveOasis( store, docWriter, mainStyles, index ); - QWMatrix tmpMat; + TQWMatrix tmpMat; tmpMat.scale( 1, -1 ); tmpMat.translate( 0, -document()->height() ); - QString transform = buildOasisTransform( m_matrix*tmpMat ); + TQString transform = buildOasisTransform( m_matrix*tmpMat ); if( !transform.isEmpty() ) docWriter->addAttribute( "draw:transform", transform ); @@ -173,23 +173,23 @@ VRectangle::saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &main } bool -VRectangle::loadOasis( const QDomElement &element, KoOasisLoadingContext &context ) +VRectangle::loadOasis( const TQDomElement &element, KoOasisLoadingContext &context ) { setState( normal ); - m_width = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "width", QString::null ), 10.0 ); - m_height = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "height", QString::null ), 10.0 ); + m_width = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "width", TQString() ), 10.0 ); + m_height = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "height", TQString() ), 10.0 ); - m_topLeft.setX( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "x", QString::null ) ) ); - m_topLeft.setY( m_height + KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "y", QString::null ) ) ); + m_topLeft.setX( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "x", TQString() ) ) ); + m_topLeft.setY( m_height + KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "y", TQString() ) ) ); - m_rx = m_ry = KoUnit::parseValue( element.attributeNS( KoXmlNS::draw, "corner-radius", QString::null ) ); + m_rx = m_ry = KoUnit::parseValue( element.attributeNS( KoXmlNS::draw, "corner-radius", TQString() ) ); init(); - transformByViewbox( element, element.attributeNS( KoXmlNS::svg, "viewBox", QString::null ) ); + transformByViewbox( element, element.attributeNS( KoXmlNS::svg, "viewBox", TQString() ) ); - QString trafo = element.attributeNS( KoXmlNS::draw, "transform", QString::null ); + TQString trafo = element.attributeNS( KoXmlNS::draw, "transform", TQString() ); if( !trafo.isEmpty() ) transformOasis( trafo ); @@ -197,11 +197,11 @@ VRectangle::loadOasis( const QDomElement &element, KoOasisLoadingContext &contex } void -VRectangle::load( const QDomElement& element ) +VRectangle::load( const TQDomElement& element ) { setState( normal ); - QDomNodeList list = element.childNodes(); + TQDomNodeList list = element.childNodes(); for( uint i = 0; i < list.count(); ++i ) if( list.item( i ).isElement() ) VObject::load( list.item( i ).toElement() ); @@ -217,7 +217,7 @@ VRectangle::load( const QDomElement& element ) init(); - QString trafo = element.attribute( "transform" ); + TQString trafo = element.attribute( "transform" ); if( !trafo.isEmpty() ) transform( trafo ); } diff --git a/karbon/shapes/vrectangle.h b/karbon/shapes/vrectangle.h index 04bd20d0..08c4e085 100644 --- a/karbon/shapes/vrectangle.h +++ b/karbon/shapes/vrectangle.h @@ -26,16 +26,16 @@ class KARBONBASE_EXPORT VRectangle : public VPath { public: - VRectangle( VObject* parent, VState state = edit ); - VRectangle( VObject* parent, + VRectangle( VObject* tqparent, VState state = edit ); + VRectangle( VObject* tqparent, const KoPoint& topLeft, double width, double height, double rx = 0.0, double ry = 0.0 ); - virtual QString name() const; + virtual TQString name() const; - virtual void save( QDomElement& element ) const; + virtual void save( TQDomElement& element ) const; virtual void saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyles, int &index ) const; - virtual void load( const QDomElement& element ); - virtual bool loadOasis( const QDomElement &element, KoOasisLoadingContext &context ); + virtual void load( const TQDomElement& element ); + virtual bool loadOasis( const TQDomElement &element, KoOasisLoadingContext &context ); virtual VPath* clone() const; diff --git a/karbon/shapes/vsinus.cc b/karbon/shapes/vsinus.cc index a6c9ec4f..6c546135 100644 --- a/karbon/shapes/vsinus.cc +++ b/karbon/shapes/vsinus.cc @@ -18,24 +18,24 @@ */ -#include <qwmatrix.h> +#include <tqwmatrix.h> #include "vglobal.h" #include "vsinus.h" #include "vtransformcmd.h" #include <klocale.h> #include <KoUnit.h> -#include <qdom.h> +#include <tqdom.h> #include <vdocument.h> -VSinus::VSinus( VObject* parent, VState state ) - : VPath( parent, state ) +VSinus::VSinus( VObject* tqparent, VState state ) + : VPath( tqparent, state ) { } -VSinus::VSinus( VObject* parent, +VSinus::VSinus( VObject* tqparent, const KoPoint& topLeft, double width, double height, uint periods ) - : VPath( parent ), m_topLeft( topLeft ), m_width( width), m_height( height ), m_periods( periods ) + : VPath( tqparent ), m_topLeft( topLeft ), m_width( width), m_height( height ), m_periods( periods ) { // We want at least 1 period: if( m_periods < 1 ) @@ -119,7 +119,7 @@ VSinus::init() } // Translate and scale: - QWMatrix m; + TQWMatrix m; m.translate( m_topLeft.x(), m_topLeft.y() - m_height * 0.5 ); m.scale( m_width / m_periods, m_height * 0.5 ); @@ -130,15 +130,15 @@ VSinus::init() m_matrix.reset(); } -QString +TQString VSinus::name() const { - QString result = VObject::name(); + TQString result = VObject::name(); return !result.isEmpty() ? result : i18n( "Sinus" ); } void -VSinus::save( QDomElement& element ) const +VSinus::save( TQDomElement& element ) const { VDocument *doc = document(); if( doc && doc->saveAsPath() ) @@ -149,7 +149,7 @@ VSinus::save( QDomElement& element ) const if( state() != deleted ) { - QDomElement me = element.ownerDocument().createElement( "SINUS" ); + TQDomElement me = element.ownerDocument().createElement( "SINUS" ); element.appendChild( me ); // save fill/stroke untransformed @@ -167,18 +167,18 @@ VSinus::save( QDomElement& element ) const me.setAttribute( "periods", m_periods ); - QString transform = buildSvgTransform(); + TQString transform = buildSvgTransform(); if( !transform.isEmpty() ) me.setAttribute( "transform", transform ); } } void -VSinus::load( const QDomElement& element ) +VSinus::load( const TQDomElement& element ) { setState( normal ); - QDomNodeList list = element.childNodes(); + TQDomNodeList list = element.childNodes(); for( uint i = 0; i < list.count(); ++i ) if( list.item( i ).isElement() ) VObject::load( list.item( i ).toElement() ); @@ -193,7 +193,7 @@ VSinus::load( const QDomElement& element ) init(); - QString trafo = element.attribute( "transform" ); + TQString trafo = element.attribute( "transform" ); if( !trafo.isEmpty() ) transform( trafo ); } diff --git a/karbon/shapes/vsinus.h b/karbon/shapes/vsinus.h index eb8d4f00..10b902d8 100644 --- a/karbon/shapes/vsinus.h +++ b/karbon/shapes/vsinus.h @@ -26,14 +26,14 @@ class KARBONBASE_EXPORT VSinus : public VPath { public: - VSinus( VObject* parent, VState state = edit ); - VSinus( VObject* parent, + VSinus( VObject* tqparent, VState state = edit ); + VSinus( VObject* tqparent, const KoPoint& topLeft, double width, double height, uint periods ); - virtual QString name() const; + virtual TQString name() const; - virtual void save( QDomElement& element ) const; - virtual void load( const QDomElement& element ); + virtual void save( TQDomElement& element ) const; + virtual void load( const TQDomElement& element ); virtual VPath* clone() const; diff --git a/karbon/shapes/vspiral.cc b/karbon/shapes/vspiral.cc index 8f6d17c2..cad37ccd 100644 --- a/karbon/shapes/vspiral.cc +++ b/karbon/shapes/vspiral.cc @@ -20,8 +20,8 @@ #include <math.h> -#include <qwmatrix.h> -#include <qdom.h> +#include <tqwmatrix.h> +#include <tqdom.h> #include "vglobal.h" #include "vspiral.h" @@ -30,15 +30,15 @@ #include <KoUnit.h> #include <vdocument.h> -VSpiral::VSpiral( VObject* parent, VState state ) - : VPath( parent, state ) +VSpiral::VSpiral( VObject* tqparent, VState state ) + : VPath( tqparent, state ) { } -VSpiral::VSpiral( VObject* parent, +VSpiral::VSpiral( VObject* tqparent, const KoPoint& center, double radius, uint segments, double fade, bool clockwise, double angle, VSpiralType type ) - : VPath( parent ), m_center( center), m_radius( radius ), m_fade( fade ), m_segments( segments ), m_clockwise( clockwise ), m_angle( angle ), m_type( type ) + : VPath( tqparent ), m_center( center), m_radius( radius ), m_fade( fade ), m_segments( segments ), m_clockwise( clockwise ), m_angle( angle ), m_type( type ) { init(); } @@ -86,7 +86,7 @@ VSpiral::init() } // translate path to center: - QWMatrix m; + TQWMatrix m; m.translate( m_center.x(), m_center.y() ); // sadly it's not feasible to simply add angle while creation. @@ -101,15 +101,15 @@ VSpiral::init() m_matrix.reset(); } -QString +TQString VSpiral::name() const { - QString result = VObject::name(); + TQString result = VObject::name(); return !result.isEmpty() ? result : i18n( "Spiral" ); } void -VSpiral::save( QDomElement& element ) const +VSpiral::save( TQDomElement& element ) const { VDocument *doc = document(); if( doc && doc->saveAsPath() ) @@ -120,7 +120,7 @@ VSpiral::save( QDomElement& element ) const if( state() != deleted ) { - QDomElement me = element.ownerDocument().createElement( "SPIRAL" ); + TQDomElement me = element.ownerDocument().createElement( "SPIRAL" ); element.appendChild( me ); // save fill/stroke untransformed @@ -143,18 +143,18 @@ VSpiral::save( QDomElement& element ) const me.setAttribute( "type", m_type ); - QString transform = buildSvgTransform(); + TQString transform = buildSvgTransform(); if( !transform.isEmpty() ) me.setAttribute( "transform", transform ); } } void -VSpiral::load( const QDomElement& element ) +VSpiral::load( const TQDomElement& element ) { setState( normal ); - QDomNodeList list = element.childNodes(); + TQDomNodeList list = element.childNodes(); for( uint i = 0; i < list.count(); ++i ) if( list.item( i ).isElement() ) VObject::load( list.item( i ).toElement() ); @@ -174,7 +174,7 @@ VSpiral::load( const QDomElement& element ) init(); - QString trafo = element.attribute( "transform" ); + TQString trafo = element.attribute( "transform" ); if( !trafo.isEmpty() ) transform( trafo ); } diff --git a/karbon/shapes/vspiral.h b/karbon/shapes/vspiral.h index 2b80f6ad..fc99436c 100644 --- a/karbon/shapes/vspiral.h +++ b/karbon/shapes/vspiral.h @@ -31,15 +31,15 @@ public: round, rectangular }; - VSpiral( VObject* parent, VState state = edit ); - VSpiral( VObject* parent, + VSpiral( VObject* tqparent, VState state = edit ); + VSpiral( VObject* tqparent, const KoPoint& center, double radius, uint segments, double fade, bool clockwise, double angle = 0.0, VSpiralType type = round ); - virtual QString name() const; + virtual TQString name() const; - virtual void save( QDomElement& element ) const; - virtual void load( const QDomElement& element ); + virtual void save( TQDomElement& element ) const; + virtual void load( const TQDomElement& element ); virtual VPath* clone() const; diff --git a/karbon/shapes/vstar.cc b/karbon/shapes/vstar.cc index 98391272..11f8ef86 100644 --- a/karbon/shapes/vstar.cc +++ b/karbon/shapes/vstar.cc @@ -20,8 +20,8 @@ #include <math.h> -#include <qwmatrix.h> -#include <qdom.h> +#include <tqwmatrix.h> +#include <tqdom.h> #include "vglobal.h" #include "vstar.h" @@ -30,15 +30,15 @@ #include <KoUnit.h> #include <vdocument.h> -VStar::VStar( VObject* parent, VState state ) - : VPath( parent, state ) +VStar::VStar( VObject* tqparent, VState state ) + : VPath( tqparent, state ) { } -VStar::VStar( VObject* parent, +VStar::VStar( VObject* tqparent, const KoPoint& center, double outerRadius, double innerRadius, uint edges, double angle, uint innerAngle, double roundness, VStarType type ) - : VPath( parent ), m_center( center), m_outerRadius( outerRadius ), m_innerRadius( innerRadius), m_edges( edges ), m_angle( angle ), m_innerAngle( innerAngle ), m_roundness( roundness ), m_type( type ) + : VPath( tqparent ), m_center( center), m_outerRadius( outerRadius ), m_innerRadius( innerRadius), m_edges( edges ), m_angle( angle ), m_innerAngle( innerAngle ), m_roundness( roundness ), m_type( type ) { init(); } @@ -220,7 +220,7 @@ VStar::init() close(); // translate path to center: - QWMatrix m; + TQWMatrix m; m.translate( m_center.x(), m_center.y() ); // only tranform the path data @@ -261,15 +261,15 @@ VStar::getOptimalInnerRadius( uint edges, double outerRadius, uint /*innerAngle* return sqrt( x * x + y * y ); } -QString +TQString VStar::name() const { - QString result = VObject::name(); + TQString result = VObject::name(); return !result.isEmpty() ? result : i18n( "Star" ); } void -VStar::save( QDomElement& element ) const +VStar::save( TQDomElement& element ) const { VDocument *doc = document(); if( doc && doc->saveAsPath() ) @@ -280,7 +280,7 @@ VStar::save( QDomElement& element ) const if( state() != deleted ) { - QDomElement me = element.ownerDocument().createElement( "STAR" ); + TQDomElement me = element.ownerDocument().createElement( "STAR" ); element.appendChild( me ); // save fill/stroke untransformed @@ -304,18 +304,18 @@ VStar::save( QDomElement& element ) const me.setAttribute( "type", m_type ); - QString transform = buildSvgTransform(); + TQString transform = buildSvgTransform(); if( !transform.isEmpty() ) me.setAttribute( "transform", transform ); } } void -VStar::load( const QDomElement& element ) +VStar::load( const TQDomElement& element ) { setState( normal ); - QDomNodeList list = element.childNodes(); + TQDomNodeList list = element.childNodes(); for( uint i = 0; i < list.count(); ++i ) if( list.item( i ).isElement() ) VObject::load( list.item( i ).toElement() ); @@ -336,7 +336,7 @@ VStar::load( const QDomElement& element ) init(); - QString trafo = element.attribute( "transform" ); + TQString trafo = element.attribute( "transform" ); if( !trafo.isEmpty() ) transform( trafo ); } diff --git a/karbon/shapes/vstar.h b/karbon/shapes/vstar.h index 7b7ec098..9a4096ea 100644 --- a/karbon/shapes/vstar.h +++ b/karbon/shapes/vstar.h @@ -23,11 +23,11 @@ #include "vcomposite.h" #include <koffice_export.h> /** - * This shape offers star-like shapes with a lot of parameters : + * This tqshape offers star-like tqshapes with a lot of parameters : * * Types : * - * Star - fully connected star shape. + * Star - fully connected star tqshape. * Star outline - like star but without the cross connections. * Framed star - like star outline but with an enclosing path. * Spoke - basically a star outline with inner radius of zero. @@ -42,7 +42,7 @@ * Inner radius - inner radius where star has to connect to. This value * doesn't apply to polygon, spoke and wheel. * Inner angle - extra radius amount for inner radius. - * Roundness - uses curves instead of lines for the star shape. + * Roundness - uses curves instead of lines for the star tqshape. */ class KARBONBASE_EXPORT VStar : public VPath { @@ -57,19 +57,19 @@ public: star, gear }; - VStar( VObject* parent, VState state = edit ); - VStar( VObject* parent, + VStar( VObject* tqparent, VState state = edit ); + VStar( VObject* tqparent, const KoPoint& center, double outerRadius, double innerRadius, uint edges, double angle = 0.0, uint innerAngle = 0, double roundness = 0.0, VStarType type = star_outline ); static double getOptimalInnerRadius( uint edges, double outerRadius, uint innerAngle ); - virtual QString name() const; + virtual TQString name() const; - virtual void save( QDomElement& element ) const; - virtual void load( const QDomElement& element ); + virtual void save( TQDomElement& element ) const; + virtual void load( const TQDomElement& element ); virtual VPath* clone() const; |