• Skip to content
  • Skip to link menu
Brand

API Documentation

  1. KDE API Reference
  2. The KDE Frameworks
  3. KCMUtils
  • KDE Home
  • Contact Us

Quick Links

Skip menu "KCMUtils"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • File List
  • Dependencies
  • Related Pages

Class Picker

About

Utilities for working with KCModules

Maintainer
The KDE Community
Supported platforms
FreeBSD, Linux
Community
IRC: #kde-devel on Freenode
Mailing list: kde-frameworks-devel
Use with CMake
find_package(KF5KCMUtils)
target_link_libraries(yourapp KF5::KCMUtils)
Use with QMake
QT += KCMUtils 
Clone
git clone git://anongit.kde.org/kcmutils.git
Browse source
KCMUtils on cgit.kde.org

KCMUtils

Enumerations | Functions
KCModuleLoader Namespace Reference

Enumerations

enum  ErrorReporting { None = 0, Inline = 1, Dialog = 2, Both = 3 }
 

Functions

KCMUTILS_EXPORT KCModule * loadModule (const KCModuleInfo &module, ErrorReporting report, QWidget *parent=nullptr, const QStringList &args=QStringList())
 
KCMUTILS_EXPORT KCModule * loadModule (const QString &module, ErrorReporting report, QWidget *parent=nullptr, const QStringList &args=QStringList())
 
KCMUTILS_EXPORT KCModule * reportError (ErrorReporting report, const QString &text, const QString &details, QWidget *parent)
 
KCMUTILS_EXPORT void unloadModule (const KCModuleInfo &mod)
 

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 [email protected][email protected]de.o[email protected]rg
Frans Englich frans[email protected].eng[email protected][email protected][email protected]teli[email protected]a.com

Enumeration Type Documentation

enum KCModuleLoader::ErrorReporting

Determines the way errors are reported.

Enumerator
None 

no error reporting is done

Inline 

the error report is shown instead of the KCModule that should have * been loaded

Dialog 

shows a dialog with the error report

Both 

does both Inline and Dialog

Definition at line 48 of file kcmoduleloader.h.

Function Documentation

KCModule * KCModuleLoader::loadModule ( const KCModuleInfo &  module,
ErrorReporting  report,
QWidget *  parent = nullptr,
const QStringList &  args = QStringList() 
)

Loads a KCModule.

If loading fails a zero pointer is returned.

Parameters
modulewhat module to load
reportsee ErrorReporting
Returns
a pointer to the loaded KCModule

Definition at line 68 of file kcmoduleloader.cpp.

KCModule * KCModuleLoader::loadModule ( const QString &  module,
ErrorReporting  report,
QWidget *  parent = nullptr,
const QStringList &  args = QStringList() 
)

Loads a KCModule.

If loading fails a zero pointer is returned.

Parameters
modulewhat module to load
reportsee ErrorReporting
Returns
a pointer to the loaded KCModule

Definition at line 63 of file kcmoduleloader.cpp.

KCModule * KCModuleLoader::reportError ( ErrorReporting  report,
const QString &  text,
const QString &  details,
QWidget *  parent 
)

Returns a KCModule containing the messages report and text.

Parameters
reportthe type of error reporting, see ErrorReporting
textthe main message
detailsany additional details

Definition at line 154 of file kcmoduleloader.cpp.

void KCModuleLoader::unloadModule ( const KCModuleInfo &  mod)

Unloads the module's library.

Parameters
modWhat module to unload for

Definition at line 147 of file kcmoduleloader.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Fri Dec 6 2019 03:50:19 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal