author | zautrix <zautrix> | 2004-06-26 19:01:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-06-26 19:01:18 (UTC) |
commit | b9aad1f15dc600e4dbe4c62d3fcced6363188ba3 (patch) (unidiff) | |
tree | 2c3d4004fb21c72cba65793859f9bcd8ffd3a49c /kaddressbook/addresseeutil.h | |
download | kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.zip kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.gz kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.bz2 |
Initial revision
Diffstat (limited to 'kaddressbook/addresseeutil.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/addresseeutil.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/kaddressbook/addresseeutil.h b/kaddressbook/addresseeutil.h new file mode 100644 index 0000000..2eefc1c --- a/dev/null +++ b/kaddressbook/addresseeutil.h | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | This file is part of KAddressBook. | ||
3 | Copyright (c) 2002 Mike Pilone <mpilone@slac.com> | ||
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 | ||
16 | along with this program; if not, write to the Free Software | ||
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
18 | |||
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. | ||
22 | */ | ||
23 | |||
24 | #ifndef ADDRESSEEUTIL_H | ||
25 | #define ADDRESSEEUTIL_H | ||
26 | |||
27 | #include <qstring.h> | ||
28 | #include <kabc/addressee.h> | ||
29 | |||
30 | /** | ||
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 | ||
34 | to KABC. | ||
35 | |||
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. | ||
39 | */ | ||
40 | class AddresseeUtil | ||
41 | { | ||
42 | public: | ||
43 | /** | ||
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. | ||
46 | */ | ||
47 | static QString addresseesToClipboard( const KABC::Addressee::List &addrList ); | ||
48 | |||
49 | /** | ||
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 | ||
52 | will be returned. | ||
53 | */ | ||
54 | static KABC::Addressee::List clipboardToAddressees( const QString &clipboard ); | ||
55 | |||
56 | private: | ||
57 | AddresseeUtil() {} | ||
58 | ~AddresseeUtil() {} | ||
59 | }; | ||
60 | |||
61 | #endif | ||