diff options
Diffstat (limited to 'amarok/src/xspfplaylist.cpp')
-rw-r--r-- | amarok/src/xspfplaylist.cpp | 116 |
1 files changed, 58 insertions, 58 deletions
diff --git a/amarok/src/xspfplaylist.cpp b/amarok/src/xspfplaylist.cpp index a991eb4f..beb1f388 100644 --- a/amarok/src/xspfplaylist.cpp +++ b/amarok/src/xspfplaylist.cpp @@ -8,7 +8,7 @@ XSPFPlaylist::XSPFPlaylist( ) { - QDomElement root = createElement( "playlist" ); + TQDomElement root = createElement( "playlist" ); root.setAttribute( "version", 1 ); root.setAttribute( "xmlns", "http://xspf.org/ns/0/" ); @@ -18,17 +18,17 @@ XSPFPlaylist::XSPFPlaylist( ) appendChild( root ); } -XSPFPlaylist::XSPFPlaylist( QTextStream &stream ) +XSPFPlaylist::XSPFPlaylist( TQTextStream &stream ) { loadXSPF( stream ); } bool -XSPFPlaylist::loadXSPF( QTextStream &stream ) +XSPFPlaylist::loadXSPF( TQTextStream &stream ) { - QString errorMsg; + TQString errorMsg; int errorLine, errorColumn; - stream.setEncoding( QTextStream::UnicodeUTF8 ); + stream.setEncoding( TQTextStream::UnicodeUTF8 ); if (!setContent(stream.read(), &errorMsg, &errorLine, &errorColumn)) { debug() << "[XSPFPlaylist]: Error loading xml file: " "(" << errorMsg << ")" @@ -84,7 +84,7 @@ XSPFPlaylist::image() QDateTime XSPFPlaylist::date() { - return QDateTime::fromString( documentElement().namedItem( "date" ).firstChild().nodeValue(), Qt::ISODate ); + return TQDateTime::fromString( documentElement().namedItem( "date" ).firstChild().nodeValue(), Qt::ISODate ); } KURL @@ -96,7 +96,7 @@ XSPFPlaylist::license() KURL::List XSPFPlaylist::attribution() { - QDomNode node = documentElement().namedItem( "attribution" ); + TQDomNode node = documentElement().namedItem( "attribution" ); KURL::List list; while ( !node.isNull() ) @@ -119,12 +119,12 @@ XSPFPlaylist::link() } void -XSPFPlaylist::setTitle( QString title ) +XSPFPlaylist::setTitle( TQString title ) { if ( documentElement().namedItem( "title" ).isNull() ) { - QDomNode node = createElement( "title" ); - QDomNode subNode = createTextNode( title ); + TQDomNode node = createElement( "title" ); + TQDomNode subNode = createTextNode( title ); node.appendChild( subNode ); documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); } @@ -133,12 +133,12 @@ XSPFPlaylist::setTitle( QString title ) } void -XSPFPlaylist::setCreator( QString creator ) +XSPFPlaylist::setCreator( TQString creator ) { if ( documentElement().namedItem( "creator" ).isNull() ) { - QDomNode node = createElement( "creator" ); - QDomNode subNode = createTextNode( creator ); + TQDomNode node = createElement( "creator" ); + TQDomNode subNode = createTextNode( creator ); node.appendChild( subNode ); documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); } @@ -147,12 +147,12 @@ XSPFPlaylist::setCreator( QString creator ) } void -XSPFPlaylist::setAnnotation( QString annotation ) +XSPFPlaylist::setAnnotation( TQString annotation ) { if ( documentElement().namedItem( "annotation" ).isNull() ) { - QDomNode node = createElement( "annotation" ); - QDomNode subNode = createTextNode( annotation ); + TQDomNode node = createElement( "annotation" ); + TQDomNode subNode = createTextNode( annotation ); node.appendChild( subNode ); documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); } @@ -165,8 +165,8 @@ XSPFPlaylist::setInfo( KURL info ) { if ( documentElement().namedItem( "info" ).isNull() ) { - QDomNode node = createElement( "info" ); - QDomNode subNode = createTextNode( info.url() ); + TQDomNode node = createElement( "info" ); + TQDomNode subNode = createTextNode( info.url() ); node.appendChild( subNode ); documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); } @@ -179,8 +179,8 @@ XSPFPlaylist::setLocation( KURL location ) { if ( documentElement().namedItem( "location" ).isNull() ) { - QDomNode node = createElement( "location" ); - QDomNode subNode = createTextNode( location.url() ); + TQDomNode node = createElement( "location" ); + TQDomNode subNode = createTextNode( location.url() ); node.appendChild( subNode ); documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); } @@ -189,12 +189,12 @@ XSPFPlaylist::setLocation( KURL location ) } void -XSPFPlaylist::setIdentifier( QString identifier ) +XSPFPlaylist::setIdentifier( TQString identifier ) { if ( documentElement().namedItem( "identifier" ).isNull() ) { - QDomNode node = createElement( "identifier" ); - QDomNode subNode = createTextNode( identifier ); + TQDomNode node = createElement( "identifier" ); + TQDomNode subNode = createTextNode( identifier ); node.appendChild( subNode ); documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); } @@ -207,8 +207,8 @@ XSPFPlaylist::setImage( KURL image ) { if ( documentElement().namedItem( "image" ).isNull() ) { - QDomNode node = createElement( "image" ); - QDomNode subNode = createTextNode( image.url() ); + TQDomNode node = createElement( "image" ); + TQDomNode subNode = createTextNode( image.url() ); node.appendChild( subNode ); documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); } @@ -217,15 +217,15 @@ XSPFPlaylist::setImage( KURL image ) } void -XSPFPlaylist::setDate( QDateTime date ) +XSPFPlaylist::setDate( TQDateTime date ) { /* date needs timezone info to be compliant with the standard (ex. 2005-01-08T17:10:47-05:00 ) */ if ( documentElement().namedItem( "date" ).isNull() ) { - QDomNode node = createElement( "date" ); - QDomNode subNode = createTextNode( date.toString( "yyyy-MM-ddThh:mm:ss" ) ); + TQDomNode node = createElement( "date" ); + TQDomNode subNode = createTextNode( date.toString( "yyyy-MM-ddThh:mm:ss" ) ); node.appendChild( subNode ); documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); } @@ -238,8 +238,8 @@ XSPFPlaylist::setLicense( KURL license ) { if ( documentElement().namedItem( "license" ).isNull() ) { - QDomNode node = createElement( "license" ); - QDomNode subNode = createTextNode( license.url() ); + TQDomNode node = createElement( "license" ); + TQDomNode subNode = createTextNode( license.url() ); node.appendChild( subNode ); documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); } @@ -255,16 +255,16 @@ XSPFPlaylist::setAttribution( KURL attribution, bool append ) if ( append ) { - QDomNode subNode = createElement( "location" ); - QDomNode subSubNode = createTextNode( attribution.url() ); + TQDomNode subNode = createElement( "location" ); + TQDomNode subSubNode = createTextNode( attribution.url() ); subNode.appendChild( subSubNode ); documentElement().namedItem( "attribution" ).insertBefore( subNode, documentElement().namedItem( "attribution" ).firstChild() ); } else { - QDomNode node = createElement( "attribution" ); - QDomNode subNode = createElement( "location" ); - QDomNode subSubNode = createTextNode( attribution.url() ); + TQDomNode node = createElement( "attribution" ); + TQDomNode subNode = createElement( "location" ); + TQDomNode subSubNode = createTextNode( attribution.url() ); subNode.appendChild( subSubNode ); node.appendChild( subNode ); documentElement().replaceChild( node, documentElement().namedItem( "attribution" ) ); @@ -276,8 +276,8 @@ XSPFPlaylist::setLink( KURL link ) { if ( documentElement().namedItem( "link" ).isNull() ) { - QDomNode node = createElement( "link" ); - QDomNode subNode = createTextNode( link.url() ); + TQDomNode node = createElement( "link" ); + TQDomNode subNode = createTextNode( link.url() ); node.appendChild( subNode ); documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) ); } @@ -291,9 +291,9 @@ XSPFPlaylist::trackList() { XSPFtrackList list; - QDomNode trackList = documentElement().namedItem( "trackList" ); - QDomNode subNode = trackList.firstChild(); - QDomNode subSubNode; + TQDomNode trackList = documentElement().namedItem( "trackList" ); + TQDomNode subNode = trackList.firstChild(); + TQDomNode subSubNode; while ( !subNode.isNull() ) { @@ -342,7 +342,7 @@ XSPFPlaylist::setTrackList( XSPFtrackList trackList, bool append ) if ( documentElement().namedItem( "trackList" ).isNull() ) documentElement().appendChild( createElement( "trackList" ) ); - QDomNode node = createElement( "trackList" ); + TQDomNode node = createElement( "trackList" ); XSPFtrackList::iterator it; @@ -350,21 +350,21 @@ XSPFPlaylist::setTrackList( XSPFtrackList trackList, bool append ) { XSPFtrack track = (*it); - QDomNode subNode = createElement( "track" ); - - QDomNode location = createElement( "location" ); - QDomNode identifier = createElement( "identifier" ); - QDomNode title = createElement( "title" ); - QDomNode creator = createElement( "creator" ); - QDomNode annotation = createElement( "annotation" ); - QDomNode info = createElement( "info" ); - QDomNode image = createElement( "image" ); - QDomNode album = createElement( "album" ); - QDomNode trackNum = createElement( "trackNum" ); - QDomNode duration = createElement( "duration" ); - QDomNode link = createElement( "link" ); - // QDomNode meta - // QDomNode extension + TQDomNode subNode = createElement( "track" ); + + TQDomNode location = createElement( "location" ); + TQDomNode identifier = createElement( "identifier" ); + TQDomNode title = createElement( "title" ); + TQDomNode creator = createElement( "creator" ); + TQDomNode annotation = createElement( "annotation" ); + TQDomNode info = createElement( "info" ); + TQDomNode image = createElement( "image" ); + TQDomNode album = createElement( "album" ); + TQDomNode trackNum = createElement( "trackNum" ); + TQDomNode duration = createElement( "duration" ); + TQDomNode link = createElement( "link" ); + // TQDomNode meta + // TQDomNode extension if ( !track.location.url().isNull() ) location.appendChild( createTextNode( track.location.url() ) ); @@ -383,9 +383,9 @@ XSPFPlaylist::setTrackList( XSPFtrackList trackList, bool append ) if ( !track.album.isNull() ) album.appendChild( createTextNode( track.album ) ); if ( track.trackNum > 0 ) - trackNum.appendChild( createTextNode( QString::number( track.trackNum ) ) ); + trackNum.appendChild( createTextNode( TQString::number( track.trackNum ) ) ); if ( track.duration > 0 ) - duration.appendChild( createTextNode( QString::number( track.duration ) ) ); + duration.appendChild( createTextNode( TQString::number( track.duration ) ) ); if ( !track.link.url().isNull() ) link.appendChild( createTextNode( track.link.url() ) ); |