KDE 4.5 PyKDE API Reference

- KDE's Python API

# KJobUiDelegate Class Reference

`from PyKDE4.kdecore import *`

Inherits: QObject

## Detailed Description

The base class for all KJob UI delegate.

A UI delegate is responsible for the events of a job and provides a UI for them (an error message box or warning etc.).

See also:
  KJob

## Methods
| __init__ (self)
bool | isAutoErrorHandlingEnabled (self)
bool | isAutoWarningHandlingEnabled (self)
KJob | job (self)
| setAutoErrorHandlingEnabled (self, bool enable)
| setAutoWarningHandlingEnabled (self, bool enable)
| showErrorMessage (self)
| slotWarning (self, KJob job, QString plain, QString rich)

## Method Documentation

__init__ | ( |  | self ) |

Constructs a new KJobUiDelegate.

bool isAutoErrorHandlingEnabled | ( |  | self ) |

Returns whether automatic error handling is enabled or disabled. See also setAutoErrorHandlingEnabled .

Returns:
  true if automatic error handling is enabled

See also:
  setAutoErrorHandlingEnabled()

bool isAutoWarningHandlingEnabled | ( |  | self ) |

Returns whether automatic warning handling is enabled or disabled. See also setAutoWarningHandlingEnabled .

Returns:
  true if automatic warning handling is enabled

See also:
  setAutoWarningHandlingEnabled()

KJob job | ( |  | self ) |

Retrieves the current job this UI delegate is attached to.

Returns:
  current job this UI delegate is attached to, or 0 if this UI delegate is not tracking any job

setAutoErrorHandlingEnabled | ( | self, |
|  | bool | enable
| ) |  |  |

Enable or disable the automatic error handling. When automatic error handling is enabled and an error occurs, then showErrorDialog() is called, right before the emission of the result signal.

The default is false.

See also isAutoErrorHandlingEnabled , showErrorDialog

Parameters:

  | enable | enable or disable automatic error handling

See also:
  isAutoErrorHandlingEnabled()

setAutoWarningHandlingEnabled | ( | self, |
|  | bool | enable
| ) |  |  |

Enable or disable the automatic warning handling. When automatic warning handling is enabled and an error occurs, then a message box is displayed with the warning message

The default is true.

See also isAutoWarningHandlingEnabled , showErrorDialog

Parameters:

  | enable | enable or disable automatic warning handling

See also:
  isAutoWarningHandlingEnabled()

showErrorMessage | ( |  | self ) |

Display a dialog box to inform the user of the error given by this job. Only call if error is not 0, and only in the slot connected to result.

slotWarning | ( | self, |
|  | KJob | job,
|  | QString | plain,
|  | QString | rich
| ) |  |  |