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

tdeutils

TDECModuleInfo Class Reference
[KControl module classes]

A class that provides information about a TDECModule. More...

#include <tdecmoduleinfo.h>

List of all members.

Public Member Functions

 TDECModuleInfo (const TQString &desktopFile)
 TDECModuleInfo (KService::Ptr moduleInfo)
 TDECModuleInfo (const TDECModuleInfo &rhs)
 TDECModuleInfo ()
TDECModuleInfo & operator= (const TDECModuleInfo &rhs)
bool operator== (const TDECModuleInfo &rhs) const
bool operator!= (const TDECModuleInfo &rhs) const
 ~TDECModuleInfo ()
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 TDECModule.

TDECModuleInfo provides various technical information, such as icon, library etc. about a TDECModule.n

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

Definition at line 49 of file tdecmoduleinfo.h.


Constructor & Destructor Documentation

TDECModuleInfo::TDECModuleInfo ( const TQString &  desktopFile  ) 

Constructs a TDECModuleInfo.

Note:
a TDECModuleInfo 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.

Definition at line 54 of file tdecmoduleinfo.cpp.

TDECModuleInfo::TDECModuleInfo ( KService::Ptr  moduleInfo  ) 

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

Note:
moduleInfo must be a valid pointer.
Parameters:
moduleInfo specifies the module

Definition at line 61 of file tdecmoduleinfo.cpp.

TDECModuleInfo::TDECModuleInfo ( const TDECModuleInfo &  rhs  ) 

Same as above but takes a TDECModuleInfo as argument.

Parameters:
rhs specifies the module

Definition at line 66 of file tdecmoduleinfo.cpp.

TDECModuleInfo::TDECModuleInfo (  ) 

Same as above but creates an empty TDECModuleInfo.

You should not normally call this.

Since:
3.4

Definition at line 48 of file tdecmoduleinfo.cpp.

TDECModuleInfo::~TDECModuleInfo (  ) 

Default destructor.

Definition at line 117 of file tdecmoduleinfo.cpp.


Member Function Documentation

TQString TDECModuleInfo::comment (  )  const [inline]
Returns:
the module's (translated) comment field

Definition at line 142 of file tdecmoduleinfo.h.

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

Definition at line 183 of file tdecmoduleinfo.cpp.

TQString TDECModuleInfo::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 tdecmoduleinfo.cpp.

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

Definition at line 113 of file tdecmoduleinfo.h.

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

Definition at line 192 of file tdecmoduleinfo.cpp.

TQString TDECModuleInfo::icon (  )  const [inline]
Returns:
the module's icon name

Definition at line 147 of file tdecmoduleinfo.h.

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

Definition at line 222 of file tdecmoduleinfo.cpp.

const TQStringList& TDECModuleInfo::keywords (  )  const [inline]
Returns:
the keywords associated with this KCM.

Definition at line 118 of file tdecmoduleinfo.h.

TQString TDECModuleInfo::library (  )  const [inline]
Returns:
the library name

Definition at line 157 of file tdecmoduleinfo.h.

void TDECModuleInfo::loadAll (  )  [protected]

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

The usual desktop entries are read in init.

Definition at line 150 of file tdecmoduleinfo.cpp.

TQString TDECModuleInfo::moduleName (  )  const [inline]
Returns:
the module\'s (translated) name

Definition at line 131 of file tdecmoduleinfo.h.

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

Definition at line 213 of file tdecmoduleinfo.cpp.

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

Definition at line 230 of file tdecmoduleinfo.cpp.

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

Definition at line 112 of file tdecmoduleinfo.cpp.

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

Assignment operator.

Definition at line 75 of file tdecmoduleinfo.cpp.

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

Equal operator.

Returns:
true if rhs equals itself

Definition at line 107 of file tdecmoduleinfo.cpp.

KService::Ptr TDECModuleInfo::service (  )  const [inline]
Returns:
a TDESharedPtr to KService created from the modules .desktop file

Definition at line 137 of file tdecmoduleinfo.h.

void TDECModuleInfo::setComment ( const TQString &  comment  )  [inline, protected]

Sets the object's name.

Parameters:
comment the new comment

Definition at line 208 of file tdecmoduleinfo.h.

void TDECModuleInfo::setDocPath ( const TQString &  p  )  [inline, protected]

Sets the object's documentation path.

Parameters:
p the new documentation path

Definition at line 262 of file tdecmoduleinfo.h.

void TDECModuleInfo::setHandle ( const TQString &  handle  )  [inline, protected]

Sets the factory name.

Parameters:
handle The new factory name

Definition at line 226 of file tdecmoduleinfo.h.

void TDECModuleInfo::setIcon ( const TQString &  icon  )  [inline, protected]

Sets the object's icon.

Parameters:
icon the name of the new icon

Definition at line 214 of file tdecmoduleinfo.h.

void TDECModuleInfo::setIsHiddenByDefault ( bool  isHiddenByDefault  )  [inline, protected]
Deprecated:

Definition at line 255 of file tdecmoduleinfo.h.

void TDECModuleInfo::setKeywords ( const TQStringList &  keyword  )  [inline, protected]

Sets the object's keywords.

Parameters:
keyword the new keywords

Definition at line 196 of file tdecmoduleinfo.h.

void TDECModuleInfo::setLibrary ( const TQString &  lib  )  [inline, protected]

Set the object's library.

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

Definition at line 220 of file tdecmoduleinfo.h.

void TDECModuleInfo::setName ( const TQString &  name  )  [inline, protected]

Sets the object's name.

Parameters:
name the new name

Definition at line 202 of file tdecmoduleinfo.h.

void TDECModuleInfo::setNeedsRootPrivileges ( bool  needsRootPrivileges  )  [inline, protected]

Toggles whether the represented module needs root privileges.

Use with caution.

Parameters:
needsRootPrivileges if module needs root privilges

Definition at line 249 of file tdecmoduleinfo.h.

void TDECModuleInfo::setNeedsTest ( bool  val  )  [protected]

Sets if the module should be tested for loading.

Parameters:
val the value to set
Since:
3.4

Definition at line 235 of file tdecmoduleinfo.cpp.

void TDECModuleInfo::setWeight ( int  weight  )  [inline, protected]

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

Default is 100.

Parameters:
weight the new weight

Definition at line 234 of file tdecmoduleinfo.h.

int TDECModuleInfo::weight (  )  const
Returns:
the weight of the module which determines the order of the pages in the KCMultiDialog. It's set by the X-TDE-Weight field.

Definition at line 204 of file tdecmoduleinfo.cpp.


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

tdeutils

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

tdeutils

Skip menu "tdeutils"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeutils by doxygen 1.6.3
This website is maintained by Timothy Pearson.