KDE 5.0 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

KCompositeJob Class Reference

from PyKDE5.kcoreaddons import *

Inherits: KJob → QObject

Detailed Description

The base class for all jobs able to be composed of one or more subjobs.


Methods

 __init__ (self, QObject parent=0)
bool addSubjob (self, KJob job)
 clearSubjobs (self)
bool hasSubjobs (self)
bool removeSubjob (self, KJob job)
 slotInfoMessage (self, KJob job, QString plain, QString rich)
 slotResult (self, KJob job)
[KJob] subjobs (self)

Method Documentation

__init__ (  self,
QObject  parent=0
)

Creates a new KCompositeJob object.

Parameters:
parent  the parent QObject

bool addSubjob (  self,
KJob  job
)

Add a job that has to be finished before a result is emitted. This has obviously to be called before the result has been emitted by the job.

Note that the composite job takes ownership of job

Parameters:
job  the subjob to add

Returns:
true if the job has been added correctly, false otherwise

clearSubjobs (   self )

Clears the list of subjobs.

Note that this will *not* delete the subjobs. Ownership of the subjobs is passed on to the caller.

bool hasSubjobs (   self )

Checks if this job has subjobs running.

Returns:
true if we still have subjobs running, false otherwise

bool removeSubjob (  self,
KJob  job
)

Mark a sub job as being done.

The ownership of job is passed on to the caller.

Parameters:
job  the subjob to remove

Returns:
true if the job has been removed correctly, false otherwise

slotInfoMessage (  self,
KJob  job,
QString  plain,
QString  rich
)

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()

slotResult (  self,
KJob  job
)

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

[KJob] subjobs (   self )

Retrieves the list of the subjobs.

Returns:
the full list of sub jobs

  • Full Index

Modules

  • karchive
  • kcoreaddons
  • kguiaddons
  • kitemmodels
  • kitemviews
  • kplotting
  • kwidgetsaddons
  • solid
  • sonnet
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal