File indexing completed on 2025-02-16 04:49:23

0001 /*
0002    SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "job/mergecontacts.h"
0010 #include "kaddressbookmergelib_export.h"
0011 #include <Akonadi/Item>
0012 #include <QWidget>
0013 namespace KABMergeContacts
0014 {
0015 class MergeContactSelectListWidget;
0016 class KADDRESSBOOKMERGELIB_EXPORT MergeContactSelectInformationWidget : public QWidget
0017 {
0018     Q_OBJECT
0019 public:
0020     explicit MergeContactSelectInformationWidget(QWidget *parent = nullptr);
0021     ~MergeContactSelectInformationWidget() override;
0022 
0023     void setContacts(KABMergeContacts::MergeContacts::ConflictInformations conflictTypes, const Akonadi::Item::List &listItem);
0024     void createContact(KContacts::Addressee &addr);
0025 
0026     [[nodiscard]] bool verifySelectedInfo() const;
0027 
0028 private:
0029     void addInformationWidget(MergeContacts::ConflictInformation conflictType);
0030     KContacts::Addressee::List mAddressList;
0031     QList<MergeContactSelectListWidget *> mListMergeSelectInformation;
0032 };
0033 }