summaryrefslogtreecommitdiffstats
path: root/kaddressbook-plugins/xxports
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 17:00:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 17:00:31 +0000
commit395a904bff7b4d6ead445c342f7ac0c5fbf29121 (patch)
tree9829cadb79d2cc7c29a940627fadb28b11e54150 /kaddressbook-plugins/xxports
parent399f47c376fdf4d19192732a701ea9578d11619d (diff)
downloadtdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.tar.gz
tdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.zip
TQt4 port kdeaddons
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1237404 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kaddressbook-plugins/xxports')
-rw-r--r--kaddressbook-plugins/xxports/gmx/Makefile.am2
-rw-r--r--kaddressbook-plugins/xxports/gmx/gmx_xxport.cpp48
-rw-r--r--kaddressbook-plugins/xxports/gmx/gmx_xxport.h7
-rw-r--r--kaddressbook-plugins/xxports/kworldclock/Makefile.am2
-rw-r--r--kaddressbook-plugins/xxports/kworldclock/geo_xxport.cpp20
-rw-r--r--kaddressbook-plugins/xxports/kworldclock/geo_xxport.h7
6 files changed, 44 insertions, 42 deletions
diff --git a/kaddressbook-plugins/xxports/gmx/Makefile.am b/kaddressbook-plugins/xxports/gmx/Makefile.am
index facdd37..977ed42 100644
--- a/kaddressbook-plugins/xxports/gmx/Makefile.am
+++ b/kaddressbook-plugins/xxports/gmx/Makefile.am
@@ -1,4 +1,4 @@
-INCLUDES = $(all_includes)
+INCLUDES = $(all_includes) -I$(kde_includes)/kde
kde_module_LTLIBRARIES = libkaddrbk_gmx_xxport.la
diff --git a/kaddressbook-plugins/xxports/gmx/gmx_xxport.cpp b/kaddressbook-plugins/xxports/gmx/gmx_xxport.cpp
index 4a492f0..a726458 100644
--- a/kaddressbook-plugins/xxports/gmx/gmx_xxport.cpp
+++ b/kaddressbook-plugins/xxports/gmx/gmx_xxport.cpp
@@ -16,8 +16,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
As a special exception, permission is given to link this program
- with any edition of Qt, and distribute the resulting executable,
- without including the source code for Qt in the source distribution.
+ with any edition of TQt, and distribute the resulting executable,
+ without including the source code for TQt in the source distribution.
Description:
@@ -48,8 +48,8 @@ K_EXPORT_KADDRESSBOOK_XXFILTER_CATALOG( libkaddrbk_gmx_xxport, GMXXXPort, "libka
#define GMX_FILESELECTION_STRING "*.gmxa|" + i18n( "GMX addressbook file (*.gmxa)" )
-GMXXXPort::GMXXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name )
- : KAB::XXPort( ab, parent, name )
+GMXXXPort::GMXXXPort( KABC::AddressBook *ab, TQWidget *tqparent, const char *name )
+ : KAB::XXPort( ab, tqparent, name )
{
createImportAction( i18n( "Import GMX Address Book..." ) );
createExportAction( i18n( "Export GMX Address Book..." ) );
@@ -80,7 +80,7 @@ KABC::AddresseeList GMXXXPort::importContacts( const TQString& ) const
TQFile file( fileName );
if ( !file.open( IO_ReadOnly ) ) {
TQString msg = i18n( "<qt>Unable to open <b>%1</b> for reading.</qt>" );
- KMessageBox::error( parentWidget(), msg.arg( fileName ) );
+ KMessageBox::error( tqparentWidget(), msg.tqarg( fileName ) );
return addrList;
}
@@ -91,7 +91,7 @@ KABC::AddresseeList GMXXXPort::importContacts( const TQString& ) const
line = gmxStream.readLine();
line2 = gmxStream.readLine();
if (!line.startsWith("AB_ADDRESSES:") || !line2.startsWith("Address_id")) {
- KMessageBox::error( parentWidget(), i18n("%1 is not a GMX address book file.").arg(fileName) );
+ KMessageBox::error( tqparentWidget(), i18n("%1 is not a GMX address book file.").tqarg(fileName) );
return addrList;
}
@@ -99,7 +99,7 @@ KABC::AddresseeList GMXXXPort::importContacts( const TQString& ) const
typedef TQMap<TQString, KABC::Addressee *> AddressMap;
AddressMap addrMap;
- // "Address_id,Nickname,Firstname,Lastname,Title,Birthday,Comments,Change_date,Status,Address_link_id,Categories"
+ // "Address_id,Nickname,Firstname,Lastname,Title,Birthday,Comments,Change_date,tqStatus,Address_link_id,Categories"
line = gmxStream.readLine();
while (!line.startsWith("####") && !gmxStream.atEnd()) {
while (1) {
@@ -122,7 +122,7 @@ KABC::AddresseeList GMXXXPort::importContacts( const TQString& ) const
if (checkDateTime(strList[5],dt)) addr->setBirthday(dt);
addr->setNote(strList[6]);
if (checkDateTime(strList[7],dt)) addr->setRevision(dt);
- // addr->setStatus(strList[8]); Status
+ // addr->settqStatus(strList[8]); tqStatus
// addr->xxx(strList[9]); Address_link_id
// addr->setCategory(strList[10]); Categories
addrMap[strList[0]] = addr;
@@ -137,7 +137,7 @@ KABC::AddresseeList GMXXXPort::importContacts( const TQString& ) const
return addrList;
}
// Address_id,Record_id,Street,Country,Zipcode,City,Phone,Fax,Mobile,Mobile_type,Email,
- // Homepage,Position,Comments,Record_type_id,Record_type,Company,Department,Change_date,Preferred,Status
+ // Homepage,Position,Comments,Record_type_id,Record_type,Company,Department,Change_date,Preferred,tqStatus
line = gmxStream.readLine();
line = gmxStream.readLine();
@@ -181,7 +181,7 @@ KABC::AddresseeList GMXXXPort::importContacts( const TQString& ) const
"KADDRESSBOOK", "X-Department", strList[17]); // Department
if (checkDateTime(strList[18],dt)) addr->setRevision(dt); // Change_date
// strList[19]=Preferred (see above)
- // strList[20]=Status (should always be "1")
+ // strList[20]=tqStatus (should always be "1")
addr->insertAddress(adr);
} else {
kdWarning() << "unresolved line: " << line << endl;
@@ -214,22 +214,22 @@ bool GMXXXPort::exportContacts( const KABC::AddresseeList &list, const TQString&
KTempFile tmpFile;
if ( tmpFile.status() != 0 ) {
TQString txt = i18n( "<qt>Unable to open file <b>%1</b>.%2.</qt>" );
- KMessageBox::error( parentWidget(), txt.arg( url.url() )
- .arg( strerror( tmpFile.status() ) ) );
+ KMessageBox::error( tqparentWidget(), txt.tqarg( url.url() )
+ .tqarg( strerror( tmpFile.status() ) ) );
return false;
}
doExport( tmpFile.file(), list );
tmpFile.close();
- return KIO::NetAccess::upload( tmpFile.name(), url, parentWidget() );
+ return KIO::NetAccess::upload( tmpFile.name(), url, tqparentWidget() );
} else {
TQString filename = url.path();
TQFile file( filename );
if ( !file.open( IO_WriteOnly ) ) {
TQString txt = i18n( "<qt>Unable to open file <b>%1</b>.</qt>" );
- KMessageBox::error( parentWidget(), txt.arg( filename ) );
+ KMessageBox::error( tqparentWidget(), txt.tqarg( filename ) );
return false;
}
@@ -243,7 +243,7 @@ bool GMXXXPort::exportContacts( const KABC::AddresseeList &list, const TQString&
static const TQString dateString( const TQDateTime &dt )
{
if (!dt.isValid())
- return TQString::fromLatin1("1000-01-01 00:00:00");
+ return TQString::tqfromLatin1("1000-01-01 00:00:00");
TQString d(dt.toString(Qt::ISODate));
d[10] = ' '; // remove the "T" in the middle of the string
return d;
@@ -264,7 +264,7 @@ void GMXXXPort::doExport( TQFile *fp, const KABC::AddresseeList &list )
t << "AB_ADDRESSES:\n";
t << "Address_id,Nickname,Firstname,Lastname,Title,Birthday,Comments,"
- "Change_date,Status,Address_link_id,Categories\n";
+ "Change_date,tqStatus,Address_link_id,Categories\n";
int no = 0;
const TQChar DELIM('#');
@@ -279,16 +279,16 @@ void GMXXXPort::doExport( TQFile *fp, const KABC::AddresseeList &list )
<< addr->familyName() << DELIM // Lastname
<< addr->title() << DELIM // Title
<< dateString(addr->birthday()) << DELIM // Birthday
- << addr->note() /*.replace('\n',"\r\n")*/ << DELIM // Comments
+ << addr->note() /*.tqreplace('\n',"\r\n")*/ << DELIM // Comments
<< dateString(addr->revision()) << DELIM // Change_date
- << "1##0\n"; // Status, Address_link_id, Categories
+ << "1##0\n"; // tqStatus, Address_link_id, Categories
}
t << "####\n";
t << "AB_ADDRESS_RECORDS:\n";
t << "Address_id,Record_id,Street,Country,Zipcode,City,Phone,Fax,Mobile,"
"Mobile_type,Email,Homepage,Position,Comments,Record_type_id,Record_type,"
- "Company,Department,Change_date,Preferred,Status\n";
+ "Company,Department,Change_date,Preferred,tqStatus\n";
no = 1;
while ( (addr = addrMap[no]) != NULL ) {
@@ -324,16 +324,16 @@ void GMXXXPort::doExport( TQFile *fp, const KABC::AddresseeList &list )
<< cell.number() << DELIM // Mobile
<< ((cell.type()&KABC::PhoneNumber::Pref)?-1:0) << DELIM // Mobile_type
<< email << DELIM // Email
- << ((record_id==0)?addr->url().url():TQString::null) << DELIM // Homepage
- << ((record_id==0)?addr->role():TQString::null) << DELIM // Position
+ << ((record_id==0)?addr->url().url():TQString()) << DELIM // Homepage
+ << ((record_id==0)?addr->role():TQString()) << DELIM // Position
<< DELIM // Comments
<< record_id << DELIM // Record_type_id (0,1,2) - see above
<< DELIM // Record_type (name of this additional record entry)
- << ((record_id==0)?addr->organization():TQString::null) << DELIM // Company
- << ((record_id==0)?addr->custom("KADDRESSBOOK", "X-Department"):TQString::null) << DELIM // Department
+ << ((record_id==0)?addr->organization():TQString()) << DELIM // Company
+ << ((record_id==0)?addr->custom("KADDRESSBOOK", "X-Department"):TQString()) << DELIM // Department
<< dateString(addr->revision()) << DELIM // Change_date
<< 5 << DELIM // Preferred
- << 1 << endl; // Status (should always be "1")
+ << 1 << endl; // tqStatus (should always be "1")
}
++no;
diff --git a/kaddressbook-plugins/xxports/gmx/gmx_xxport.h b/kaddressbook-plugins/xxports/gmx/gmx_xxport.h
index 607455c..dd4661b 100644
--- a/kaddressbook-plugins/xxports/gmx/gmx_xxport.h
+++ b/kaddressbook-plugins/xxports/gmx/gmx_xxport.h
@@ -18,8 +18,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
As a special exception, permission is given to link this program
- with any edition of Qt, and distribute the resulting executable,
- without including the source code for Qt in the source distribution.
+ with any edition of TQt, and distribute the resulting executable,
+ without including the source code for TQt in the source distribution.
*/
#ifndef GMX_XXPORT_H
@@ -30,9 +30,10 @@
class GMXXXPort : public KAB::XXPort
{
Q_OBJECT
+ TQ_OBJECT
public:
- GMXXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 );
+ GMXXXPort( KABC::AddressBook *ab, TQWidget *tqparent, const char *name = 0 );
TQString identifier() const { return "gmx"; }
diff --git a/kaddressbook-plugins/xxports/kworldclock/Makefile.am b/kaddressbook-plugins/xxports/kworldclock/Makefile.am
index ee28aa6..ab7ef9d 100644
--- a/kaddressbook-plugins/xxports/kworldclock/Makefile.am
+++ b/kaddressbook-plugins/xxports/kworldclock/Makefile.am
@@ -1,4 +1,4 @@
-INCLUDES = $(all_includes)
+INCLUDES = $(all_includes) -I$(kde_includes)/kde
kde_module_LTLIBRARIES = libkaddrbk_geo_xxport.la
diff --git a/kaddressbook-plugins/xxports/kworldclock/geo_xxport.cpp b/kaddressbook-plugins/xxports/kworldclock/geo_xxport.cpp
index 72256b8..ba75565 100644
--- a/kaddressbook-plugins/xxports/kworldclock/geo_xxport.cpp
+++ b/kaddressbook-plugins/xxports/kworldclock/geo_xxport.cpp
@@ -17,8 +17,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
As a special exception, permission is given to link this program
- with any edition of Qt, and distribute the resulting executable,
- without including the source code for Qt in the source distribution.
+ with any edition of TQt, and distribute the resulting executable,
+ without including the source code for TQt in the source distribution.
*/
#include <kconfig.h>
@@ -40,8 +40,8 @@ class FlagInfo
K_EXPORT_KADDRESSBOOK_XXFILTER_CATALOG( libkaddrbk_geo_xxport, GeoXXPort, "libkaddrbk_geo_xxport" )
-GeoXXPort::GeoXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name )
- : KAB::XXPort( ab, parent, name )
+GeoXXPort::GeoXXPort( KABC::AddressBook *ab, TQWidget *tqparent, const char *name )
+ : KAB::XXPort( ab, tqparent, name )
{
createExportAction( i18n( "Export Geo Data..." ) );
}
@@ -58,9 +58,9 @@ bool GeoXXPort::exportContacts( const KABC::AddresseeList &list, const TQString&
if ( flags != 0 ) {
for ( int i = 0; i < flags; ++i ) {
FlagInfo info;
- 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 ) );
+ info.latitude = config.readDoubleNumEntry( TQString( "Flag_%1_Latitude" ).tqarg( i ) );
+ info.longitude = config.readDoubleNumEntry( TQString( "Flag_%1_Longitude" ).tqarg( i ) );
+ info.color = config.readColorEntry( TQString( "Flag_%1_Color" ).tqarg( i ) );
availableFlags.append( info );
}
@@ -102,9 +102,9 @@ bool GeoXXPort::exportContacts( const KABC::AddresseeList &list, const TQString&
int startVal = 0;
TQValueList<FlagInfo>::Iterator it;
for ( it = flagList.begin(); it != flagList.end(); ++it, ++startVal ) {
- 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( TQString( "Flag_%1_Color" ).tqarg( startVal ), (*it).color );
+ config.writeEntry( TQString( "Flag_%1_Latitude" ).tqarg( startVal ), (*it).latitude );
+ config.writeEntry( TQString( "Flag_%1_Longitude" ).tqarg( 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 cdac56a..d31ce49 100644
--- a/kaddressbook-plugins/xxports/kworldclock/geo_xxport.h
+++ b/kaddressbook-plugins/xxports/kworldclock/geo_xxport.h
@@ -17,8 +17,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
As a special exception, permission is given to link this program
- with any edition of Qt, and distribute the resulting executable,
- without including the source code for Qt in the source distribution.
+ with any edition of TQt, and distribute the resulting executable,
+ without including the source code for TQt in the source distribution.
*/
#ifndef GEO_XXPORT_H
@@ -29,9 +29,10 @@
class GeoXXPort : public KAB::XXPort
{
Q_OBJECT
+ TQ_OBJECT
public:
- GeoXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 );
+ GeoXXPort( KABC::AddressBook *ab, TQWidget *tqparent, const char *name = 0 );
TQString identifier() const { return "geo"; }