• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kutils
 

kutils

Public Member Functions | Protected Member Functions | List of all members
KCModuleInfo Class Reference
KControl module classes

#include <kcmoduleinfo.h>

Public Member Functions

 KCModuleInfo (const TQString &desktopFile)
 
 KCModuleInfo (KService::Ptr moduleInfo)
 
 KCModuleInfo (const KCModuleInfo &rhs)
 
 KCModuleInfo ()
 
KCModuleInfo & operator= (const KCModuleInfo &rhs)
 
bool operator== (const KCModuleInfo &rhs) const
 
bool operator!= (const KCModuleInfo &rhs) const
 
 ~KCModuleInfo ()
 
TQString fileName () const
 
const TQStringList & keywords () const
 
TQString factoryName () const
 
TQString moduleName () const
 
KService::Ptr service () const
 
TQString comment () const
 
TQString icon () const
 
TQString docPath () const
 
TQString library () const
 
TQString handle () const
 
int weight () const
 
bool needsRootPrivileges () const
 
bool isHiddenByDefault () const KDE_DEPRECATED
 
bool needsTest () const
 

Protected Member Functions

void setKeywords (const TQStringList &keyword)
 
void setName (const TQString &name)
 
void setComment (const TQString &comment)
 
void setIcon (const TQString &icon)
 
void setLibrary (const TQString &lib)
 
void setHandle (const TQString &handle)
 
void setWeight (int weight)
 
void setNeedsTest (bool val)
 
void setNeedsRootPrivileges (bool needsRootPrivileges)
 
void setIsHiddenByDefault (bool isHiddenByDefault)
 
void setDocPath (const TQString &p)
 
void loadAll ()
 

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.

Definition at line 49 of file kcmoduleinfo.h.

Constructor & Destructor Documentation

◆ KCModuleInfo() [1/4]

KCModuleInfo::KCModuleInfo ( const TQString &  desktopFile)

Constructs a KCModuleInfo.

Note
a KCModuleInfo object will have to be manually deleted, it is not done automatically for you.
Parameters
desktopFilethe desktop file representing the module, or the name of the module.

Definition at line 54 of file kcmoduleinfo.cpp.

◆ KCModuleInfo() [2/4]

KCModuleInfo::KCModuleInfo ( KService::Ptr  moduleInfo)

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

Note
moduleInfo must be a valid pointer.
Parameters
moduleInfospecifies the module

Definition at line 61 of file kcmoduleinfo.cpp.

◆ KCModuleInfo() [3/4]

KCModuleInfo::KCModuleInfo ( const KCModuleInfo &  rhs)

Same as above but takes a KCModuleInfo as argument.

Parameters
rhsspecifies the module

Definition at line 66 of file kcmoduleinfo.cpp.

◆ KCModuleInfo() [4/4]

KCModuleInfo::KCModuleInfo ( )

Same as above but creates an empty KCModuleInfo.

You should not normally call this.

Since
3.4

Definition at line 48 of file kcmoduleinfo.cpp.

◆ ~KCModuleInfo()

KCModuleInfo::~KCModuleInfo ( )

Default destructor.

Definition at line 117 of file kcmoduleinfo.cpp.

Member Function Documentation

◆ comment()

TQString KCModuleInfo::comment ( ) const
inline
Returns
the module's (translated) comment field

Definition at line 142 of file kcmoduleinfo.h.

◆ docPath()

TQString KCModuleInfo::docPath ( ) const
Returns
the path of the module's documentation

Definition at line 183 of file kcmoduleinfo.cpp.

◆ factoryName()

TQString KCModuleInfo::factoryName ( ) const

Returns the module's factory name, if it's set.

If not, the library name is returned.

Returns
the module's factory name
Since
3.4

Definition at line 95 of file kcmoduleinfo.cpp.

◆ fileName()

TQString KCModuleInfo::fileName ( ) const
inline
Returns
the filename of the .desktop file that describes the KCM

Definition at line 113 of file kcmoduleinfo.h.

◆ handle()

TQString KCModuleInfo::handle ( ) const
Returns
a handle (usually the contents of the FactoryName field)

Definition at line 192 of file kcmoduleinfo.cpp.

◆ icon()

TQString KCModuleInfo::icon ( ) const
inline
Returns
the module's icon name

Definition at line 147 of file kcmoduleinfo.h.

◆ isHiddenByDefault()

bool KCModuleInfo::isHiddenByDefault ( ) const
Deprecated:
Returns
the isHiddenByDefault attribute.

Definition at line 222 of file kcmoduleinfo.cpp.

◆ keywords()

const TQStringList& KCModuleInfo::keywords ( ) const
inline
Returns
the keywords associated with this KCM.

Definition at line 118 of file kcmoduleinfo.h.

◆ library()

TQString KCModuleInfo::library ( ) const
inline
Returns
the library name

Definition at line 157 of file kcmoduleinfo.h.

◆ loadAll()

void KCModuleInfo::loadAll ( )
protected

Reads the service entries specific for KCModule from the desktop file.

The usual desktop entries are read in init.

Definition at line 150 of file kcmoduleinfo.cpp.

◆ moduleName()

TQString KCModuleInfo::moduleName ( ) const
inline
Returns
the module\'s (translated) name

Definition at line 131 of file kcmoduleinfo.h.

◆ needsRootPrivileges()

bool KCModuleInfo::needsRootPrivileges ( ) const
Returns
whether the module might require root permissions

Definition at line 213 of file kcmoduleinfo.cpp.

◆ needsTest()

bool KCModuleInfo::needsTest ( ) const
Returns
true if the module should be conditionally loaded.
Since
3.4

Definition at line 230 of file kcmoduleinfo.cpp.

◆ operator!=()

bool KCModuleInfo::operator!= ( const KCModuleInfo &  rhs) const
Returns
true if rhs is not equal itself

Definition at line 112 of file kcmoduleinfo.cpp.

◆ operator=()

KCModuleInfo & KCModuleInfo::operator= ( const KCModuleInfo &  rhs)

Assignment operator.

Definition at line 75 of file kcmoduleinfo.cpp.

◆ operator==()

bool KCModuleInfo::operator== ( const KCModuleInfo &  rhs) const

Equal operator.

Returns
true if rhs equals itself

Definition at line 107 of file kcmoduleinfo.cpp.

◆ service()

KService::Ptr KCModuleInfo::service ( ) const
inline
Returns
a KSharedPtr to KService created from the modules .desktop file

Definition at line 137 of file kcmoduleinfo.h.

◆ setComment()

void KCModuleInfo::setComment ( const TQString &  comment)
inlineprotected

Sets the object's name.

Parameters
commentthe new comment

Definition at line 208 of file kcmoduleinfo.h.

◆ setDocPath()

void KCModuleInfo::setDocPath ( const TQString &  p)
inlineprotected

Sets the object's documentation path.

Parameters
pthe new documentation path

Definition at line 262 of file kcmoduleinfo.h.

◆ setHandle()

void KCModuleInfo::setHandle ( const TQString &  handle)
inlineprotected

Sets the factory name.

Parameters
handleThe new factory name

Definition at line 226 of file kcmoduleinfo.h.

◆ setIcon()

void KCModuleInfo::setIcon ( const TQString &  icon)
inlineprotected

Sets the object's icon.

Parameters
iconthe name of the new icon

Definition at line 214 of file kcmoduleinfo.h.

◆ setIsHiddenByDefault()

void KCModuleInfo::setIsHiddenByDefault ( bool  isHiddenByDefault)
inlineprotected
Deprecated:

Definition at line 255 of file kcmoduleinfo.h.

◆ setKeywords()

void KCModuleInfo::setKeywords ( const TQStringList &  keyword)
inlineprotected

Sets the object's keywords.

Parameters
keywordthe new keywords

Definition at line 196 of file kcmoduleinfo.h.

◆ setLibrary()

void KCModuleInfo::setLibrary ( const TQString &  lib)
inlineprotected

Set the object's library.

Parameters
libthe name of the new library without any extensions or prefixs.

Definition at line 220 of file kcmoduleinfo.h.

◆ setName()

void KCModuleInfo::setName ( const TQString &  name)
inlineprotected

Sets the object's name.

Parameters
namethe new name

Definition at line 202 of file kcmoduleinfo.h.

◆ setNeedsRootPrivileges()

void KCModuleInfo::setNeedsRootPrivileges ( bool  needsRootPrivileges)
inlineprotected

Toggles whether the represented module needs root privileges.

Use with caution.

Parameters
needsRootPrivilegesif module needs root privilges

Definition at line 249 of file kcmoduleinfo.h.

◆ setNeedsTest()

void KCModuleInfo::setNeedsTest ( bool  val)
protected

Sets if the module should be tested for loading.

Parameters
valthe value to set
Since
3.4

Definition at line 235 of file kcmoduleinfo.cpp.

◆ setWeight()

void KCModuleInfo::setWeight ( int  weight)
inlineprotected

Sets the object's weight property which determines in what order modules will be displayed.

Default is 100.

Parameters
weightthe new weight

Definition at line 234 of file kcmoduleinfo.h.

◆ weight()

int KCModuleInfo::weight ( ) const
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.

Definition at line 204 of file kcmoduleinfo.cpp.


The documentation for this class was generated from the following files:
  • kcmoduleinfo.h
  • kcmoduleinfo.cpp

kutils

Skip menu "kutils"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

kutils

Skip menu "kutils"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kutils by doxygen 1.9.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |