summaryrefslogtreecommitdiffstats
path: root/karbon/shapes/vellipse.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/vellipse.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/vellipse.cc')
-rw-r--r--karbon/shapes/vellipse.cc64
1 files changed, 32 insertions, 32 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 );
}