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

kaddressbook

  • sources
  • kde-4.12
  • kdepim
  • kaddressbook
  • xxport
  • shared
xxport.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 "xxport.h"
21 
22 XXPort::XXPort( QWidget *parent )
23  : mParentWidget( parent )
24 {
25 }
26 
27 XXPort::~XXPort()
28 {
29 }
30 
31 KABC::Addressee::List XXPort::importContacts() const
32 {
33  return KABC::Addressee::List();
34 }
35 
36 bool XXPort::exportContacts( const KABC::Addressee::List & ) const
37 {
38  return false;
39 }
40 
41 void XXPort::setOption( const QString &key, const QString &value )
42 {
43  mOptions.insert( key, value );
44 }
45 
46 QString XXPort::option( const QString &key ) const
47 {
48  return mOptions.value( key );
49 }
50 
51 QWidget *XXPort::parentWidget() const
52 {
53  return mParentWidget;
54 }
55 
56 QString XXPort::contactFileName( const KABC::Addressee &contact ) const
57 {
58  if ( !contact.givenName().isEmpty() && !contact.familyName().isEmpty() ) {
59  return QString::fromLatin1( "%1_%2" ).arg( contact.givenName() ).arg( contact.familyName() );
60  }
61 
62  if ( !contact.familyName().isEmpty() ) {
63  return contact.familyName();
64  }
65 
66  if ( !contact.givenName().isEmpty() ) {
67  return contact.givenName();
68  }
69 
70  if ( !contact.organization().isEmpty() ) {
71  return contact.organization();
72  }
73 
74  return contact.uid();
75 }
XXPort::exportContacts
virtual bool exportContacts(const KABC::Addressee::List &contacts) const =0
Exports the list of contacts.
Definition: xxport.cpp:36
XXPort::~XXPort
virtual ~XXPort()
Destroys the xxport object.
Definition: xxport.cpp:27
XXPort::parentWidget
QWidget * parentWidget() const
Returns the parent widget that can be used as parent for GUI components.
Definition: xxport.cpp:51
XXPort::setOption
void setOption(const QString &key, const QString &value)
Sets module specific options.
Definition: xxport.cpp:41
XXPort::contactFileName
QString contactFileName(const KABC::Addressee &contact) const
Returns a file name depending on the passed contact.
Definition: xxport.cpp:56
xxport.h
XXPort::option
QString option(const QString &key) const
Returns the module specific option value for the given key.
Definition: xxport.cpp:46
XXPort::importContacts
virtual KABC::Addressee::List importContacts() const =0
Imports a list of contacts.
Definition: xxport.cpp:31
XXPort::XXPort
XXPort(QWidget *parent=0)
Creates a new xxport object.
Definition: xxport.cpp:22
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:52 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

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