org.kde.koala

Class KServiceGroup

public class KServiceGroup extends KSycocaEntry

KServiceGroup represents a group of service, for example screensavers. 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 = (KService)(p);
       printf("Name = %s\n", s.name().latin1());
    }
    else if (p.isType(KST_KServiceGroup))
    {
       KServiceGroup g = (KServiceGroup)(p);
       // Sub group ...
    }
 }
 

UNKNOWN: Represents a group of services.

Constructor Summary
protected KServiceGroup(Class dummy)
KServiceGroup(String name)
Construct a dummy servicegroup indexed with name.
KServiceGroup(String _fullpath, String _relpath)
Construct a service and take all informations from a config file
KServiceGroup(QDataStream _str, int offset, boolean deep)
The stream must already be positionned at the correct offset
Method Summary
protected voidaddEntry(KSycocaEntry entry)
Add a service to this group
booleanallowInline()
StringbaseGroupName()
Returns a non-empty string if the group is a special base group.
Stringcaption()
Returns the caption of this group.
intchildCount()
Returns the total number of displayable services in this group and any of its subgroups.
Stringcomment()
Returns the comment about this service group.
StringdirectoryEntryPath()
Returns a path to the .directory file describing this service group.
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voidfinalize()
Deletes the wrapped C++ instance
Stringicon()
Returns the name of the icon associated with the group.
booleaninlineAlias()
intinlineValue()
booleanisDisposed()
Has the wrapped C++ instance been deleted?
booleanisValid()
Checks whether the entry is valid, returns always true.
ArrayListlayoutInfo()
Returns information related to the layout of services in this group.
voidload(QDataStream arg1)
Load the service from a stream.
Stringname()
Name used for indexing.
booleannoDisplay()
Returns true if the NoDisplay flag was set, i.e. if this group should be hidden from menus, while still being in ksycoca.
voidparseAttribute(String item, boolean showEmptyMenu, boolean showInline, boolean showInlineHeader, boolean showInlineAlias, int[] inlineValue)
This function parse attributes into menu
StringrelPath()
Returns the relative path of the service group.
voidsave(QDataStream arg1)
Save the service to a stream.
voidsetAllowInline(boolean _b)
voidsetInlineAlias(boolean _b)
voidsetInlineValue(int _val)
voidsetLayoutInfo(String[] layout)
Sets information related to the layout of services in this group.
voidsetShowEmptyMenu(boolean b)
voidsetShowInlineHeader(boolean _b)
booleanshowEmptyMenu()
Return true if we want to display empty menu entry
booleanshowInlineHeader()
ArrayListsuppressGenericNames()
Returns a list of untranslated generic names that should be be supressed when showing this group.

Constructor Detail

KServiceGroup

protected KServiceGroup(Class dummy)

KServiceGroup

public KServiceGroup(String name)
Construct a dummy servicegroup indexed with name.

Parameters: name the name of the service group

UNKNOWN: Construct a dummy servicegroup indexed with name.

KServiceGroup

public KServiceGroup(String _fullpath, String _relpath)
Construct a service and take all informations from a config file

Parameters: _fullpath full path to the config file _relpath relative path to the config file

UNKNOWN: Construct a service and take all informations from a config file

KServiceGroup

public KServiceGroup(QDataStream _str, int offset, boolean deep)
The stream must already be positionned at the correct offset

UNKNOWN:

Method Detail

addEntry

protected void addEntry(KSycocaEntry entry)
Add a service to this group

UNKNOWN:

allowInline

public boolean allowInline()

Returns: true if we allow to inline menu.

UNKNOWN:

baseGroupName

public String baseGroupName()
Returns a 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. The base group is defined by the X-KDE-BaseGroup key in the .directory file.

Returns: the base group name, or null if no base group

UNKNOWN: Returns a non-empty string if the group is a special base group.

caption

public String caption()
Returns the caption of this group.

Returns: the caption of this group

UNKNOWN: Returns the caption of this group.

childCount

public int childCount()
Returns the total number of displayable services in this group and any of its subgroups.

Returns: the number of child services

UNKNOWN: Returns the total number of displayable services in this group and any of its subgroups.

comment

public String comment()
Returns the comment about this service group.

Returns: the descriptive comment for the group, if there is one, or null if not set

UNKNOWN: Returns the comment about this service group.

directoryEntryPath

public String directoryEntryPath()
Returns a path to the .directory file describing this service group. The path is either absolute or relative to the "apps" resource.

UNKNOWN: Returns a path to the .

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

finalize

protected void finalize()
Deletes the wrapped C++ instance

icon

public String icon()
Returns the name of the icon associated with the group.

Returns: the name of the icon associated with the group, or null if not set

UNKNOWN: Returns the name of the icon associated with the group.

inlineAlias

public boolean inlineAlias()

Returns: true to show an inline alias item into menu

UNKNOWN:

inlineValue

public int inlineValue()

Returns: inline limite value

UNKNOWN:

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

isValid

public boolean isValid()
Checks whether the entry is valid, returns always true.

Returns: true

UNKNOWN: Checks whether the entry is valid, returns always true.

layoutInfo

public ArrayList layoutInfo()
Returns information related to the layout of services in this group.

UNKNOWN:

load

public void load(QDataStream arg1)
Load the service from a stream.

UNKNOWN:

name

public String name()
Name used for indexing.

Returns: the service group's name

UNKNOWN: Name used for indexing.

noDisplay

public boolean noDisplay()
Returns true if the NoDisplay flag was set, i.e. if this group should be hidden from menus, while still being in ksycoca.

Returns: true to hide this service group, false to display it

UNKNOWN: Returns true if the NoDisplay flag was set, i.

parseAttribute

public void parseAttribute(String item, boolean showEmptyMenu, boolean showInline, boolean showInlineHeader, boolean showInlineAlias, int[] inlineValue)
This function parse attributes into menu

UNKNOWN: This function parse attributes into menu

relPath

public String relPath()
Returns the relative path of the service group.

Returns: the service group's relative path

UNKNOWN: Returns the relative path of the service group.

save

public void save(QDataStream arg1)
Save the service to a stream.

UNKNOWN:

setAllowInline

public void setAllowInline(boolean _b)

setInlineAlias

public void setInlineAlias(boolean _b)

setInlineValue

public void setInlineValue(int _val)

setLayoutInfo

public void setLayoutInfo(String[] layout)
Sets information related to the layout of services in this group.

UNKNOWN:

setShowEmptyMenu

public void setShowEmptyMenu(boolean b)

setShowInlineHeader

public void setShowInlineHeader(boolean _b)

showEmptyMenu

public boolean showEmptyMenu()
Return true if we want to display empty menu entry

Returns: true to show this service group as menu entry is empty, false to hide it

UNKNOWN: Return true if we want to display empty menu entry

showInlineHeader

public boolean showInlineHeader()

Returns: true to show an inline header into menu

UNKNOWN:

suppressGenericNames

public ArrayList suppressGenericNames()
Returns a list of untranslated generic names that should be be supressed when showing this group. E.g. The group "Games/Arcade" might want to suppress the generic name "Arcade Game" since it's redundant in this particular context.

UNKNOWN: Returns a list of untranslated generic names that should be be supressed when showing this group.