Messagelib

attachmentloadjob.cpp
1 /*
2  SPDX-FileCopyrightText: 2009 Constantin Berzan <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #include "attachmentloadjob.h"
8 
9 #include <QTimer>
10 
11 using namespace MessageCore;
12 
13 class MessageCore::AttachmentLoadJob::AttachmentLoadJobPrivate
14 {
15 public:
16  AttachmentPart::Ptr mPart;
17 };
18 
20  : KJob(parent)
21  , d(new AttachmentLoadJobPrivate)
22 {
23 }
24 
26 
28 {
29  QTimer::singleShot(0, this, &AttachmentLoadJob::doStart);
30 }
31 
33 {
34  return d->mPart;
35 }
36 
38 {
39  d->mPart = part;
40 }
~AttachmentLoadJob() override
Destroys the attachment load job.
void setAttachmentPart(const AttachmentPart::Ptr &part)
Subclasses use this method to set the loaded part.
AttachmentLoadJob(QObject *parent=nullptr)
Creates a new attachment load job.
void start() override
Starts the attachment load job.
QObject * parent() const const
AttachmentPart::Ptr attachmentPart() const
Returns the loaded attachment.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Dec 6 2021 23:04:56 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.