File indexing completed on 2024-04-14 05:19:17

0001 /*
0002  * SPDX-FileCopyrightText: 2019 Jonah BrĂ¼chert <jbb@kaidan.im>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005  */
0006 
0007 #ifndef CONTACTIMPORTER_H
0008 #define CONTACTIMPORTER_H
0009 
0010 #include <KContacts/VCardConverter>
0011 #include <QFileDialog>
0012 #include <QObject>
0013 
0014 class ContactImporter : public QObject
0015 {
0016     Q_OBJECT
0017 public:
0018     explicit ContactImporter(QObject *parent = nullptr);
0019     Q_INVOKABLE void startImport();
0020 
0021 private:
0022     Q_SLOT void importVCards(const QUrl &path);
0023 
0024     std::unique_ptr<QFileDialog> m_dialog;
0025     KContacts::VCardConverter m_converter;
0026 };
0027 
0028 #endif // CONTACTIMPORTER_H