File indexing completed on 2024-11-24 04:43:04

0001 /*
0002     SPDX-FileCopyrightText: 2013-2024 Laurent Montel <montel@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-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 <QDialog>
0013 class QDialogButtonBox;
0014 class QStackedWidget;
0015 
0016 namespace KABMergeContacts
0017 {
0018 class MergeContactWidget;
0019 class MergeContactErrorLabel;
0020 class MergeContactSelectInformationScrollArea;
0021 class MergeContactInfoWidget;
0022 class KADDRESSBOOKMERGELIB_EXPORT MergeContactsDialog : public QDialog
0023 {
0024     Q_OBJECT
0025 public:
0026     explicit MergeContactsDialog(QWidget *parent = nullptr);
0027     ~MergeContactsDialog() override;
0028 
0029     void setContacts(const Akonadi::Item::List &list);
0030 
0031 private:
0032     void slotCustomizeMergeContact(const Akonadi::Item::List &lst, MergeContacts::ConflictInformations conflictType, const Akonadi::Collection &col);
0033     void slotContactMerged(const Akonadi::Item &item);
0034     void readConfig();
0035     void writeConfig();
0036     QDialogButtonBox *const mButtonBox;
0037     QStackedWidget *const mStackedWidget;
0038     KABMergeContacts::MergeContactErrorLabel *const mNoEnoughContactSelected;
0039     KABMergeContacts::MergeContactErrorLabel *const mNoContactSelected;
0040     KABMergeContacts::MergeContactWidget *const mManualMergeResultWidget;
0041     KABMergeContacts::MergeContactSelectInformationScrollArea *const mSelectInformation;
0042     KABMergeContacts::MergeContactInfoWidget *const mMergeContactInfo;
0043 };
0044 }