KDECore
KCompositeJob Class Reference
#include <kcompositejob.h>

Detailed Description
The base class for all jobs able to be composed of one or more subjobs.Definition at line 33 of file kcompositejob.h.
Public Member Functions | |
KCompositeJob (QObject *parent=0) | |
virtual | ~KCompositeJob () |
Protected Slots | |
virtual void | slotInfoMessage (KJob *job, const QString &plain, const QString &rich) |
virtual void | slotResult (KJob *job) |
Protected Member Functions | |
virtual bool | addSubjob (KJob *job) |
void | clearSubjobs () |
bool | hasSubjobs () |
KCompositeJob (KCompositeJobPrivate &dd, QObject *parent) | |
virtual bool | removeSubjob (KJob *job) |
const QList< KJob * > & | subjobs () const |
Constructor & Destructor Documentation
KCompositeJob::KCompositeJob | ( | QObject * | parent = 0 |
) | [explicit] |
Creates a new KCompositeJob object.
- Parameters:
-
parent the parent QObject
Definition at line 32 of file kcompositejob.cpp.
KCompositeJob::~KCompositeJob | ( | ) | [virtual] |
KCompositeJob::KCompositeJob | ( | KCompositeJobPrivate & | dd, | |
QObject * | parent | |||
) | [protected] |
Definition at line 37 of file kcompositejob.cpp.
Member Function Documentation
Add a job that has to be finished before a result is emitted.
This has obviously to be called before the the result has been emitted by the job.
- Parameters:
-
job the subjob to add
- Returns:
- true if the job has been added correctly, false otherwise
Definition at line 46 of file kcompositejob.cpp.
void KCompositeJob::clearSubjobs | ( | ) | [protected] |
bool KCompositeJob::hasSubjobs | ( | ) | [protected] |
Checks if this job has subjobs running.
- Returns:
- true if we still have subjobs running, false otherwise
Definition at line 79 of file kcompositejob.cpp.
Mark a sub job as being done.
- Parameters:
-
job the subjob to remove
- Returns:
- true if the job has been removed correctly, false otherwise
Definition at line 66 of file kcompositejob.cpp.
void KCompositeJob::slotInfoMessage | ( | KJob * | job, | |
const QString & | plain, | |||
const QString & | rich | |||
) | [protected, virtual, slot] |
Forward signal from subjob.
- Parameters:
-
job the subjob plain the info message in plain text version rich the info message in rich text version
- See also:
- infoMessage()
Definition at line 109 of file kcompositejob.cpp.
void KCompositeJob::slotResult | ( | KJob * | job | ) | [protected, virtual, slot] |
Called whenever a subjob finishes.
Default implementation checks for errors and propagates to parent job, and in all cases it calls removeSubjob.
- Parameters:
-
job the subjob
Definition at line 95 of file kcompositejob.cpp.
Retrieves the list of the subjobs.
- Returns:
- the full list of sub jobs
Definition at line 84 of file kcompositejob.cpp.
The documentation for this class was generated from the following files: