File indexing completed on 2025-02-16 04:57:41
0001 /* 0002 SPDX-FileCopyrightText: 2018-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "templateparser_export.h" 0010 #include <KMime/Message> 0011 #include <QObject> 0012 0013 namespace TemplateParser 0014 { 0015 /** 0016 * @brief The TemplateConvertCommandJob class 0017 * @author Laurent Montel <montel@kde.org> 0018 */ 0019 class TEMPLATEPARSER_EXPORT TemplateConvertCommandJob : public QObject 0020 { 0021 Q_OBJECT 0022 public: 0023 explicit TemplateConvertCommandJob(QObject *parent = nullptr); 0024 ~TemplateConvertCommandJob() override; 0025 [[nodiscard]] QString convertText(); 0026 0027 [[nodiscard]] QString currentText() const; 0028 void setCurrentText(const QString ¤tText); 0029 0030 [[nodiscard]] KMime::Message::Ptr originalMessage() const; 0031 void setOriginalMessage(const KMime::Message::Ptr &originalMessage); 0032 0033 private: 0034 QString mCurrentText; 0035 KMime::Message::Ptr mOriginalMessage; 0036 }; 0037 }