File indexing completed on 2024-06-23 05:18:34

0001 /*
0002   SPDX-FileCopyrightText: 2022-2024 Laurent Montel <montel@kde.org>
0003 
0004   SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "messagecomposer_export.h"
0010 #include <Akonadi/Item>
0011 #include <KMime/MDN>
0012 #include <QObject>
0013 namespace MessageComposer
0014 {
0015 /**
0016  * @brief The MDNWarningWidget class
0017  * @author Laurent Montel <montel@kde.org>
0018  */
0019 class MESSAGECOMPOSER_EXPORT MDNWarningWidgetJob : public QObject
0020 {
0021     Q_OBJECT
0022 public:
0023     explicit MDNWarningWidgetJob(QObject *parent = nullptr);
0024     ~MDNWarningWidgetJob() override;
0025 
0026     [[nodiscard]] bool start();
0027 
0028     [[nodiscard]] const Akonadi::Item &item() const;
0029     void setItem(const Akonadi::Item &newItem);
0030 
0031     [[nodiscard]] bool canStart() const;
0032 
0033 Q_SIGNALS:
0034     void showMdnInfo(const QPair<QString, bool> &mdnInfo, KMime::MDN::SendingMode s);
0035 
0036 private:
0037     Akonadi::Item mItem;
0038 };
0039 }