File indexing completed on 2024-11-24 04:39:33

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 "akonadi-contact-widgets_export.h"
0010 #include <Akonadi/Item>
0011 #include <KJob>
0012 
0013 #include <memory>
0014 
0015 namespace Akonadi
0016 {
0017 class Item;
0018 class AddEmailDisplayJobPrivate;
0019 
0020 /**
0021  * @brief The AddEmailDisplayJob class
0022  * @author Laurent Montel <montel@kde.org>
0023  */
0024 class AKONADI_CONTACT_WIDGETS_EXPORT AddEmailDisplayJob : public KJob
0025 {
0026     Q_OBJECT
0027 
0028 public:
0029     explicit AddEmailDisplayJob(const QString &email, QWidget *parentWidget, QObject *parent = nullptr);
0030 
0031     ~AddEmailDisplayJob() override;
0032     void setShowAsHTML(bool html);
0033     void setRemoteContent(bool b);
0034     void setContact(const Akonadi::Item &contact);
0035     void setMessageId(Akonadi::Item::Id id);
0036 
0037     void start() override;
0038 
0039 Q_SIGNALS:
0040     void contactUpdated(const Akonadi::Item &contact, Akonadi::Item::Id id, bool showAsHTML, bool remoteContent);
0041 
0042 private:
0043     //@cond PRIVATE
0044     friend class AddEmailDisplayJobPrivate;
0045     std::unique_ptr<AddEmailDisplayJobPrivate> const d;
0046     //@endcond
0047 };
0048 }