Messagelib

plugincomposerinterface.cpp
1 /*
2  SPDX-FileCopyrightText: 2019-2021 Laurent Montel <[email protected]>
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>
13 using namespace MessageComposer;
14 
15 PluginComposerInterface::PluginComposerInterface() = default;
16 
17 PluginComposerInterface::~PluginComposerInterface()
18 {
19  delete mComposerViewInterface;
20 }
21 
22 void PluginComposerInterface::setComposerViewBase(ComposerViewBase *composerViewBase)
23 {
24  delete mComposerViewInterface;
25  mComposerViewInterface = new MessageComposer::ComposerViewInterface(composerViewBase);
26 }
27 
28 QString PluginComposerInterface::subject() const
29 {
30  return mComposerViewInterface->subject();
31 }
32 
33 QString PluginComposerInterface::replyTo() const
34 {
35  return mComposerViewInterface->replyTo();
36 }
37 
38 QString PluginComposerInterface::to() const
39 {
40  return mComposerViewInterface->to();
41 }
42 
43 QString PluginComposerInterface::cc() const
44 {
45  return mComposerViewInterface->cc();
46 }
47 
48 QString PluginComposerInterface::from() const
49 {
50  return mComposerViewInterface->from();
51 }
52 
53 MessageComposer::ComposerAttachmentInterface PluginComposerInterface::attachments()
54 {
55  return mComposerViewInterface->attachments();
56 }
57 
58 QString PluginComposerInterface::shortDate() const
59 {
60  return mComposerViewInterface->shortDate();
61 }
62 
63 QString PluginComposerInterface::longDate() const
64 {
65  return mComposerViewInterface->longDate();
66 }
67 
68 QString PluginComposerInterface::shortTime() const
69 {
70  return mComposerViewInterface->shortTime();
71 }
72 
73 QString PluginComposerInterface::longTime() const
74 {
75  return mComposerViewInterface->longTime();
76 }
77 
78 QString PluginComposerInterface::insertDayOfWeek() const
79 {
80  return mComposerViewInterface->insertDayOfWeek();
81 }
82 
83 QString PluginComposerInterface::variableFromEnum(MessageComposer::ConvertSnippetVariablesUtil::VariableType type) const
84 {
85  return MessageComposer::ConvertSnippetVariablesUtil::snippetVariableFromEnum(type);
86 }
87 
88 QString PluginComposerInterface::convertVariable(MessageComposer::ConvertSnippetVariablesUtil::VariableType type) const
89 {
90  return MessageComposer::ConvertSnippetVariablesJob::convertVariables(mComposerViewInterface,
91  MessageComposer::ConvertSnippetVariablesUtil::snippetVariableFromEnum(type));
92 }
93 
94 QString PluginComposerInterface::convertText(const QString &str) const
95 {
96  return MessageComposer::ConvertSnippetVariablesJob::convertVariables(mComposerViewInterface, str);
97 }
The ComposerViewInterface class.
The ComposerAttachmentInterface class.
The ComposerViewBase 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-2021 The KDE developers.
Generated on Thu Dec 2 2021 23:06:09 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.