Mailcommon

folderjob.cpp
1/*
2 *
3 * SPDX-FileCopyrightText: 2003 Zack Rusin <zack@kde.org>
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 */
7
8#include "folderjob.h"
9
10#include <KIO/Global>
11
12using namespace MailCommon;
13
14//----------------------------------------------------------------------------
15FolderJob::FolderJob(QObject *parent)
16 : QObject(parent)
17{
18}
19
20//----------------------------------------------------------------------------
21FolderJob::~FolderJob()
22{
23 Q_EMIT result(this);
25}
26
27//----------------------------------------------------------------------------
29{
30 if (!mStarted) {
31 mStarted = true;
32 execute();
33 }
34}
35
36//----------------------------------------------------------------------------
38{
39 mErrorCode = KIO::ERR_USER_CANCELED;
40 delete this;
41}
42
44{
45 return mErrorCode;
46}
47
49{
50 return mCancellable;
51}
52
54{
55 mCancellable = b;
56}
57
58#include "moc_folderjob.cpp"
bool isCancellable() const
Definition folderjob.cpp:48
virtual void execute()=0
Has to be reimplemented.
virtual void kill()
Interrupt the job.
Definition folderjob.cpp:37
void result(FolderJob *job)
Emitted when the job finishes all processing.
void setCancellable(bool b)
Call this to change the "cancellable" property of this job.
Definition folderjob.cpp:53
void start()
Start the job.
Definition folderjob.cpp:28
void finished()
Emitted when the job finishes all processing.
The filter dialog.
Q_EMITQ_EMIT
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:18:39 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.