2 This file is part of KAddressBook.
3 Copyright (c) 2002 Mike Pilone <mpilone@slac.com>
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.
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.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution.
24 #ifndef ADDRESSEEUTIL_H
25 #define ADDRESSEEUTIL_H
27 #include <QtCore/QString>
28 #include <kabc/addressee.h>
31 This class provides some utility methods for transposing an
32 addressee to different types (ie: clipboard). This class
33 is probably just temporary until these function stablize and move
36 NOTE: Currently these methods are not implemented properly. The
37 vCard parser in KABC needs to be updated and there is no way to get from
38 KABC::Addressee to vCard.
44 Same as above function, except that an entire list of KABC::Addressee
45 objects will be converted to vCard and put in the string.
47 static QByteArray
addresseesToClipboard( const KABC::Addressee::List
&addrList
);
50 Convert a string from the clipboard into a list of addressee objects.
51 If the clipboard text was not a valid vcard, an empty list
54 static KABC::Addressee::List
clipboardToAddressees( const QByteArray
&clipboard
);
57 Converts the list of addressee objects into a list of email addresses.
59 static QString
addresseesToEmails( const KABC::Addressee::List
&addrList
);