summaryrefslogtreecommitdiffstats
path: root/kaddressbook-plugins/xxports/gmx
diff options
context:
space:
mode:
Diffstat (limited to 'kaddressbook-plugins/xxports/gmx')
-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
3 files changed, 29 insertions, 28 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"; }