diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /kresources/tvanytime/service.cpp | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kresources/tvanytime/service.cpp')
-rw-r--r-- | kresources/tvanytime/service.cpp | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/kresources/tvanytime/service.cpp b/kresources/tvanytime/service.cpp index 9c92f4f2b..ecf34fc44 100644 --- a/kresources/tvanytime/service.cpp +++ b/kresources/tvanytime/service.cpp @@ -25,7 +25,7 @@ Service::Service() : mActive( true ) } -Service::Service( bool active, const QString & name, const QString & owner, const KURL & serviceUrl, const KURL & logo, const QStringList & genres ) +Service::Service( bool active, const TQString & name, const TQString & owner, const KURL & serviceUrl, const KURL & logo, const TQStringList & genres ) : mActive( active ), mName( name ), mOwner( owner ), mServiceUrl( serviceUrl ), mLogo( logo ), mGenres( genres ) { } @@ -35,7 +35,7 @@ void Service::setActive( bool active ) mActive = active; } -void Service::setName( const QString & name ) +void Service::setName( const TQString & name ) { mName = name; } @@ -50,12 +50,12 @@ bool Service::active() const return mActive; } -QString Service::name() const +TQString Service::name() const { return mName; } -bool Service::loadXML( const QDomElement & top ) +bool Service::loadXML( const TQDomElement & top ) { if ( top.tagName() != "ServiceInformation" ) { qWarning( "XML error: Top tag was %s instead of the expected service information", @@ -65,11 +65,11 @@ bool Service::loadXML( const QDomElement & top ) setId( top.attribute( "serviceId" ) ); - for ( QDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) { + for ( TQDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) { if ( n.isComment() ) continue; if ( n.isElement() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); loadAttribute( e ); } else qWarning( "Node is not a comment or an element???" ); @@ -77,22 +77,22 @@ bool Service::loadXML( const QDomElement & top ) return true; } -bool Service::loadAttribute( const QDomElement& element ) +bool Service::loadAttribute( const TQDomElement& element ) { - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if ( tagName == "Name" ) { - QDomNode cn = element.firstChild(); - QDomText t = cn.toText(); + TQDomNode cn = element.firstChild(); + TQDomText t = cn.toText(); mName = t.data(); } else if ( tagName == "Owner" ) { - QDomNode cn = element.firstChild(); - QDomText t = cn.toText(); + TQDomNode cn = element.firstChild(); + TQDomText t = cn.toText(); mOwner = t.data(); } else if ( tagName == "ServiceURL" ) { - QDomNode cn = element.firstChild(); - QDomText t = cn.toText(); + TQDomNode cn = element.firstChild(); + TQDomText t = cn.toText(); mServiceUrl = t.data(); } // TODO: parse logo data @@ -100,9 +100,9 @@ bool Service::loadAttribute( const QDomElement& element ) return true; } -QRegExp ScheduleEvent::sRegExp( "PT(\\d{2})H(\\d{2})M(\\d{2})S" ); +TQRegExp ScheduleEvent::sRegExp( "PT(\\d{2})H(\\d{2})M(\\d{2})S" ); -bool ScheduleEvent::loadXML( const QDomElement & top ) +bool ScheduleEvent::loadXML( const TQDomElement & top ) { if ( top.tagName() != "ScheduleEvent" ) { qWarning( "XML error: Top tag was %s instead of the expected event", @@ -112,11 +112,11 @@ bool ScheduleEvent::loadXML( const QDomElement & top ) mCrid = top.attribute( "serviceId" ); - for ( QDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) { + for ( TQDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) { if ( n.isComment() ) continue; if ( n.isElement() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); loadAttribute( e ); } else qWarning( "Node is not a comment or an element???" ); @@ -124,26 +124,26 @@ bool ScheduleEvent::loadXML( const QDomElement & top ) return true; } -bool ScheduleEvent::loadAttribute( const QDomElement& element ) +bool ScheduleEvent::loadAttribute( const TQDomElement& element ) { - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if ( tagName == "ProgramURL" ) { - QDomNode cn = element.firstChild(); - QDomText t = cn.toText(); + TQDomNode cn = element.firstChild(); + TQDomText t = cn.toText(); mUrl = t.data(); } else if ( tagName == "Program" ) { mCrid = element.attribute( "crid" ); } else if ( tagName == "PublishedStartTime" ) { - QDomNode cn = element.firstChild(); - QDomText t = cn.toText(); - mStartTime = QDateTime::fromString( t.data(), Qt::ISODate ); + TQDomNode cn = element.firstChild(); + TQDomText t = cn.toText(); + mStartTime = TQDateTime::fromString( t.data(), Qt::ISODate ); } else if ( tagName == "PublishedDuration" ) { - QDomNode cn = element.firstChild(); - QDomText t = cn.toText(); - QString duration = t.data(); + TQDomNode cn = element.firstChild(); + TQDomText t = cn.toText(); + TQString duration = t.data(); if ( sRegExp.search( duration ) != -1 ) { mDuration = 0; @@ -160,13 +160,13 @@ ProgramInformationMap Service::programmeInformation() const return mProgInfo; } -ProgramInformation::ProgramInformation( const QString & title, const QString &synopsis ) +ProgramInformation::ProgramInformation( const TQString & title, const TQString &synopsis ) : mTitle( title ), mSynopsis( synopsis ) { } -bool ProgramInformation::loadXML( const QDomElement & top ) +bool ProgramInformation::loadXML( const TQDomElement & top ) { if ( top.tagName() != "ProgramInformation" ) { qWarning( "XML error: Top tag was %s instead of the expected program information", @@ -176,18 +176,18 @@ bool ProgramInformation::loadXML( const QDomElement & top ) setId( top.attribute( "programId" ) ); - for ( QDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) { + for ( TQDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) { if ( n.isComment() ) continue; if ( n.isElement() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if ( e.tagName() == "BasicDescription" ) { - for ( QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) { + for ( TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) { if ( n.isComment() ) continue; if ( n.isElement() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); loadAttribute( e ); } } @@ -198,25 +198,25 @@ bool ProgramInformation::loadXML( const QDomElement & top ) return true; } -bool ProgramInformation::loadAttribute( const QDomElement& element ) +bool ProgramInformation::loadAttribute( const TQDomElement& element ) { - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if ( tagName == "Title" ) { - QDomNode cn = element.firstChild(); - QDomText t = cn.toText(); + TQDomNode cn = element.firstChild(); + TQDomText t = cn.toText(); mTitle = t.data(); } else if ( tagName == "Synopsis" ) { - QDomNode cn = element.firstChild(); - QDomText t = cn.toText(); + TQDomNode cn = element.firstChild(); + TQDomText t = cn.toText(); mSynopsis = t.data(); } else if ( tagName == "Genre" ) { - QDomNode name = element.firstChild(); - QDomElement nameElem = name.toElement(); + TQDomNode name = element.firstChild(); + TQDomElement nameElem = name.toElement(); if ( nameElem.tagName() == "Name" ) { - QDomNode cn = nameElem.firstChild(); - QDomText t = cn.toText(); + TQDomNode cn = nameElem.firstChild(); + TQDomText t = cn.toText(); mGenres.append( t.data() ); } } |