summaryrefslogtreecommitdiffstats
path: root/kresources/tvanytime
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kresources/tvanytime
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-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')
-rw-r--r--kresources/tvanytime/kcal_resourcetvanytime.cpp128
-rw-r--r--kresources/tvanytime/kcal_resourcetvanytime.h28
-rw-r--r--kresources/tvanytime/kcal_resourcetvanytimeconfig.cpp20
-rw-r--r--kresources/tvanytime/kcal_resourcetvanytimeconfig.h4
-rw-r--r--kresources/tvanytime/kcal_tvanytimeprefs.cpp2
-rw-r--r--kresources/tvanytime/kcal_tvanytimeprefs.h2
-rw-r--r--kresources/tvanytime/service.cpp88
-rw-r--r--kresources/tvanytime/service.h82
8 files changed, 177 insertions, 177 deletions
diff --git a/kresources/tvanytime/kcal_resourcetvanytime.cpp b/kresources/tvanytime/kcal_resourcetvanytime.cpp
index 51cfa5d22..83ae49bb9 100644
--- a/kresources/tvanytime/kcal_resourcetvanytime.cpp
+++ b/kresources/tvanytime/kcal_resourcetvanytime.cpp
@@ -30,13 +30,13 @@
#include <libkdepim/kpimprefs.h>
-#include <qapplication.h>
-#include <qdom.h>
-#include <qdatetime.h>
-#include <qptrlist.h>
-#include <qregexp.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqdom.h>
+#include <tqdatetime.h>
+#include <tqptrlist.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
#include <kabc/locknull.h>
#include <karchive.h>
@@ -93,8 +93,8 @@ void ResourceTVAnytime::init()
//setReadOnly( true );
- connect( &mResourceChangedTimer, SIGNAL( timeout() ),
- this, SLOT( slotEmitResourceChanged() ) );
+ connect( &mResourceChangedTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotEmitResourceChanged() ) );
}
TVAnytimePrefsBase *ResourceTVAnytime::prefs()
@@ -110,7 +110,7 @@ void ResourceTVAnytime::readConfig( const KConfig *config )
ResourceCached::readConfig( config );
- QStringList defaultActive;
+ TQStringList defaultActive;
defaultActive << "BBCOne" << "BBCTwo" << "BBCThree" << "BBCROne" << "BBCRTwo" << "BBCRThree" << "BBCRFour";
mActiveServices = config->readListEntry( "ActiveServices", defaultActive );
@@ -125,7 +125,7 @@ void ResourceTVAnytime::writeConfig( KConfig *config )
mPrefs->writeConfig();
ResourceCached::writeConfig( config );
- QStringList activeServices;
+ TQStringList activeServices;
ServiceMap::ConstIterator it;
for ( it = mServiceMap.begin(); it != mServiceMap.end(); ++it )
if ( it.data().active() )
@@ -179,15 +179,15 @@ bool ResourceTVAnytime::doLoad()
// TODO: find out if the file to download is fresh. if not, just work with the cache.
mDownloadJob = KIO::file_copy( url, destination, -1, true );
- connect( mDownloadJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotJobResult( KIO::Job * ) ) );
+ connect( mDownloadJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotJobResult( KIO::Job * ) ) );
mProgress = KPIM::ProgressManager::instance()->createProgressItem(
KPIM::ProgressManager::getUniqueID(), i18n("Downloading program schedule") );
connect( mProgress,
- SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
- SLOT( cancelLoad() ) );
+ TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
+ TQT_SLOT( cancelLoad() ) );
return true;
}
@@ -228,9 +228,9 @@ void ResourceTVAnytime::slotJobResult( KIO::Job *job )
mDestination = 0;
}
-QDomDocument ResourceTVAnytime::archiveFileXml( const QString & name )
+TQDomDocument ResourceTVAnytime::archiveFileXml( const TQString & name )
{
- QDomDocument result;
+ TQDomDocument result;
const KArchiveDirectory *dir = mScheduleArchive->directory();
const KArchiveEntry * entry = dir->entry( name );
if ( entry && entry->isFile() )
@@ -243,11 +243,11 @@ QDomDocument ResourceTVAnytime::archiveFileXml( const QString & name )
bool ResourceTVAnytime::readSchedule()
{
- QString uncompress = "application/x-gzip";
+ TQString uncompress = "application/x-gzip";
mScheduleArchive = new KTar( mDestination->name(), uncompress );
mScheduleArchive->open( IO_ReadOnly );
- QDomDocument serviceInfo = archiveFileXml( "ServiceInformation.xml" );
+ TQDomDocument serviceInfo = archiveFileXml( "ServiceInformation.xml" );
if ( !serviceInfo.isNull() )
readServiceInformation( serviceInfo );
@@ -261,7 +261,7 @@ bool ResourceTVAnytime::readSchedule()
readService( it.key() );
}
#else
- QString serviceId = "BBCOne";
+ TQString serviceId = "BBCOne";
Service s = mServiceMap[ serviceId ];
if ( s.active() )
readService( serviceId );
@@ -271,22 +271,22 @@ bool ResourceTVAnytime::readSchedule()
return true;
}
-bool ResourceTVAnytime::readServiceInformation( const QDomDocument & serviceInfo )
+bool ResourceTVAnytime::readServiceInformation( const TQDomDocument & serviceInfo )
{
kdDebug() << k_funcinfo << endl;
- QDomElement docElem = serviceInfo.documentElement();
+ TQDomElement docElem = serviceInfo.documentElement();
- QDomNode n = docElem.firstChild();
+ TQDomNode n = docElem.firstChild();
while( !n.isNull() ) {
- QDomElement e = n.toElement(); // try to convert the node to an element.
+ TQDomElement e = n.toElement(); // try to convert the node to an element.
if( !e.isNull() && e.tagName() == "ProgramDescription" ) {
- QDomNode n2 = e.firstChild();
- QDomElement e2 = n2.toElement();
+ TQDomNode n2 = e.firstChild();
+ TQDomElement e2 = n2.toElement();
if( !e2.isNull() && e2.tagName() == "ServiceInformationTable" ) {
- QDomNode n3 = e2.firstChild();
+ TQDomNode n3 = e2.firstChild();
while ( !n3.isNull() ) {
Service s;
- QDomElement e3 = n3.toElement();
+ TQDomElement e3 = n3.toElement();
if (s.loadXML( e3 ) ) {
s.setActive( mActiveServices.contains( s.id() ) );
bool newService = !mServiceMap.contains( s.id() );
@@ -311,24 +311,24 @@ bool ResourceTVAnytime::readServiceInformation( const QDomDocument & serviceInfo
return true;
}
-bool ResourceTVAnytime::readService( const QString & serviceId )
+bool ResourceTVAnytime::readService( const TQString & serviceId )
{
kdDebug() << k_funcinfo << endl;
// open programme information table
Service service = mServiceMap[ serviceId ];
- QStringList entries = mScheduleArchive->directory()->entries();
- QRegExp re( "^(\\d{8})" + serviceId );
- QStringList dates;
- QString todaysDate = QDate::currentDate().toString( "yyyyMMdd" );
- for( QStringList::Iterator it = entries.begin(); it != entries.end(); ++it )
+ TQStringList entries = mScheduleArchive->directory()->entries();
+ TQRegExp re( "^(\\d{8})" + serviceId );
+ TQStringList dates;
+ TQString todaysDate = TQDate::currentDate().toString( "yyyyMMdd" );
+ for( TQStringList::Iterator it = entries.begin(); it != entries.end(); ++it )
{
if ( re.search( *it ) != -1 ) // this entry belongs to the requested service
{
- QString entry = re.cap( 1 );
+ TQString entry = re.cap( 1 );
// handle this date according to user preferences
- QDate entryDate( entry.left( 4 ).toInt(), entry.mid( 4, 2 ).toInt(), entry.right( 2 ).toInt() );
- if ( entryDate < QDate::currentDate() || ( entryDate > QDate::currentDate().addDays( prefs()->days() - 1 ) ) )
+ TQDate entryDate( entry.left( 4 ).toInt(), entry.mid( 4, 2 ).toInt(), entry.right( 2 ).toInt() );
+ if ( entryDate < TQDate::currentDate() || ( entryDate > TQDate::currentDate().addDays( prefs()->days() - 1 ) ) )
continue;
if ( !dates.contains( re.cap( 1 ) ) )
@@ -338,23 +338,23 @@ bool ResourceTVAnytime::readService( const QString & serviceId )
kdDebug() << "reading schedule for " << serviceId << " on " << dates << endl;
- for( QStringList::Iterator it = dates.begin(); it != dates.end(); ++it )
+ for( TQStringList::Iterator it = dates.begin(); it != dates.end(); ++it )
{
ProgramInformationMap progInfoMap = service.programmeInformation();
- QString programInfoFileName = QString( *it + serviceId + "_pi.xml" );
- QDomDocument programInfo = archiveFileXml( programInfoFileName );
+ TQString programInfoFileName = TQString( *it + serviceId + "_pi.xml" );
+ TQDomDocument programInfo = archiveFileXml( programInfoFileName );
if ( !programInfo.isNull() ) {
- QDomElement docElem = programInfo.documentElement();
- QDomNode n = docElem.firstChild();
+ TQDomElement docElem = programInfo.documentElement();
+ TQDomNode n = docElem.firstChild();
while( !n.isNull() ) {
- QDomElement e = n.toElement(); // try to convert the node to an element.
+ TQDomElement e = n.toElement(); // try to convert the node to an element.
if( !e.isNull() && e.tagName() == "ProgramDescription" ) {
- QDomNode n2 = e.firstChild();
- QDomElement e2 = n2.toElement();
+ TQDomNode n2 = e.firstChild();
+ TQDomElement e2 = n2.toElement();
if( !e2.isNull() && e2.tagName() == "ProgramInformationTable" ) {
- QDomNode n3 = e2.firstChild();
+ TQDomNode n3 = e2.firstChild();
while ( !n3.isNull() ) {
- QDomElement e3 = n3.toElement();
+ TQDomElement e3 = n3.toElement();
ProgramInformation pi;
if ( pi.loadXML( e3 ) ) {
//kdDebug() << "Found programme: " << pi.id() << "," << pi.title() << "," << pi.synopsis() << endl;
@@ -372,25 +372,25 @@ bool ResourceTVAnytime::readService( const QString & serviceId )
kdDebug() << "Service file: " << programInfoFileName << " not found in archive" << endl;
// open programme location table, iterate and create incidences
- QString programLocationFileName = QString( *it + serviceId + "_pl.xml" );
- QDomDocument programLocation = archiveFileXml( programLocationFileName );
+ TQString programLocationFileName = TQString( *it + serviceId + "_pl.xml" );
+ TQDomDocument programLocation = archiveFileXml( programLocationFileName );
if ( !programLocation.isNull() ) {
- QDomElement docElem = programLocation.documentElement();
- QDomNode n = docElem.firstChild();
+ TQDomElement docElem = programLocation.documentElement();
+ TQDomNode n = docElem.firstChild();
while( !n.isNull() ) {
- QDomElement e = n.toElement(); // try to convert the node to an element.
+ TQDomElement e = n.toElement(); // try to convert the node to an element.
if( !e.isNull() && e.tagName() == "ProgramDescription" ) {
- QDomNode n2 = e.firstChild();
- QDomElement e2 = n2.toElement();
+ TQDomNode n2 = e.firstChild();
+ TQDomElement e2 = n2.toElement();
if( !e2.isNull() && e2.tagName() == "ProgramLocationTable" ) {
- QDomNode n3 = e2.firstChild();
- QDomElement e3 = n3.toElement();
+ TQDomNode n3 = e2.firstChild();
+ TQDomElement e3 = n3.toElement();
if( !e3.isNull() && e3.tagName() == "Schedule" ) {
- QString foundServiceId = e3.attribute( "serviceIDRef" );
+ TQString foundServiceId = e3.attribute( "serviceIDRef" );
if ( serviceId == foundServiceId ) {
- QDomNode n4 = e3.firstChild();
+ TQDomNode n4 = e3.firstChild();
while ( !n4.isNull() ) {
- QDomElement e4 = n4.toElement();
+ TQDomElement e4 = n4.toElement();
ScheduleEvent se;
if ( se.loadXML( e4 ) ) {
ProgramInformation pi = progInfoMap[ se.crid() ];
@@ -428,31 +428,31 @@ bool ResourceTVAnytime::readService( const QString & serviceId )
return true;
}
-QStringList ResourceTVAnytime::subresources() const
+TQStringList ResourceTVAnytime::subresources() const
{
//const_cast<ResourceTVAnytime*>( this )->doLoad();
return mServiceMap.keys();
}
const QString
-ResourceTVAnytime::labelForSubresource( const QString& subresource ) const
+ResourceTVAnytime::labelForSubresource( const TQString& subresource ) const
{
Service s = mServiceMap[ subresource ];
return s.name();
}
-QString ResourceTVAnytime::subresourceIdentifier( Incidence *incidence )
+TQString ResourceTVAnytime::subresourceIdentifier( Incidence *incidence )
{
return incidence->customProperty( "TVANYWHERE", "SERVICEID" );
}
-bool ResourceTVAnytime::subresourceActive( const QString & subresource ) const
+bool ResourceTVAnytime::subresourceActive( const TQString & subresource ) const
{
Service s = mServiceMap[ subresource ];
return s.active();
}
-void ResourceTVAnytime::setSubresourceActive( const QString & subresource, bool active )
+void ResourceTVAnytime::setSubresourceActive( const TQString & subresource, bool active )
{
if ( mServiceMap.contains( subresource ) )
{
diff --git a/kresources/tvanytime/kcal_resourcetvanytime.h b/kresources/tvanytime/kcal_resourcetvanytime.h
index 227ff4f10..bad3f2206 100644
--- a/kresources/tvanytime/kcal_resourcetvanytime.h
+++ b/kresources/tvanytime/kcal_resourcetvanytime.h
@@ -21,7 +21,7 @@
#ifndef KCAL_RESOURCETVANYTIME_H
#define KCAL_RESOURCETVANYTIME_H
-#include <qtimer.h>
+#include <tqtimer.h>
#include <libkdepim/progressmanager.h>
@@ -38,8 +38,8 @@ class QDomDocument;
class KTar;
class KTempFile;
-typedef QMap< QString, Service > ServiceMap;
-typedef QMap< QString, QString > UidMap;
+typedef TQMap< TQString, Service > ServiceMap;
+typedef TQMap< TQString, TQString > UidMap;
namespace KCal {
@@ -63,13 +63,13 @@ class KDE_EXPORT ResourceTVAnytime : public ResourceCached
TVAnytimePrefsBase *prefs();
- QStringList subresources() const;
- const QString labelForSubresource( const QString& subresource ) const;
- QString subresourceIdentifier( Incidence *incidence );
+ TQStringList subresources() const;
+ const TQString labelForSubresource( const TQString& subresource ) const;
+ TQString subresourceIdentifier( Incidence *incidence );
/** Is this subresource active? */
- bool subresourceActive( const QString& ) const;
+ bool subresourceActive( const TQString& ) const;
/** (De)activate the subresource */
- virtual void setSubresourceActive( const QString &, bool );
+ virtual void setSubresourceActive( const TQString &, bool );
bool doOpen();
void doClose();
@@ -84,7 +84,7 @@ class KDE_EXPORT ResourceTVAnytime : public ResourceCached
/**
* Extract the XML from the given filename within the schedule archive
*/
- QDomDocument archiveFileXml( const QString & name );
+ TQDomDocument archiveFileXml( const TQString & name );
/**
* Read the tv schedule from the tarball downloaded to mDestination
@@ -94,10 +94,10 @@ class KDE_EXPORT ResourceTVAnytime : public ResourceCached
/**
* Read the service information map from the supplied xml
*/
- bool readServiceInformation( const QDomDocument & );
+ bool readServiceInformation( const TQDomDocument & );
bool readServices() { return true; }
- bool readService( const QString & serviceId );
- bool readProgrammeInformation( const QDomDocument & );
+ bool readService( const TQString & serviceId );
+ bool readProgrammeInformation( const TQDomDocument & );
protected slots:
void slotJobResult( KIO::Job * );
@@ -113,14 +113,14 @@ class KDE_EXPORT ResourceTVAnytime : public ResourceCached
bool mIsShowingError;
- QTimer mResourceChangedTimer;
+ TQTimer mResourceChangedTimer;
KTempFile * mDestination;
KTar * mScheduleArchive;
ServiceMap mServiceMap;
UidMap mUidMap;
//TODO: read this from subresource config
- QStringList mActiveServices;
+ TQStringList mActiveServices;
};
diff --git a/kresources/tvanytime/kcal_resourcetvanytimeconfig.cpp b/kresources/tvanytime/kcal_resourcetvanytimeconfig.cpp
index a910a4f60..47d62d376 100644
--- a/kresources/tvanytime/kcal_resourcetvanytimeconfig.cpp
+++ b/kresources/tvanytime/kcal_resourcetvanytimeconfig.cpp
@@ -20,10 +20,10 @@
#include <typeinfo>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qspinbox.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqspinbox.h>
+#include <tqwhatsthis.h>
#include <kconfigskeleton.h>
#include <klocale.h>
@@ -40,19 +40,19 @@
using namespace KCal;
-ResourceTVAnytimeConfig::ResourceTVAnytimeConfig( QWidget* parent, const char* name )
+ResourceTVAnytimeConfig::ResourceTVAnytimeConfig( TQWidget* parent, const char* name )
: KRES::ConfigWidget( parent, name )
{
resize( 245, 115 );
- QGridLayout *mainLayout = new QGridLayout( this, 2, 2 );
+ TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2 );
- QLabel *label = new QLabel( i18n( "Schedule tarball URL:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Schedule tarball URL:" ), this );
mainLayout->addWidget( label, 1, 0 );
mUrl = new KLineEdit( this );
mainLayout->addWidget( mUrl, 1, 1 );
- label = new QLabel( i18n( "Retrieve how many days?" ), this );
+ label = new TQLabel( i18n( "Retrieve how many days?" ), this );
mainLayout->addWidget( label, 2, 0 );
- mDays = new QSpinBox( this );
+ mDays = new TQSpinBox( this );
mainLayout->addWidget( mDays, 2, 1 );
mReloadConfig = new KCal::ResourceCachedReloadConfig( this );
mainLayout->addMultiCellWidget( mReloadConfig, 3, 3, 0, 1 );
@@ -73,7 +73,7 @@ void ResourceTVAnytimeConfig::loadSettings( KRES::Resource *resource )
KConfigSkeleton::ItemInt * daysItem = res->prefs()->daysItem();
mDays->setMinValue( daysItem->minValue().toInt() );
mDays->setMaxValue( daysItem->maxValue().toInt() );
- QWhatsThis::add( mDays, daysItem->whatsThis() );
+ TQWhatsThis::add( mDays, daysItem->whatsThis() );
mUrl->setText( res->prefs()->url() );
mDays->setValue( res->prefs()->days() );
mReloadConfig->loadSettings( res );
diff --git a/kresources/tvanytime/kcal_resourcetvanytimeconfig.h b/kresources/tvanytime/kcal_resourcetvanytimeconfig.h
index 248b386d5..cd3701858 100644
--- a/kresources/tvanytime/kcal_resourcetvanytimeconfig.h
+++ b/kresources/tvanytime/kcal_resourcetvanytimeconfig.h
@@ -42,7 +42,7 @@ class KDE_EXPORT ResourceTVAnytimeConfig : public KRES::ConfigWidget
{
Q_OBJECT
public:
- ResourceTVAnytimeConfig( QWidget *parent = 0, const char *name = 0 );
+ ResourceTVAnytimeConfig( TQWidget *parent = 0, const char *name = 0 );
public slots:
virtual void loadSettings( KRES::Resource *resource );
@@ -50,7 +50,7 @@ Q_OBJECT
private:
KLineEdit *mUrl;
- QSpinBox *mDays;
+ TQSpinBox *mDays;
ResourceCachedReloadConfig *mReloadConfig;
ResourceCachedSaveConfig *mSaveConfig;
ResourceTVAnytime *mResource;
diff --git a/kresources/tvanytime/kcal_tvanytimeprefs.cpp b/kresources/tvanytime/kcal_tvanytimeprefs.cpp
index a6b503c05..26f3f7ef3 100644
--- a/kresources/tvanytime/kcal_tvanytimeprefs.cpp
+++ b/kresources/tvanytime/kcal_tvanytimeprefs.cpp
@@ -27,7 +27,7 @@ TVAnytimePrefs::TVAnytimePrefs()
{
}
-QString TVAnytimePrefs::scheduleUrl() const
+TQString TVAnytimePrefs::scheduleUrl() const
{
return url();
}
diff --git a/kresources/tvanytime/kcal_tvanytimeprefs.h b/kresources/tvanytime/kcal_tvanytimeprefs.h
index 52bb31152..2ab10802e 100644
--- a/kresources/tvanytime/kcal_tvanytimeprefs.h
+++ b/kresources/tvanytime/kcal_tvanytimeprefs.h
@@ -29,7 +29,7 @@ class TVAnytimePrefs : public TVAnytimePrefsBase
public:
TVAnytimePrefs();
- QString scheduleUrl() const;
+ TQString scheduleUrl() const;
};
}
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() );
}
}
diff --git a/kresources/tvanytime/service.h b/kresources/tvanytime/service.h
index 4df8841da..78570fe1f 100644
--- a/kresources/tvanytime/service.h
+++ b/kresources/tvanytime/service.h
@@ -21,90 +21,90 @@
#ifndef SERVICE_H
#define SERVICE_H
-#include <qdatetime.h>
-#include <qdom.h>
-#include <qmap.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdatetime.h>
+#include <tqdom.h>
+#include <tqmap.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kurl.h>
class ProgramInformation {
public:
ProgramInformation() {}
- ProgramInformation( const QString & title, const QString &synopsis );
+ ProgramInformation( const TQString & title, const TQString &synopsis );
virtual ~ProgramInformation() {}
- QString id() const { return mId; }
- QString title() const { return mTitle; }
- QString synopsis() const { return mSynopsis; }
- QStringList genres() const { return mGenres; }
+ TQString id() const { return mId; }
+ TQString title() const { return mTitle; }
+ TQString synopsis() const { return mSynopsis; }
+ TQStringList genres() const { return mGenres; }
- void setId ( const QString & id ) { mId = id; }
- void setGenres( const QStringList & genres ) { mGenres = genres; }
- bool loadXML( const QDomElement & );
- bool loadAttribute( const QDomElement& element );
+ void setId ( const TQString & id ) { mId = id; }
+ void setGenres( const TQStringList & genres ) { mGenres = genres; }
+ bool loadXML( const TQDomElement & );
+ bool loadAttribute( const TQDomElement& element );
private:
- QString mId;
- QString mTitle;
- QString mSynopsis;
- QStringList mGenres;
+ TQString mId;
+ TQString mTitle;
+ TQString mSynopsis;
+ TQStringList mGenres;
};
-typedef QMap< QString, ProgramInformation > ProgramInformationMap;
+typedef TQMap< TQString, ProgramInformation > ProgramInformationMap;
class ScheduleEvent {
public:
ScheduleEvent() {}
virtual ~ScheduleEvent() {}
- QString crid() const { return mCrid; }
- QDateTime startTime() const { return mStartTime; }
+ TQString crid() const { return mCrid; }
+ TQDateTime startTime() const { return mStartTime; }
uint duration() const { return mDuration; }
- QString programUrl() const { return mUrl; }
+ TQString programUrl() const { return mUrl; }
- bool loadXML( const QDomElement & );
- bool loadAttribute( const QDomElement& element );
+ bool loadXML( const TQDomElement & );
+ bool loadAttribute( const TQDomElement& element );
private:
- QString mCrid;
- QString mUrl;
- QDateTime mStartTime;
+ TQString mCrid;
+ TQString mUrl;
+ TQDateTime mStartTime;
uint mDuration;
- static QRegExp sRegExp;
+ static TQRegExp sRegExp;
};
class Service {
public:
Service();
- Service( bool active, const QString & name, const QString & owner, const KURL & serviceUrl, const KURL & logo, const QStringList & genres );
+ Service( bool active, const TQString & name, const TQString & owner, const KURL & serviceUrl, const KURL & logo, const TQStringList & genres );
virtual ~Service() {}
- void setId( const QString & id ) { mId = id; }
+ void setId( const TQString & id ) { mId = id; }
void setActive( bool active );
- void setName( const QString& name );
+ void setName( const TQString& name );
void setProgramInformation( const ProgramInformationMap & map );
- QString id() const { return mId; }
+ TQString id() const { return mId; }
bool active() const;
- QString name() const;
+ TQString name() const;
ProgramInformationMap programmeInformation() const;
- bool loadXML( const QDomElement & );
- bool loadDescription( const QDomElement & );
- bool loadAttribute( const QDomElement& element );
+ bool loadXML( const TQDomElement & );
+ bool loadDescription( const TQDomElement & );
+ bool loadAttribute( const TQDomElement& element );
private:
- QString mId;
+ TQString mId;
bool mActive;
- QString mName;
- QString mOwner;
+ TQString mName;
+ TQString mOwner;
KURL mServiceUrl;
KURL mLogo;
- QStringList mGenres;
+ TQStringList mGenres;
ProgramInformationMap mProgInfo;
};