kaddressbook
pab_xxport.cpp00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include <qfile.h>
00026
00027 #include <kdebug.h>
00028 #include <kfiledialog.h>
00029 #include <kio/netaccess.h>
00030 #include <klocale.h>
00031 #include <kmessagebox.h>
00032 #include <kprocess.h>
00033 #include <kstandarddirs.h>
00034 #include <ktempfile.h>
00035 #include <kurl.h>
00036
00037 #include "xxportmanager.h"
00038
00039 #include "pab_xxport.h"
00040
00041 K_EXPORT_KADDRESSBOOK_XXFILTER( libkaddrbk_pab_xxport, PABXXPort )
00042
00043 PABXXPort::PABXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name )
00044 : KAB::XXPort( ab, parent, name )
00045 {
00046 createImportAction( i18n("Import MS Exchange Personal Address Book (.PAB)") );
00047 }
00048
00049 KABC::AddresseeList PABXXPort::importContacts( const QString& ) const
00050 {
00051 KABC::AddresseeList addrList;
00052
00053 QString fileName = KFileDialog::getOpenFileName( QDir::homeDirPath(),
00054 "*.[pP][aA][bB]|" + i18n("MS Exchange Personal Address Book Files (*.pab)"), 0 );
00055 if ( fileName.isEmpty() )
00056 return addrList;
00057 if ( !QFile::exists( fileName ) ) {
00058 KMessageBox::sorry( parentWidget(), i18n( "<qt>Could not find a MS Exchange Personal Address Book <b>%1</b>.</qt>" ).arg( fileName ) );
00059 return addrList;
00060 }
00061
00062
00063
00064
00065
00066 return addrList;
00067 }
00068
00069 #include "pab_xxport.moc"
00070
00071
|