Messagelib

transparentjob.cpp
1/*
2 SPDX-FileCopyrightText: 2009 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.net
3 SPDX-FileCopyrightText: 2009 Leo Franchi <lfranchi@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#include "job/transparentjob.h"
9
10#include "contentjobbase_p.h"
11
12#include <KMime/Content>
13#include <KMime/Message>
14using namespace MessageComposer;
15
16class MessageComposer::TransparentJobPrivate : public MessageComposer::ContentJobBasePrivate
17{
18public:
19 TransparentJobPrivate(TransparentJob *qq)
20 : ContentJobBasePrivate(qq)
21 {
22 }
23
24 KMime::Content *content = nullptr;
25
26 Q_DECLARE_PUBLIC(TransparentJob)
27};
28
29TransparentJob::TransparentJob(QObject *parent)
30 : MessageComposer::ContentJobBase(*new TransparentJobPrivate(this), parent)
31{
32}
33
34TransparentJob::~TransparentJob() = default;
35
36void TransparentJob::setContent(KMime::Content *content)
37{
39
40 d->content = content;
41}
42
44{
46 d->resultContent = d->content;
47 emitResult();
48}
49
50#include "moc_transparentjob.cpp"
void emitResult()
The ContentJobBase class.
KMime::Content * content() const
Get the resulting KMime::Content that the ContentJobBase has generated.
A job that just wraps some KMime::Content into a job object for use as a subjob in another job.
void process() override
This is called after all the children have been processed.
Simple interface that both EncryptJob and SignEncryptJob implement so the composer can extract some e...
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:33:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.