KServiceGroup Class Reference
This class is typically used like this:. More...
#include <kservicegroup.h>
Inheritance diagram for KServiceGroup:

Public Types | |
typedef KSharedPtr< KServiceGroup > | Ptr |
typedef KSharedPtr< KSycocaEntry > | SPtr |
typedef QValueList< SPtr > | List |
Public Member Functions | |
KServiceGroup (const QString &name) | |
Construct a dummy servicegroup indexed with name
| |
KServiceGroup (const QString &_fullpath, const QString &_relpath) | |
Construct a service and take all informations from a config file. | |
KServiceGroup (QDataStream &_str, int offset, bool deep) | |
bool | isValid () const |
virtual QString | name () const |
Name used for indexing. | |
virtual QString | relPath () const |
QString | caption () const |
QString | icon () const |
QString | comment () const |
int | childCount () |
bool | noDisplay () const |
virtual void | load (QDataStream &) |
virtual void | save (QDataStream &) |
virtual List | entries (bool sorted, bool excludeNoDisplay) |
List of all Services and ServiceGroups within this ServiceGroup. | |
virtual List | entries (bool sorted=false) |
As above with excludeNoDisplay true. | |
QString | baseGroupName () const |
Static Public Member Functions | |
Ptr | baseGroup (const QString &baseGroupName) |
Ptr | root () |
Ptr | group (const QString &relPath) |
Ptr | childGroup (const QString &parent) |
Protected Member Functions | |
void | addEntry (KSycocaEntry *entry) |
virtual void | virtual_hook (int id, void *data) |
Protected Attributes | |
QString | m_strCaption |
QString | m_strIcon |
QString | m_strComment |
List | m_serviceList |
bool | m_bDeep |
QString | m_strBaseGroupName |
int | m_childCount |
Friends | |
class | KBuildServiceGroupFactory |
Detailed Description
This class is typically used like this:.// 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 ... } }
Definition at line 63 of file kservicegroup.h.
Constructor & Destructor Documentation
|
Construct a dummy servicegroup indexed with
Definition at line 40 of file kservicegroup.cpp. References KSycocaEntry::m_bDeleted, and name(). |
|
Construct a service and take all informations from a config file.
Definition at line 47 of file kservicegroup.cpp. References QString::findRev(), QString::isEmpty(), QString::left(), QString::length(), KSycocaEntry::m_bDeleted, QString::mid(), KConfigBase::readBoolEntry(), KConfigBase::readEntry(), QString::right(), and KConfigBase::setDesktopGroup(). |
Member Function Documentation
|
Implements KSycocaEntry. Definition at line 97 of file kservicegroup.h. |
|
Name used for indexing.
Implements KSycocaEntry. Definition at line 102 of file kservicegroup.h. References KSycocaEntry::entryPath(). Referenced by entries(), and KServiceGroup(). |
|
Definition at line 108 of file kservicegroup.h. |
|
Definition at line 113 of file kservicegroup.h. |
|
Definition at line 118 of file kservicegroup.h. |
|
Definition at line 93 of file kservicegroup.cpp. References QValueList::begin(), QValueList::end(), KSycocaEntry::isType(), and KService::noDisplay(). |
|
Definition at line 120 of file kservicegroup.cpp. Referenced by entries(). |
|
List of all Services and ServiceGroups within this ServiceGroup.
Definition at line 202 of file kservicegroup.cpp. 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(). Referenced by entries(). |
|
As above with excludeNoDisplay true.
Definition at line 196 of file kservicegroup.cpp. References entries(). |
|
Definition at line 165 of file kservicegroup.h. |
|
Definition at line 331 of file kservicegroup.cpp. |
|
Definition at line 350 of file kservicegroup.cpp. |
The documentation for this class was generated from the following files: