Messagelib

plugincomposerinterface.cpp
1/*
2 SPDX-FileCopyrightText: 2019-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "plugincomposerinterface.h"
8#include "composer/composerattachmentinterface.h"
9#include "composer/composerviewbase.h"
10#include "composer/composerviewinterface.h"
11#include <MessageComposer/AttachmentModel>
12#include <MessageComposer/ConvertSnippetVariablesJob>
13using namespace MessageComposer;
14
15PluginComposerInterface::PluginComposerInterface() = default;
16
17PluginComposerInterface::~PluginComposerInterface()
18{
19 delete mComposerViewInterface;
20}
21
22void PluginComposerInterface::setComposerViewBase(ComposerViewBase *composerViewBase)
23{
24 delete mComposerViewInterface;
25 mComposerViewInterface = new MessageComposer::ComposerViewInterface(composerViewBase);
26}
27
28QString PluginComposerInterface::subject() const
29{
30 return mComposerViewInterface->subject();
31}
32
33QString PluginComposerInterface::replyTo() const
34{
35 return mComposerViewInterface->replyTo();
36}
37
38QString PluginComposerInterface::to() const
39{
40 return mComposerViewInterface->to();
41}
42
43QString PluginComposerInterface::cc() const
44{
45 return mComposerViewInterface->cc();
46}
47
48QString PluginComposerInterface::from() const
49{
50 return mComposerViewInterface->from();
51}
52
53MessageComposer::ComposerAttachmentInterface PluginComposerInterface::attachments()
54{
55 return mComposerViewInterface->attachments();
56}
57
58QString PluginComposerInterface::shortDate() const
59{
60 return mComposerViewInterface->shortDate();
61}
62
63QString PluginComposerInterface::longDate() const
64{
65 return mComposerViewInterface->longDate();
66}
67
68QString PluginComposerInterface::shortTime() const
69{
70 return mComposerViewInterface->shortTime();
71}
72
73QString PluginComposerInterface::longTime() const
74{
75 return mComposerViewInterface->longTime();
76}
77
78QString PluginComposerInterface::insertDayOfWeek() const
79{
80 return mComposerViewInterface->insertDayOfWeek();
81}
82
83QString PluginComposerInterface::variableFromEnum(MessageComposer::ConvertSnippetVariablesUtil::VariableType type) const
84{
85 return MessageComposer::ConvertSnippetVariablesUtil::snippetVariableFromEnum(type);
86}
87
88QString PluginComposerInterface::convertVariable(MessageComposer::ConvertSnippetVariablesUtil::VariableType type) const
89{
90 return MessageComposer::ConvertSnippetVariablesJob::convertVariables(mComposerViewInterface,
91 MessageComposer::ConvertSnippetVariablesUtil::snippetVariableFromEnum(type));
92}
93
94QString PluginComposerInterface::convertText(const QString &str) const
95{
96 return MessageComposer::ConvertSnippetVariablesJob::convertVariables(mComposerViewInterface, str);
97}
The ComposerViewBase class.
The ComposerViewInterface class.
Simple interface that both EncryptJob and SignEncryptJob implement so the composer can extract some e...
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:12:43 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.