kutils Library API Documentation

KCModuleLoader Class Reference

Loads a KControl Module. More...

#include <kcmoduleloader.h>

List of all members.

Static Public Member Functions

KCModuleloadModule (const KCModuleInfo &mod, bool withfallback=true, QWidget *parent=0, const char *name=0, const QStringList &args=QStringList())
KCModuleloadModule (const QString &module, QWidget *parent=0, const char *name=0, const QStringList &args=QStringList())
void unloadModule (const KCModuleInfo &mod)
void showLastLoaderError (QWidget *parent)


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>
Since:
3.2

Definition at line 43 of file kcmoduleloader.h.


Member Function Documentation

KCModule * KCModuleLoader::loadModule const KCModuleInfo mod,
bool  withfallback = true,
QWidget parent = 0,
const char *  name = 0,
const QStringList args = QStringList()
[static]
 

Loads a KCModule.

If loading fails a zero pointer is returned.

Parameters:
mod what module to load
withFallback if true and loading failed a separate window with the module may appear and a zero pointer is a returned
Returns:
a pointer to the loaded KCModule
Definition at line 75 of file kcmoduleloader.cpp.

References endl(), KCModuleInfo::fileName(), KLibLoader::findLibrary(), kdWarning(), KCModuleInfo::library(), KLibLoader::self(), and KApplication::startServiceByDesktopPath().

Referenced by loadModule().

KCModule * KCModuleLoader::loadModule const QString module,
QWidget parent = 0,
const char *  name = 0,
const QStringList args = QStringList()
[static]
 

Same as above but takes a QString instead of a KCModuleInfo as module specifier.

Parameters:
module what module to load
Definition at line 115 of file kcmoduleloader.cpp.

References endl(), kdError(), loadModule(), KService::Ptr, and KService::serviceByDesktopName().

void KCModuleLoader::unloadModule const KCModuleInfo mod  )  [static]
 

Unloads the module's library.

Parameters:
mod What module to unload for
Definition at line 130 of file kcmoduleloader.cpp.

References KCModuleInfo::library(), KLibLoader::self(), and KLibLoader::unloadLibrary().

Referenced by KCMultiDialog::addModule().

void KCModuleLoader::showLastLoaderError QWidget parent  )  [static]
 

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

Definition at line 143 of file kcmoduleloader.cpp.

References KMessageBox::detailedError().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kutils Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Sep 29 09:41:34 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003