summaryrefslogtreecommitdiffstats
path: root/tqtinterface/qt4/src/xml/tqsvgdevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tqtinterface/qt4/src/xml/tqsvgdevice.cpp')
-rw-r--r--tqtinterface/qt4/src/xml/tqsvgdevice.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/tqtinterface/qt4/src/xml/tqsvgdevice.cpp b/tqtinterface/qt4/src/xml/tqsvgdevice.cpp
index cda8c4f..3f3c863 100644
--- a/tqtinterface/qt4/src/xml/tqsvgdevice.cpp
+++ b/tqtinterface/qt4/src/xml/tqsvgdevice.cpp
@@ -193,7 +193,7 @@ bool TQSvgDevice::play( TQPainter *painter )
TQDomNode svg = doc.namedItem( "svg" );
if ( svg.isNull() || !svg.isElement() ) {
- qWarning( "TQSvgDevice::play: Couldn't tqfind any svg element." );
+ qWarning( "TQSvgDevice::play: Couldn't find any svg element." );
return FALSE;
}
@@ -206,9 +206,9 @@ bool TQSvgDevice::play( TQPainter *painter )
int y = lenToInt( attr, "y" );
brect.setX( x );
brect.setY( y );
- TQString wstr = attr.tqcontains( "width" )
+ TQString wstr = attr.contains( "width" )
? attr.namedItem( "width" ).nodeValue() : TQString( "100%" );
- TQString hstr = attr.tqcontains( "height" )
+ TQString hstr = attr.contains( "height" )
? attr.namedItem( "height" ).nodeValue() : TQString( "100%" );
double width = parseLen( wstr, 0, TRUE );
double height = parseLen( hstr, 0, FALSE );
@@ -217,7 +217,7 @@ bool TQSvgDevice::play( TQPainter *painter )
brect.setHeight( int(height) - y );
painter->setClipRect( brect, TQPainter::CoordPainter );
- if ( attr.tqcontains( "viewBox" ) ) {
+ if ( attr.contains( "viewBox" ) ) {
TQRegExp re( TQString::tqfromLatin1("\\s*(\\S+)\\s*,?\\s*(\\S+)\\s*,?"
"\\s*(\\S+)\\s*,?\\s*(\\S+)\\s*") );
if ( re.search( attr.namedItem( "viewBox" ).nodeValue() ) < 0 ) {
@@ -809,10 +809,10 @@ bool TQSvgDevice::play( const TQDomNode &node )
pt->setPen( p );
}
TQDomNamedNodeMap attr = node.attributes();
- if ( attr.tqcontains( "style" ) )
+ if ( attr.contains( "style" ) )
setStyle( attr.namedItem( "style" ).nodeValue() );
// ### might have to exclude more elements from transform
- if ( t != SvgElement && attr.tqcontains( "transform" ) )
+ if ( t != SvgElement && attr.contains( "transform" ) )
setTransform( attr.namedItem( "transform" ).nodeValue() );
uint i = attr.length();
if ( i > 0 ) {
@@ -842,8 +842,8 @@ bool TQSvgDevice::play( const TQDomNode &node )
h = lenToInt( attr, "height" );
if ( w == 0 || h == 0 ) // prevent div by zero below
break;
- x2 = (int)attr.tqcontains( "rx" ); // tiny abuse of x2 and y2
- y2 = (int)attr.tqcontains( "ry" );
+ x2 = (int)attr.contains( "rx" ); // tiny abuse of x2 and y2
+ y2 = (int)attr.contains( "ry" );
if ( x2 )
rx = lenToInt( attr, "rx" );
if ( y2 )
@@ -926,9 +926,9 @@ bool TQSvgDevice::play( const TQDomNode &node )
case TSpanElement:
case TextElement:
{
- if ( attr.tqcontains( "x" ) )
+ if ( attr.contains( "x" ) )
curr->textx = lenToInt( attr, "x" );
- if ( attr.tqcontains( "y" ) )
+ if ( attr.contains( "y" ) )
curr->texty = lenToInt( attr, "y" );
if ( t == TSpanElement ) {
curr->textx += lenToInt( attr, "dx" );
@@ -1081,11 +1081,11 @@ TQColor TQSvgDevice::parseColor( const TQString &col )
}
// a keyword ?
- if ( qSvgColMap->tqcontains ( col ) )
+ if ( qSvgColMap->contains ( col ) )
return TQColor( (*qSvgColMap)[ col ] );
// in rgb(r,g,b) form ?
TQString c = col;
- c.tqreplace( TQRegExp( TQString::tqfromLatin1("\\s*") ), "" );
+ c.replace( TQRegExp( TQString::tqfromLatin1("\\s*") ), "" );
TQRegExp reg( TQString::tqfromLatin1("^rgb\\((\\d+)(%?),(\\d+)(%?),(\\d+)(%?)\\)$") );
if ( reg.search( c ) >= 0 ) {
int comp[3];
@@ -1161,7 +1161,7 @@ double TQSvgDevice::parseLen( const TQString &str, bool *ok, bool horiz ) const
int TQSvgDevice::lenToInt( const TQDomNamedNodeMap &map, const TQString &attr,
int def ) const
{
- if ( map.tqcontains( attr ) ) {
+ if ( map.contains( attr ) ) {
bool ok;
double dbl = parseLen( map.namedItem( attr ).nodeValue(), &ok );
if ( ok )
@@ -1173,7 +1173,7 @@ int TQSvgDevice::lenToInt( const TQDomNamedNodeMap &map, const TQString &attr,
double TQSvgDevice::lenToDouble( const TQDomNamedNodeMap &map, const TQString &attr,
int def ) const
{
- if ( map.tqcontains( attr ) ) {
+ if ( map.contains( attr ) ) {
bool ok;
double d = parseLen( map.namedItem( attr ).nodeValue(), &ok );
if ( ok )
@@ -1285,7 +1285,7 @@ void TQSvgDevice::setStyle( const TQString &s )
TQStringList::ConstIterator it = rules.begin();
for ( ; it != rules.end(); it++ ) {
- int col = (*it).tqfind( ':' );
+ int col = (*it).find( ':' );
if ( col > 0 ) {
TQString prop = TQT_TQSTRING((*it).left( col )).simplifyWhiteSpace();
TQString val = (*it).right( (*it).length() - col - 1 );
@@ -1363,7 +1363,7 @@ void TQSvgDevice::drawPath( const TQString &data )
if ( ch.isSpace() )
continue;
TQChar chUp = ch.upper();
- int cmd = commands.tqfind( chUp );
+ int cmd = commands.find( chUp );
if ( cmd >= 0 ) {
// switch to new command mode
mode = cmd;