7#include "composerviewinterface.h"
8#include "composerviewbase.h"
9#include "snippet/convertsnippetvariablesutil.h"
11#include <MessageComposer/AttachmentModel>
14 : mComposerView(composerView)
18ComposerViewInterface::~ComposerViewInterface() =
default;
20QString ComposerViewInterface::subject()
const
23 return mComposerView->subject();
28QString ComposerViewInterface::to()
const
31 return mComposerView->
to();
36QString ComposerViewInterface::cc()
const
39 return mComposerView->cc();
44QString ComposerViewInterface::bcc()
const
47 return mComposerView->bcc();
52QString ComposerViewInterface::from()
const
55 return mComposerView->from();
60QString ComposerViewInterface::replyTo()
const
63 return mComposerView->replyTo();
72 const int countElement = mComposerView->attachmentModel()->attachments().
count();
73 attachmentInterface.setCount(countElement);
79 nameAndSize.
reserve(countElement);
81 const auto attachments = mComposerView->attachmentModel()->attachments();
84 names.
append(attachment->name());
85 nameAndSize.
append(QStringLiteral(
"%1 (%2)").arg(attachment->name(),
KIO::convertSize(attachment->size())));
87 attachmentInterface.setNames(names);
88 attachmentInterface.setNamesAndSize(nameAndSize);
89 attachmentInterface.setFileNames(fileNames);
91 return attachmentInterface;
94QString ComposerViewInterface::shortDate()
const
96 return MessageComposer::ConvertSnippetVariablesUtil::shortDate();
99QString ComposerViewInterface::longDate()
const
101 return MessageComposer::ConvertSnippetVariablesUtil::longDate();
104QString ComposerViewInterface::shortTime()
const
106 return MessageComposer::ConvertSnippetVariablesUtil::shortTime();
109QString ComposerViewInterface::longTime()
const
111 return MessageComposer::ConvertSnippetVariablesUtil::longTime();
114QString ComposerViewInterface::insertDayOfWeek()
const
116 return MessageComposer::ConvertSnippetVariablesUtil::insertDayOfWeek();
The ComposerAttachmentInterface class.
The ComposerViewBase class.
QString to() const
Header fields in recipients editor.
KIOCORE_EXPORT QString convertSize(KIO::filesize_t size)
Simple interface that both EncryptJob and SignEncryptJob implement so the composer can extract some e...
KEDUVOCDOCUMENT_EXPORT QStringList fileNames(const QString &language=QString())
void append(QList< T > &&value)
qsizetype count() const const
void reserve(qsizetype size)