summaryrefslogtreecommitdiffstats
path: root/kresources/tvanytime/service.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kresources/tvanytime/service.cpp')
-rw-r--r--kresources/tvanytime/service.cpp88
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() );
}
}