• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

kaddressbook

pab_xxport.cpp

Go to the documentation of this file.
00001 /*
00002     This file is part of KAddressbook.
00003     Copyright (c) 2000 Hans Dijkema <kmailcvt@hum.org>
00004     Copyright (c) 2003 Helge Deller <deller@kde.org>
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019 
00020     As a special exception, permission is given to link this program
00021     with any edition of Qt, and distribute the resulting executable,
00022     without including the source code for Qt in the source distribution.
00023 */
00024 
00025 #include <QtCore/QFile>
00026 
00027 #include <kdebug.h>
00028 #include <kfiledialog.h>
00029 #include <kio/netaccess.h>
00030 #include <klocale.h>
00031 #include <kmessagebox.h>
00032 #include <kstandarddirs.h>
00033 #include <ktemporaryfile.h>
00034 #include <kurl.h>
00035 
00036 #include "xxportmanager.h"
00037 
00038 #include "pab_xxport.h"
00039 
00040 K_EXPORT_KADDRESSBOOK_XXFILTER( kaddrbk_pab_xxport, PABXXPort )
00041 
00042 PABXXPort::PABXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name )
00043   : KAB::XXPort( ab, parent, name )
00044 {
00045   createImportAction( i18n("Import MS Exchange Personal Address Book (.PAB)") );
00046 }
00047 
00048 KABC::Addressee::List PABXXPort::importContacts( const QString& ) const
00049 {
00050   KABC::Addressee::List addrList;
00051 
00052   QString fileName = KFileDialog::getOpenFileName( QDir::homePath(),
00053             "*.[pP][aA][bB]|" + i18n("MS Exchange Personal Address Book Files (*.pab)"), 0 );
00054   if ( fileName.isEmpty() )
00055     return addrList;
00056   if ( !QFile::exists( fileName ) ) {
00057     KMessageBox::sorry( parentWidget(), i18n( "<qt>Could not find a MS Exchange Personal Address Book <b>%1</b>.</qt>", fileName ) );
00058     return addrList;
00059   }
00060 
00061   // pab PAB(QFile::encodeName(file),this,info);
00062   // info->setFrom(file);
00063   // PAB.convert();
00064 
00065   return addrList;
00066 }
00067 
00068 #include "pab_xxport.moc"
00069 
00070 // vim: ts=2 sw=2 et

kaddressbook

Skip menu "kaddressbook"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  •   doc
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal