Kdepim-apps-lib

kaddressbookimportexportcontactlist.cpp
1 /*
2  This file is part of KAddressBook.
3 
4  Copyright (C) 2015-2020 Laurent Montel <[email protected]>
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License along
17  with this program; if not, write to the Free Software Foundation, Inc.,
18  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 */
20 
21 #include "kaddressbookimportexportcontactlist.h"
22 
23 using namespace KAddressBookImportExport;
24 
25 KAddressBookImportExportContactList::KAddressBookImportExportContactList()
26 {
27 }
28 
29 bool KAddressBookImportExportContactList::isEmpty() const
30 {
31  return mAddressList.isEmpty() && mContactGroupList.isEmpty();
32 }
33 
34 int KAddressBookImportExportContactList::count() const
35 {
36  return mAddressList.count() + mContactGroupList.count();
37 }
38 
39 void KAddressBookImportExportContactList::clear()
40 {
41  mAddressList.clear();
42  mContactGroupList.clear();
43 }
44 
45 void KAddressBookImportExportContactList::append(const KContacts::Addressee &addr)
46 {
47  mAddressList.append(addr);
48 }
49 
50 void KAddressBookImportExportContactList::append(const KContacts::ContactGroup &group)
51 {
52  mContactGroupList.append(group);
53 }
54 
55 KContacts::ContactGroup::List KAddressBookImportExportContactList::contactGroupList() const
56 {
57  return mContactGroupList;
58 }
59 
60 void KAddressBookImportExportContactList::setContactGroupList(const KContacts::ContactGroup::List &value)
61 {
62  mContactGroupList = value;
63 }
64 
65 KContacts::Addressee::List KAddressBookImportExportContactList::addressList() const
66 {
67  return mAddressList;
68 }
69 
70 void KAddressBookImportExportContactList::setAddressList(const KContacts::Addressee::List &value)
71 {
72  mAddressList = value;
73 }
void append(const T &value)
void clear()
AddresseeList List
bool isEmpty() const const
int count(const T &value) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Aug 10 2020 23:23:36 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.