KDE 4.6 PyKDE API Reference

- KDE's Python API

# KCModuleLoader Namespace Reference

`from PyKDE4.kutils.KCModuleLoader import *`

## Detailed Description

Loads a KControl Module.

KCModuleLoader tries in several ways to locate and load a KCModule. If loading fails a zero pointer is returned. It is very unlikely KCModuleLoader is what you want and KCModuleProxy suits your needs.

Author:
  Matthias Hoelzer-Kluepfel <mhk@kde.org>

Author:
  Frans Englich <frans.englich@telia.com>

Internal:

## Enumerations

ErrorReporting | { None, Inline, Dialog, Both }

## Functions

KCModule | loadModule (KCModuleInfo module, KCModuleLoader.ErrorReporting report, QWidget parent=0, QStringList args=QStringList())
KCModule | loadModule (QString module, KCModuleLoader.ErrorReporting report, QWidget parent=0, QStringList args=QStringList())
KCModule | reportError (KCModuleLoader.ErrorReporting report, QString text, QString details, QWidget parent)
| showLastLoaderError (QWidget parent)
| unloadModule (KCModuleInfo mod)

## Enumeration Documentation

ErrorReporting

Determines the way errors are reported

Enumerator:

  None = 0 |
  Inline = 1 |
  Dialog = 2 |
  Both = 3 |

## Function Documentation

KCModule loadModule | ( | KCModuleInfo | module,
|  | KCModuleLoader.ErrorReporting | report,
|  | QWidget | parent=0,
|  | QStringList | args=QStringList()
| ) |  |  |

Loads a KCModule. If loading fails a zero pointer is returned.

Parameters:

  | module | what module to load
  | report | see ErrorReporting

Returns:
  a pointer to the loaded KCModule

KCModule loadModule | ( | QString | module,
|  | KCModuleLoader.ErrorReporting | report,
|  | QWidget | parent=0,
|  | QStringList | args=QStringList()
| ) |  |  |

Loads a KCModule. If loading fails a zero pointer is returned.

Parameters:

  | module | what module to load
  | report | see ErrorReporting

Returns:
  a pointer to the loaded KCModule

KCModule reportError | ( | KCModuleLoader.ErrorReporting | report,
|  | QString | text,
|  | QString | details,
|  | QWidget | parent
| ) |  |  |

Returns a KCModule containing the messages report and text.

Parameters:

  | report | the type of error reporting, see ErrorReporting
  | text | the main message
  | details | any additional details

Internal:

showLastLoaderError | ( | QWidget | parent
| ) |  |  |

Display a message box explaining an error occurred and possible reasons to why.

Deprecated:
  Use a constructor with ErrorReporting set to Dialog to show a message box like this function did.

unloadModule | ( | KCModuleInfo | mod
| ) |  |  |

Unloads the module's library

Parameters:

  | mod | What module to unload for