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

KAbstractWidgetJobTracker Class Reference

from PyKDE4.kdeui import *

Inherits: KJobTrackerInterface → QObject

Detailed Description

The base class for widget based job trackers.


Signals

 resume (KJob job)
 stopped (KJob job)
 suspend (KJob job)

Methods

 __init__ (self, QWidget parent=0)
bool autoDelete (self, KJob job)
 finished (self, KJob job)
 registerJob (self, KJob job)
 setAutoDelete (self, KJob job, bool autoDelete)
 setStopOnClose (self, KJob job, bool stopOnClose)
 slotClean (self, KJob job)
 slotResume (self, KJob job)
 slotStop (self, KJob job)
 slotSuspend (self, KJob job)
bool stopOnClose (self, KJob job)
 unregisterJob (self, KJob job)
QWidget widget (self, KJob job)

Signal Documentation

resume ( KJob  job
)

Emitted when the user resumed the operation

Parameters:
job  The job that has been resumed

Signal syntax:
QObject.connect(source, SIGNAL("resume(KJob*)"), target_slot)
stopped ( KJob  job
)

Emitted when the user aborted the operation

Parameters:
job  The job that has been stopped

Signal syntax:
QObject.connect(source, SIGNAL("stopped(KJob*)"), target_slot)
suspend ( KJob  job
)

Emitted when the user suspended the operation

Parameters:
job  The job that has been suspended

Signal syntax:
QObject.connect(source, SIGNAL("suspend(KJob*)"), target_slot)

Method Documentation

__init__ (  self,
QWidget  parent=0
)

Creates a new KAbstractWidgetJobTracker

Parameters:
parent  the parent of this object and of the widget displaying the job progresses

bool autoDelete (  self,
KJob  job
)

Checks whether the dialog should be deleted or cleaned.

Parameters:
job  the job's widget that will be auto-deleted

Returns:
false if the dialog only calls slotClean, true if it will be deleted
See also:
setAutoDelete()

finished (  self,
KJob  job
)

Called when a job is finished, in any case. It is used to notify that the job is terminated and that progress UI (if any) can be hidden.

Parameters:
job  the job that emitted this signal

registerJob (  self,
KJob  job
)

Register a new job in this tracker. Note that job trackers inheriting from this class can have only one job registered at a time.

Parameters:
job  the job to register

setAutoDelete (  self,
KJob  job,
bool  autoDelete
)

This controls whether the dialog should be deleted or only cleaned when the KJob is finished (or canceled).

If your dialog is an embedded widget and not a separate window, you should setAutoDelete(false) in the constructor of your custom dialog.

Parameters:
job  the job's widget that is going to be auto-deleted
autoDelete  If false the dialog will only call method slotClean. If true the dialog will be deleted.

See also:
autoDelete()

setStopOnClose (  self,
KJob  job,
bool  stopOnClose
)

This controls whether the job should be canceled if the dialog is closed.

Parameters:
job  the job's widget that will be stopped when closing
stopOnClose  If true the job will be stopped if the dialog is closed, otherwise the job will continue even on close.

See also:
stopOnClose()

slotClean (  self,
KJob  job
)

This method is called when the widget should be cleaned (after job is finished). redefine this for custom behavior.

Parameters:
job  The job that is being cleaned

slotResume (  self,
KJob  job
)

This method should be called for pause/resume Connect this to the progress widgets buttons etc.

Parameters:
job  The job that is being resumed

slotStop (  self,
KJob  job
)

This method should be called for correct cancellation of IO operation Connect this to the progress widgets buttons etc.

Parameters:
job  The job that is being stopped

slotSuspend (  self,
KJob  job
)

This method should be called for pause/resume Connect this to the progress widgets buttons etc.

Parameters:
job  The job that is being suspended

bool stopOnClose (  self,
KJob  job
)

Checks whether the job will be killed when the dialog is closed.

Parameters:
job  the job's widget that will be stopped when closing

Returns:
true if the job is killed on close event, false otherwise.
See also:
setStopOnClose()

unregisterJob (  self,
KJob  job
)

Unregister a job from this tracker.

Parameters:
job  the job to unregister

QWidget widget (  self,
KJob  job
)
Abstract method:
This method is abstract and can be overridden but not called directly.

The widget associated to this tracker.

Parameters:
job  the job that is assigned the widget we want to return

Returns:
the widget displaying the job progresses

  • Full Index

Modules

  • akonadi
  • dnssd
  • kdecore
  • kdeui
  • khtml
  • kio
  • knewstuff
  • kparts
  • kutils
  • nepomuk
  • phonon
  • plasma
  • polkitqt
  • solid
  • soprano
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal