File indexing completed on 2025-02-16 04:49:25

0001 /*
0002    SPDX-FileCopyrightText: 2018-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "libkmailmarkdown_export.h"
0010 #include <QObject>
0011 class LIBKMAILMARKDOWN_EXPORT MarkdownConverter : public QObject
0012 {
0013     Q_OBJECT
0014 public:
0015     explicit MarkdownConverter(QObject *parent = nullptr);
0016     ~MarkdownConverter() override;
0017     [[nodiscard]] QString convertTextToMarkdown(const QString &str);
0018 
0019     [[nodiscard]] bool enableEmbeddedLabel() const;
0020     void setEnableEmbeddedLabel(bool enableEmbeddedLabel);
0021 
0022     [[nodiscard]] bool enableExtraDefinitionLists() const;
0023     void setEnableExtraDefinitionLists(bool enableExtraDefinitionLists);
0024 
0025 Q_SIGNALS:
0026     void failed(const QString &str);
0027 
0028 private:
0029     Q_DISABLE_COPY(MarkdownConverter)
0030     bool mEnableEmbeddedLabel = false;
0031     bool mEnableExtraDefinitionLists = false;
0032 };