KCModuleInfo

KDE 4.9 PyKDE API Reference

- KDE's Python API

# KCModuleInfo Class Reference

`from PyKDE4.kutils import *`

## Detailed Description

A class that provides information about a KCModule

KCModuleInfo provides various technical information, such as icon, library etc. about a KCModule.n

Note:
  Any values set with the set* functions is not written back with KCModuleInfo it only reads value from the desktop file.

Internal:

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

Author:
  Matthias Elter <elter@kde.org>

Author:
  Daniel Molkentin <molkentin@kde.org>

## Methods
| __init__ (self, QString desktopFile)
| __init__ (self, KSharedPtr moduleInfo)
| __init__ (self, KCModuleInfo rhs)
| __init__ (self)
QString | comment (self)
QString | docPath (self)
QString | fileName (self)
QString | handle (self)
QString | icon (self)
QStringList | keywords (self)
QString | library (self)
QString | moduleName (self)
bool | operator != (self, KCModuleInfo rhs)
bool | operator == (self, KCModuleInfo rhs)
KSharedPtr | service (self)
int | weight (self)

## Method Documentation

__init__ | ( | self, |
|  | QString | desktopFile
| ) |  |  |

Constructs a KCModuleInfo.

Note:
  a KCModuleInfo object will have to be manually deleted, it is not done automatically for you.

Parameters:

  | desktopFile | the desktop file representing the module, or the name of the module.

__init__ | ( | self, |
|  | KSharedPtr | moduleInfo
| ) |  |  |

Same as above but takes a KService.Ptr as argument.

Note:
  moduleInfo must be a valid pointer.

Parameters:

  | moduleInfo | specifies the module

__init__ | ( | self, |
|  | KCModuleInfo | rhs
| ) |  |  |

Same as above but takes a KCModuleInfo as argument.

Parameters:

  | rhs | specifies the module

__init__ | ( |  | self ) |

Same as above but creates an empty KCModuleInfo. You should not normally call this.

QString comment | ( |  | self ) |

Returns:
  the module's (translated) comment field

QString docPath | ( |  | self ) |

Returns:
  the path of the module's documentation

QString fileName | ( |  | self ) |

Returns:
  the filename of the .desktop file that describes the KCM

QString handle | ( |  | self ) |

Returns:
  a handle (the contents of the X-KDE-FactoryName field if it exists, else the same as the library name)

QString icon | ( |  | self ) |

Returns:
  the module's icon name

QStringList keywords | ( |  | self ) |

Returns:
  the keywords associated with this KCM.

QString library | ( |  | self ) |

Returns:
  the library name

QString moduleName | ( |  | self ) |

Returns:
  the module\'s (translated) name

bool operator != | ( | self, |
|  | KCModuleInfo | rhs
| ) |  |  |

Returns:
  true if rhs is not equal itself

bool operator == | ( | self, |
|  | KCModuleInfo | rhs
| ) |  |  |

Returns true if rhs describes the same KCModule as this object.

KSharedPtr service | ( |  | self ) |

Returns:
  a KSharedPtr to KService created from the modules .desktop file

int weight | ( |  | self ) |

Returns:
  the weight of the module which determines the order of the pages in the KCMultiDialog. It's set by the X-KDE-Weight field.