2 Copyright (c) 2009 Tobias Koenig <tokoe@kde.org>
3 Copyright (c) 2015 Laurent Montel <montel@kde.org>
5 This library is free software; you can redistribute it and/or modify it
6 under the terms of the GNU Library General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or (at your
8 option) any later version.
10 This library is distributed in the hope that it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 License for more details.
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to the
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 #ifndef CONTACTEXPORTSELECTIONDIALOG_H
22 #define CONTACTEXPORTSELECTIONDIALOG_H
24 #include <KContacts/Addressee>
26 #include <contactlist.h>
27 #include <xxport/vcard/vcardexportselectionwidget.h>
28 #include <AkonadiCore/Item>
29 class QItemSelectionModel
;
30 class ContactSelectionWidget
;
37 * @short A dialog to select a group of contacts.
39 * @author Tobias Koenig <tokoe@kde.org>
41 class ContactSelectionDialog
: public QDialog
47 * Creates a new contact selection dialog.
49 * @param selectionModel The model that contains the currently selected contacts.
50 * @param parent The parent widget.
52 explicit ContactSelectionDialog(QItemSelectionModel
*selectionModel
, bool allowToSelectTypeToExport
, QWidget
*parent
= Q_NULLPTR
);
55 * Sets the @p message text.
57 void setMessageText(const QString
&message
);
60 * Sets the default addressbook.
62 void setDefaultAddressBook(const Akonadi::Collection
&addressBook
);
65 * Returns the list of selected contacts.
67 ContactList
selectedContacts() const;
69 VCardExportSelectionWidget::ExportFields
exportType() const;
70 void setAddGroupContact(bool addGroupContact
);
72 Akonadi::Item::List
selectedItems() const;
74 ContactSelectionWidget
*mSelectionWidget
;
75 VCardExportSelectionWidget
*mVCardExport
;