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

kaddressbook

  • sources
  • kde-4.14
  • kdepim
  • kaddressbook
  • xxport
xxportfactory.cpp
Go to the documentation of this file.
1 /*
2  This file is part of KAddressBook.
3  Copyright (c) 2009 Tobias Koenig <tokoe@kde.org>
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License along
16  with this program; if not, write to the Free Software Foundation, Inc.,
17  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19 
20 #include "xxportfactory.h"
21 
22 #include "csv/csv_xxport.h"
23 #include "ldif/ldif_xxport.h"
24 #include "ldap/ldap_xxport.h"
25 #include "vcard/vcard_xxport.h"
26 #include "gmx/gmx_xxport.h"
27 
28 XXPort *XXPortFactory::createXXPort( const QString &identifier, QWidget *parentWidget ) const
29 {
30  if ( identifier == QLatin1String("vcard21") || identifier == QLatin1String("vcard30") || identifier == QLatin1String("vcard40") ) {
31  XXPort *xxport = new VCardXXPort( parentWidget );
32  if ( identifier == QLatin1String("vcard21") ) {
33  xxport->setOption( QLatin1String("version"), QLatin1String("v21") );
34  } else if ( identifier == QLatin1String("vcard30") ) {
35  xxport->setOption( QLatin1String("version"), QLatin1String("v30") );
36  } else if ( identifier == QLatin1String("vcard40") ) {
37  xxport->setOption( QLatin1String("version"), QLatin1String("v40") );
38  }
39  return xxport;
40  } else if ( identifier == QLatin1String("csv") ) {
41  return new CsvXXPort( parentWidget );
42  } else if ( identifier == QLatin1String("ldif") ) {
43  return new LDIFXXPort( parentWidget );
44  } else if ( identifier == QLatin1String("ldap") ) {
45  return new LDAPXXPort( parentWidget );
46  } else if ( identifier == QLatin1String("gmx") ) {
47  return new GMXXXPort( parentWidget );
48  } else {
49  return 0;
50  }
51 }
QWidget
csv_xxport.h
gmx_xxport.h
CsvXXPort
Definition: csv_xxport.h:27
XXPort::setOption
void setOption(const QString &key, const QString &value)
Sets module specific options.
Definition: xxport.cpp:31
LDIFXXPort
Definition: ldif_xxport.h:30
vcard_xxport.h
ldap_xxport.h
QString
LDAPXXPort
Definition: ldap_xxport.h:31
GMXXXPort
Definition: gmx_xxport.h:33
xxportfactory.h
XXPort
The base class for all import/export modules.
Definition: xxport.h:35
VCardXXPort
Definition: vcard_xxport.h:25
QLatin1String
ldif_xxport.h
XXPortFactory::createXXPort
XXPort * createXXPort(const QString &identifier, QWidget *parentWidget) const
Returns a new import/export module that matches the given identifier or a null pointer if the identif...
Definition: xxportfactory.cpp:28
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:34 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kaddressbook

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

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal