From 7346aee26bf190a7e70333c40fab4caca847cd27 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:22:56 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1157634 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- .../xxports/kworldclock/geo_xxport.cpp | 28 +++++++++++----------- .../xxports/kworldclock/geo_xxport.h | 6 ++--- 2 files changed, 17 insertions(+), 17 deletions(-) (limited to 'kaddressbook-plugins/xxports/kworldclock') diff --git a/kaddressbook-plugins/xxports/kworldclock/geo_xxport.cpp b/kaddressbook-plugins/xxports/kworldclock/geo_xxport.cpp index a2440aa..72256b8 100644 --- a/kaddressbook-plugins/xxports/kworldclock/geo_xxport.cpp +++ b/kaddressbook-plugins/xxports/kworldclock/geo_xxport.cpp @@ -35,39 +35,39 @@ class FlagInfo public: double latitude; double longitude; - QColor color; + TQColor color; }; K_EXPORT_KADDRESSBOOK_XXFILTER_CATALOG( libkaddrbk_geo_xxport, GeoXXPort, "libkaddrbk_geo_xxport" ) -GeoXXPort::GeoXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name ) +GeoXXPort::GeoXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name ) : KAB::XXPort( ab, parent, name ) { createExportAction( i18n( "Export Geo Data..." ) ); } -bool GeoXXPort::exportContacts( const KABC::AddresseeList &list, const QString& ) +bool GeoXXPort::exportContacts( const KABC::AddresseeList &list, const TQString& ) { KConfig config( "kworldclockrc" ); // At first we read all exiting flags and compare it with ours to // avoid duplicated flags int flags = config.readNumEntry( "Flags", 0 ); - QValueList availableFlags; + TQValueList availableFlags; if ( flags != 0 ) { for ( int i = 0; i < flags; ++i ) { FlagInfo info; - info.latitude = config.readDoubleNumEntry( QString( "Flag_%1_Latitude" ).arg( i ) ); - info.longitude = config.readDoubleNumEntry( QString( "Flag_%1_Longitude" ).arg( i ) ); - info.color = config.readColorEntry( QString( "Flag_%1_Color" ).arg( i ) ); + info.latitude = config.readDoubleNumEntry( TQString( "Flag_%1_Latitude" ).arg( i ) ); + info.longitude = config.readDoubleNumEntry( TQString( "Flag_%1_Longitude" ).arg( i ) ); + info.color = config.readColorEntry( TQString( "Flag_%1_Color" ).arg( i ) ); availableFlags.append( info ); } } - QValueList flagList; + TQValueList flagList; KABC::AddresseeList::ConstIterator addrIt; for ( addrIt = list.begin(); addrIt != list.end(); ++addrIt ) { KABC::Geo geo( (*addrIt).geo() ); @@ -75,7 +75,7 @@ bool GeoXXPort::exportContacts( const KABC::AddresseeList &list, const QString& continue; bool available = false; - QValueList::Iterator it; + TQValueList::Iterator it; for ( it = availableFlags.begin(); it != availableFlags.end(); ++it ) { if ( !( KABS( (*it).latitude - geo.latitude() ) > DBL_EPSILON ) && !( KABS( (*it).longitude - geo.longitude() ) > DBL_EPSILON ) ) { @@ -88,7 +88,7 @@ bool GeoXXPort::exportContacts( const KABC::AddresseeList &list, const QString& FlagInfo info; info.latitude = geo.latitude(); info.longitude = geo.longitude(); - info.color = QColor( 0, 255, 0 ); + info.color = TQColor( 0, 255, 0 ); flagList.append( info ); } @@ -100,11 +100,11 @@ bool GeoXXPort::exportContacts( const KABC::AddresseeList &list, const QString& flagList += availableFlags; int startVal = 0; - QValueList::Iterator it; + TQValueList::Iterator it; for ( it = flagList.begin(); it != flagList.end(); ++it, ++startVal ) { - config.writeEntry( QString( "Flag_%1_Color" ).arg( startVal ), (*it).color ); - config.writeEntry( QString( "Flag_%1_Latitude" ).arg( startVal ), (*it).latitude ); - config.writeEntry( QString( "Flag_%1_Longitude" ).arg( startVal ), (*it).longitude ); + config.writeEntry( TQString( "Flag_%1_Color" ).arg( startVal ), (*it).color ); + config.writeEntry( TQString( "Flag_%1_Latitude" ).arg( startVal ), (*it).latitude ); + config.writeEntry( TQString( "Flag_%1_Longitude" ).arg( startVal ), (*it).longitude ); } config.writeEntry( "Flags", startVal ); diff --git a/kaddressbook-plugins/xxports/kworldclock/geo_xxport.h b/kaddressbook-plugins/xxports/kworldclock/geo_xxport.h index d3b560a..cdac56a 100644 --- a/kaddressbook-plugins/xxports/kworldclock/geo_xxport.h +++ b/kaddressbook-plugins/xxports/kworldclock/geo_xxport.h @@ -31,12 +31,12 @@ class GeoXXPort : public KAB::XXPort Q_OBJECT public: - GeoXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); + GeoXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 ); - QString identifier() const { return "geo"; } + TQString identifier() const { return "geo"; } public slots: - bool exportContacts( const KABC::AddresseeList &list, const QString &data ); + bool exportContacts( const KABC::AddresseeList &list, const TQString &data ); }; #endif -- cgit v1.2.1