.TH "KServiceGroup" kde3 "11 Jun 2005" "Version Version 3.4.1" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KServiceGroup \- KServiceGroup represents a group of service, for example screensavers. Represents a group of services.  

.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
.ti -1c
.RI "\fBKServiceGroup\fP (const \fBQString\fP &_fullpath, const \fBQString\fP &_relpath)"
.br
.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
.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 "\fBQStringList\fP \fBsuppressGenericNames\fP () const "
.br
.ti -1c
.RI "void \fBsetLayoutInfo\fP (const \fBQStringList\fP &layout)"
.br
.ti -1c
.RI "\fBQStringList\fP \fBlayoutInfo\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 "\fBList\fP \fBentries\fP (bool sorted, bool excludeNoDisplay, bool allowSeparators, bool sortByGenericName=false)"
.br
.ti -1c
.RI "virtual \fBList\fP \fBentries\fP (bool sorted, bool excludeNoDisplay)"
.br
.ti -1c
.RI "virtual \fBList\fP \fBentries\fP (bool sorted=false)"
.br
.ti -1c
.RI "\fBQString\fP \fBbaseGroupName\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBdirectoryEntryPath\fP () const "
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static \fBPtr\fP \fBbaseGroup\fP (const \fBQString\fP &baseGroupName)"
.br
.ti -1c
.RI "static \fBPtr\fP \fBroot\fP ()"
.br
.ti -1c
.RI "static \fBPtr\fP \fBgroup\fP (const \fBQString\fP &relPath)"
.br
.ti -1c
.RI "static \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 
KServiceGroup represents a group of service, for example screensavers. Represents a group of services. 

This class is typically used like this:
.PP
.PP
.nf
 // Lookup screensaver group
 KServiceGroup::Ptr group = KServiceGroup::baseGroup('screensavers');
 if (!group || !group->isValid()) return;

 KServiceGroup::List list = group->entries();

 // Iterate over all entries in the group
 for( KServiceGroup::List::ConstIterator it = list.begin();
      it != list.end(); it++)
 {
    KSycocaEntry *p = (*it);
    if (p->isType(KST_KService))
    {
       KService *s = static_cast<KService *>(p);
       printf('Name = %s\n', s->name().latin1());
    }
    else if (p->isType(KST_KServiceGroup))
    {
       KServiceGroup *g = static_cast<KServiceGroup *>(p);
       // Sub group ...
    }
 }
.fi
.PP
 
.PP
Definition at line 67 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
\fBParameters:\fP
.RS 4
\fIname\fP the name of the service group 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 43 of file kservicegroup.cpp.
.PP
References name().
.SS "KServiceGroup::KServiceGroup (const \fBQString\fP & _fullpath, const \fBQString\fP & _relpath)"
.PP
Construct a service and take all informations from a config file. 
.PP
\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

.PP
Definition at line 50 of file kservicegroup.cpp.
.PP
References QString::findRev(), KConfigBase::hasKey(), QString::isEmpty(), QString::left(), QString::length(), QString::mid(), KConfigBase::readBoolEntry(), KConfigBase::readEntry(), KConfigBase::readListEntry(), QString::right(), and KConfigBase::setDesktopGroup().
.SH "Member Function Documentation"
.PP 
.SS "bool KServiceGroup::isValid () const\fC [inline, virtual]\fP"
.PP
Checks whether the entry is valid, returns always true. 
.PP
\fBReturns:\fP
.RS 4
true 
.RE
.PP

.PP
Implements \fBKSycocaEntry\fP.
.PP
Definition at line 103 of file kservicegroup.h.
.SS "virtual \fBQString\fP KServiceGroup::name () const\fC [inline, virtual]\fP"
.PP
Name used for indexing. 
.PP
\fBReturns:\fP
.RS 4
the service group's name 
.RE
.PP

.PP
Implements \fBKSycocaEntry\fP.
.PP
Definition at line 109 of file kservicegroup.h.
.PP
References KSycocaEntry::entryPath().
.PP
Referenced by entries(), and KServiceGroup().
.SS "virtual \fBQString\fP KServiceGroup::relPath () const\fC [inline, virtual]\fP"
.PP
Returns the relative path of the service group. 
.PP
\fBReturns:\fP
.RS 4
the service group's relative path 
.RE
.PP

.PP
Definition at line 115 of file kservicegroup.h.
.PP
References KSycocaEntry::entryPath().
.PP
Referenced by entries(), and group().
.SS "\fBQString\fP KServiceGroup::caption () const\fC [inline]\fP"
.PP
Returns the caption of this group. 
.PP
\fBReturns:\fP
.RS 4
the caption of this group 
.RE
.PP

.PP
Definition at line 121 of file kservicegroup.h.
.SS "\fBQString\fP KServiceGroup::icon () const\fC [inline]\fP"
.PP
Returns the name of the icon associated with the group. 
.PP
\fBReturns:\fP
.RS 4
the name of the icon associated with the group, or QString::null if not set 
.RE
.PP

.PP
Definition at line 128 of file kservicegroup.h.
.SS "\fBQString\fP KServiceGroup::comment () const\fC [inline]\fP"
.PP
Returns the comment about this service group. 
.PP
\fBReturns:\fP
.RS 4
the descriptive comment for the group, if there is one, or QString::null if not set 
.RE
.PP

.PP
Definition at line 135 of file kservicegroup.h.
.SS "int KServiceGroup::childCount ()"
.PP
Returns the total number of displayable services in this group and any of its subgroups. 
.PP
\fBReturns:\fP
.RS 4
the number of child services 
.RE
.PP

.PP
Definition at line 114 of file kservicegroup.cpp.
.PP
References QValueList::begin(), QValueList::end(), KSycocaEntry::isType(), and KService::noDisplay().
.SS "bool KServiceGroup::noDisplay () const"
.PP
Returns true if the NoDisplay flag was set, i.e. 
.PP
if this group should be hidden from menus, while still being in ksycoca. 
.PP
\fBReturns:\fP
.RS 4
true to hide this service group, false to display it 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 141 of file kservicegroup.cpp.
.PP
References QString::startsWith().
.PP
Referenced by entries().
.SS "\fBQStringList\fP KServiceGroup::suppressGenericNames () const"
.PP
Returns a list of untranslated generic names that should be be supressed when showing this group. 
.PP
E.g. The group 'Games/Arcade' might want to suppress the generic name 'Arcade Game' since it's redundant in this particular context. 
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 146 of file kservicegroup.cpp.
.SS "\fBKServiceGroup::List\fP KServiceGroup::entries (bool sorted, bool excludeNoDisplay, bool allowSeparators, bool sortByGenericName = \fCfalse\fP)"
.PP
List of all Services and ServiceGroups within this ServiceGroup. 
.PP
\fBParameters:\fP
.RS 4
\fIsorted\fP true to sort items 
.br
\fIexcludeNoDisplay\fP true to exclude items marked 'NoDisplay' 
.br
\fIallowSeparators\fP true to allow separator items to be included 
.br
\fIsortByGenericName\fP true to sort GenericName+Name instead of Name+GenericName 
.RE
.PP
\fBReturns:\fP
.RS 4
the list of entries 
.RE
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 246 of file kservicegroup.cpp.
.PP
References QValueList< KSortableItem< T, Key > >::begin(), QValueList::begin(), QValueList< KSortableItem< T, Key > >::end(), QValueList::end(), group(), KSortableValueList< T, Key >::insert(), QString::isEmpty(), KSycocaEntry::isType(), QString::length(), QString::local8Bit(), m_serviceList, KService::menuId(), QString::mid(), KSycocaEntry::name(), name(), KService::noDisplay(), noDisplay(), relPath(), QValueList< KSortableItem< T, Key > >::remove(), and KSortableValueList< T, Key >::sort().
.PP
Referenced by entries().
.SS "\fBKServiceGroup::List\fP KServiceGroup::entries (bool sorted = \fCfalse\fP)\fC [virtual]\fP"
.PP
List of all Services and ServiceGroups within this ServiceGroup. 
.PP
\fBParameters:\fP
.RS 4
\fIsorted\fP true to sort items 
.RE
.PP
\fBReturns:\fP
.RS 4
the list of entried 
.RE
.PP

.PP
Definition at line 226 of file kservicegroup.cpp.
.PP
References entries().
.SS "\fBQString\fP KServiceGroup::baseGroupName () const\fC [inline]\fP"
.PP
Returns a non-empty string if the group is a special base group. 
.PP
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.
.PP
The base group is defined by the X-KDE-BaseGroup key in the .directory file. 
.PP
\fBReturns:\fP
.RS 4
the base group name, or null if no base group 
.RE
.PP

.PP
Definition at line 215 of file kservicegroup.h.
.SS "\fBQString\fP KServiceGroup::directoryEntryPath () const"
.PP
Returns a path to the .directory file describing this service group. 
.PP
The path is either absolute or relative to the 'apps' resource. 
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 504 of file kservicegroup.cpp.
.SS "\fBKServiceGroup::Ptr\fP KServiceGroup::baseGroup (const \fBQString\fP & baseGroupName)\fC [static]\fP"
.PP
Returns the group for the given baseGroupName. 
.PP
Can return 0L if the directory (or the .directory file) was deleted. 
.PP
\fBReturns:\fP
.RS 4
the base group with the given name, or 0 if not available. 
.RE
.PP

.PP
Definition at line 479 of file kservicegroup.cpp.
.SS "\fBKServiceGroup::Ptr\fP KServiceGroup::root ()\fC [static]\fP"
.PP
Returns the root service group. 
.PP
\fBReturns:\fP
.RS 4
the root service group 
.RE
.PP

.PP
Definition at line 485 of file kservicegroup.cpp.
.PP
Referenced by group().
.SS "\fBKServiceGroup::Ptr\fP KServiceGroup::group (const \fBQString\fP & relPath)\fC [static]\fP"
.PP
Returns the group with the given relative path. 
.PP
\fBParameters:\fP
.RS 4
\fIrelPath\fP the path of the service group 
.RE
.PP
\fBReturns:\fP
.RS 4
the group with the given relative path name. 
.RE
.PP

.PP
Definition at line 491 of file kservicegroup.cpp.
.PP
References QString::isEmpty(), relPath(), and root().
.PP
Referenced by entries().
.SS "\fBKServiceGroup::Ptr\fP KServiceGroup::childGroup (const \fBQString\fP & parent)\fC [static]\fP"
.PP
Returns the group of services that have X-KDE-ParentApp equal to \fCparent\fP (siblings). 
.PP
\fBParameters:\fP
.RS 4
\fIparent\fP the name of the service's parent 
.RE
.PP
\fBReturns:\fP
.RS 4
the services group 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 498 of file kservicegroup.cpp.

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