File indexing completed on 2025-01-05 04:49:19
0001 /* 0002 SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 #pragma once 0007 0008 #include <KContacts/Addressee> 0009 #include <QDialog> 0010 0011 namespace KAddressBookGrantlee 0012 { 0013 class GrantleeContactViewer; 0014 } 0015 class QPushButton; 0016 class VCardViewerDialog : public QDialog 0017 { 0018 Q_OBJECT 0019 public: 0020 VCardViewerDialog(const KContacts::Addressee::List &list, QWidget *parent = nullptr); 0021 ~VCardViewerDialog() override; 0022 0023 KContacts::Addressee::List contacts() const; 0024 0025 protected Q_SLOTS: 0026 void slotYes(); 0027 void slotNo(); 0028 void slotApply(); 0029 void slotCancel(); 0030 0031 private: 0032 void readConfig(); 0033 void writeConfig(); 0034 void updateView(); 0035 0036 KContacts::Addressee::List mContacts; 0037 KContacts::Addressee::List::Iterator mIt; 0038 QPushButton *mApplyButton = nullptr; 0039 KAddressBookGrantlee::GrantleeContactViewer *mView = nullptr; 0040 };