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

0001 /*
0002    SPDX-FileCopyrightText: 2019-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 <MessageComposer/ComposerAttachmentInterface>
0011 #include <MessageComposer/ConvertSnippetVariablesUtil>
0012 namespace MessageComposer
0013 {
0014 class ComposerViewBase;
0015 class ComposerViewInterface;
0016 /**
0017  * @brief The PluginComposerInterface class
0018  * @author Laurent Montel <montel@kde.org>
0019  */
0020 class MESSAGECOMPOSER_EXPORT PluginComposerInterface
0021 {
0022 public:
0023     PluginComposerInterface();
0024     ~PluginComposerInterface();
0025     void setComposerViewBase(ComposerViewBase *composerViewBase);
0026 
0027     [[nodiscard]] QString replyTo() const;
0028     [[nodiscard]] QString subject() const;
0029     [[nodiscard]] QString to() const;
0030     [[nodiscard]] QString cc() const;
0031     [[nodiscard]] QString from() const;
0032     [[nodiscard]] ComposerAttachmentInterface attachments();
0033     [[nodiscard]] QString shortDate() const;
0034     [[nodiscard]] QString longDate() const;
0035     [[nodiscard]] QString shortTime() const;
0036     [[nodiscard]] QString longTime() const;
0037     [[nodiscard]] QString insertDayOfWeek() const;
0038 
0039     [[nodiscard]] QString convertVariable(MessageComposer::ConvertSnippetVariablesUtil::VariableType type) const;
0040     [[nodiscard]] QString convertText(const QString &str) const;
0041 
0042     [[nodiscard]] QString variableFromEnum(MessageComposer::ConvertSnippetVariablesUtil::VariableType type) const;
0043 
0044 private:
0045     MessageComposer::ComposerViewInterface *mComposerViewInterface = nullptr;
0046 };
0047 }