summaryrefslogtreecommitdiffstats
path: root/karbon/shapes/vpolyline.cc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /karbon/shapes/vpolyline.cc
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-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/vpolyline.cc')
-rw-r--r--karbon/shapes/vpolyline.cc58
1 files changed, 29 insertions, 29 deletions
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 );