.TH "KServiceGroup" 3 "28 Jan 2004" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KServiceGroup \- This class is typically used like this:.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kservicegroup.h>\fP
.PP
Inherits \fBKSycocaEntry\fP.
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "typedef \fBKSharedPtr\fP< \fBKServiceGroup\fP > \fBPtr\fP"
.br
.ti -1c
.RI "typedef \fBKSharedPtr\fP< \fBKSycocaEntry\fP > \fBSPtr\fP"
.br
.ti -1c
.RI "typedef \fBQValueList\fP< \fBSPtr\fP > \fBList\fP"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKServiceGroup\fP (const  \fBQString\fP &name)"
.br
.RI "\fIConstruct a dummy servicegroup indexed with \fCname\fP 
.PP
\fBSince:\fP
.RS 4
3.1. 
.RE
.PP
\fP"
.ti -1c
.RI "\fBKServiceGroup\fP (const  \fBQString\fP &_fullpath, const  \fBQString\fP &_relpath)"
.br
.RI "\fIConstruct a service and take all informations from a config file. \fP"
.ti -1c
.RI "\fBKServiceGroup\fP (\fBQDataStream\fP &_str, int \fBoffset\fP, bool deep)"
.br
.ti -1c
.RI "bool \fBisValid\fP () const "
.br
.ti -1c
.RI "virtual \fBQString\fP \fBname\fP () const "
.br
.RI "\fIName used for indexing. \fP"
.ti -1c
.RI "virtual \fBQString\fP \fBrelPath\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBcaption\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBicon\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBcomment\fP () const "
.br
.ti -1c
.RI "int \fBchildCount\fP ()"
.br
.ti -1c
.RI "bool \fBnoDisplay\fP () const "
.br
.ti -1c
.RI "virtual void \fBload\fP (\fBQDataStream\fP &)"
.br
.ti -1c
.RI "virtual void \fBsave\fP (\fBQDataStream\fP &)"
.br
.ti -1c
.RI "virtual \fBList\fP \fBentries\fP (bool sorted, bool excludeNoDisplay)"
.br
.RI "\fIList of all Services and ServiceGroups within this ServiceGroup. \fP"
.ti -1c
.RI "virtual \fBList\fP \fBentries\fP (bool sorted=false)"
.br
.RI "\fIAs above with excludeNoDisplay true. \fP"
.ti -1c
.RI "\fBQString\fP \fBbaseGroupName\fP () const "
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "\fBPtr\fP \fBbaseGroup\fP (const  \fBQString\fP &baseGroupName)"
.br
.ti -1c
.RI "\fBPtr\fP \fBroot\fP ()"
.br
.ti -1c
.RI "\fBPtr\fP \fBgroup\fP (const  \fBQString\fP &relPath)"
.br
.ti -1c
.RI "\fBPtr\fP \fBchildGroup\fP (const  \fBQString\fP &parent)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "void \fBaddEntry\fP (\fBKSycocaEntry\fP *entry)"
.br
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "\fBQString\fP \fBm_strCaption\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBm_strIcon\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBm_strComment\fP"
.br
.ti -1c
.RI "\fBList\fP \fBm_serviceList\fP"
.br
.ti -1c
.RI "bool \fBm_bDeep\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBm_strBaseGroupName\fP"
.br
.ti -1c
.RI "int \fBm_childCount\fP"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBKBuildServiceGroupFactory\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
This class is typically used like this:. 

// Lookup screensaver group \fBKServiceGroup::Ptr\fP group = \fBKServiceGroup::baseGroup\fP('screensavers'); if (!group || !group->\fBisValid()\fP) return;
.PP
\fBKServiceGroup::List\fP list = group->\fBentries()\fP;
.PP
// Iterate over all entries in the group for( \fBKServiceGroup::List::ConstIterator\fP it = list.begin(); it != list.end(); it++) { \fBKSycocaEntry\fP *p = (*it); if (p->isType(KST_KService)) { \fBKService\fP *s = static_cast<KService *>(p); printf('Name = %s\\n', s->\fBname()\fP.latin1()); } else if (p->isType(KST_KServiceGroup)) { KServiceGroup *g = static_cast<KServiceGroup *>(p); // Sub group ... } } 
.PP
Definition at line 63 of file kservicegroup.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KServiceGroup::KServiceGroup (const \fBQString\fP & name)"
.PP
Construct a dummy servicegroup indexed with \fCname\fP 
.PP
\fBSince:\fP
.RS 4
3.1. 
.RE
.PP
Definition at line 40 of file kservicegroup.cpp.
.PP
References KSycocaEntry::m_bDeleted, and name().
.SS "KServiceGroup::KServiceGroup (const \fBQString\fP & _fullpath, const \fBQString\fP & _relpath)"
.PP
Construct a service and take all informations from a config file. \fBParameters:\fP
.RS 4
\fI_fullpath\fP full path to the config file 
.br
\fI_relpath\fP relative path to the config file 
.RE
.PP
Definition at line 47 of file kservicegroup.cpp.
.PP
References QString::findRev(), QString::isEmpty(), QString::left(), QString::length(), KSycocaEntry::m_bDeleted, QString::mid(), KConfigBase::readBoolEntry(), KConfigBase::readEntry(), QString::right(), and KConfigBase::setDesktopGroup().
.SH "Member Function Documentation"
.PP 
.SS "bool KServiceGroup::isValid () const\fC [inline, virtual]\fP"
.PP
\fBReturns:\fP
.RS 4
true 
.RE
.PP
Implements \fBKSycocaEntry\fP.
.PP
Definition at line 97 of file kservicegroup.h.
.SS "virtual \fBQString\fP KServiceGroup::name () const\fC [inline, virtual]\fP"
.PP
Name used for indexing. Implements \fBKSycocaEntry\fP.
.PP
Definition at line 102 of file kservicegroup.h.
.PP
References KSycocaEntry::entryPath().
.PP
Referenced by entries(), and KServiceGroup().
.SS "\fBQString\fP KServiceGroup::caption () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
the caption of this group 
.RE
.PP
Definition at line 108 of file kservicegroup.h.
.SS "\fBQString\fP KServiceGroup::icon () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
the icon associated with the group. 
.RE
.PP
Definition at line 113 of file kservicegroup.h.
.SS "\fBQString\fP KServiceGroup::comment () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
the descriptive comment for the group, if there is one. 
.RE
.PP
Definition at line 118 of file kservicegroup.h.
.SS "int KServiceGroup::childCount ()"
.PP
\fBReturns:\fP
.RS 4
the total number of displayable services in this group and any of its subgroups. 
.RE
.PP
Definition at line 93 of file kservicegroup.cpp.
.PP
References QValueList::begin(), QValueList::end(), KSycocaEntry::isType(), and KService::noDisplay().
.SS "bool KServiceGroup::noDisplay () const"
.PP
\fBReturns:\fP
.RS 4
true if the NoDisplay flag was set, i.e. if this group should be hidden from menus, while still being in ksycoca. 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP
Definition at line 120 of file kservicegroup.cpp.
.PP
Referenced by entries().
.SS "\fBKServiceGroup::List\fP KServiceGroup::entries (bool sorted, bool excludeNoDisplay)\fC [virtual]\fP"
.PP
List of all Services and ServiceGroups within this ServiceGroup. \fBParameters:\fP
.RS 4
\fIsorted\fP indicates whether to sort items 
.br
\fIwhether\fP to include items marked 'NoDisplay' 
.RE
.PP
Definition at line 202 of file kservicegroup.cpp.
.PP
References QValueList::append(), QValueList< KSortableItem< T, Key > >::begin(), QValueList::begin(), QValueList< KSortableItem< T, Key > >::end(), QValueList::end(), QString::findRev(), QString::fromUtf8(), KSortableValueList< T, Key >::insert(), KSycocaEntry::isType(), KStdAccel::key(), QString::length(), KSycocaEntry::List, QString::local8Bit(), m_serviceList, QString::mid(), KStdAccel::name(), KSycocaEntry::name(), name(), KService::noDisplay(), noDisplay(), QValueList::remove(), KSortableValueList< T, Key >::sort(), and QString::truncate().
.PP
Referenced by entries().
.SS "\fBKServiceGroup::List\fP KServiceGroup::entries (bool sorted = false)\fC [virtual]\fP"
.PP
As above with excludeNoDisplay true. Definition at line 196 of file kservicegroup.cpp.
.PP
References entries().
.SS "\fBQString\fP KServiceGroup::baseGroupName () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
non-empty string if the group is a special base group. By default, 'Settings/' is the kcontrol base group ('settings') and 'System/Screensavers/' is the screensavers base group ('screensavers'). This allows moving the groups without breaking those apps.
.RE
.PP
The base group is defined by the X-KDE-BaseGroup key in the .directory file. Definition at line 165 of file kservicegroup.h.
.SS "\fBKServiceGroup::Ptr\fP KServiceGroup::baseGroup (const \fBQString\fP & baseGroupName)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
the group for the given baseGroupName Can return 0L if the directory (or the .directory file) was deleted. 
.RE
.PP
Definition at line 331 of file kservicegroup.cpp.
.SS "\fBKServiceGroup::Ptr\fP KServiceGroup::childGroup (const \fBQString\fP & parent)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
the group of services that have X-KDE-ParentApp equal to \fCparent\fP 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP
Definition at line 350 of file kservicegroup.cpp.

.SH "Author"
.PP 
Generated automatically by Doxygen for kio Library from the source code.
