|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kde.koala.KShared
org.kde.koala.KSycocaEntry
org.kde.koala.KServiceGroup
public class KServiceGroup
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 ... } }
Constructor Summary | |
---|---|
protected |
KServiceGroup(java.lang.Class dummy)
|
|
KServiceGroup(org.kde.qt.QDataStream _str,
int offset,
boolean deep)
The stream must already be positionned at the correct offset |
|
KServiceGroup(java.lang.String name)
Construct a dummy servicegroup indexed with name. |
|
KServiceGroup(java.lang.String _fullpath,
java.lang.String _relpath)
Construct a service and take all informations from a config file |
Method Summary | |
---|---|
protected void |
addEntry(KSycocaEntry entry)
Add a service to this group |
boolean |
allowInline()
|
java.lang.String |
baseGroupName()
Returns a non-empty string if the group is a special base group. |
java.lang.String |
caption()
Returns the caption of this group. |
int |
childCount()
Returns the total number of displayable services in this group and any of its subgroups. |
java.lang.String |
comment()
Returns the comment about this service group. |
java.lang.String |
directoryEntryPath()
Returns a path to the .directory file describing this service group. |
void |
dispose()
Delete the wrapped C++ instance ahead of finalize() |
protected void |
finalize()
Deletes the wrapped C++ instance |
java.lang.String |
icon()
Returns the name of the icon associated with the group. |
boolean |
inlineAlias()
|
int |
inlineValue()
|
boolean |
isDisposed()
Has the wrapped C++ instance been deleted? |
boolean |
isValid()
Checks whether the entry is valid, returns always true. |
java.util.ArrayList |
layoutInfo()
Returns information related to the layout of services in this group. |
void |
load(org.kde.qt.QDataStream arg1)
Load the service from a stream. |
java.lang.String |
name()
Name used for indexing. |
boolean |
noDisplay()
Returns true if the NoDisplay flag was set, i.e. |
void |
parseAttribute(java.lang.String item,
boolean showEmptyMenu,
boolean showInline,
boolean showInlineHeader,
boolean showInlineAlias,
int[] inlineValue)
This function parse attributes into menu |
java.lang.String |
relPath()
Returns the relative path of the service group. |
void |
save(org.kde.qt.QDataStream arg1)
Save the service to a stream. |
void |
setAllowInline(boolean _b)
|
void |
setInlineAlias(boolean _b)
|
void |
setInlineValue(int _val)
|
void |
setLayoutInfo(java.lang.String[] layout)
Sets information related to the layout of services in this group. |
void |
setShowEmptyMenu(boolean b)
|
void |
setShowInlineHeader(boolean _b)
|
boolean |
showEmptyMenu()
Return true if we want to display empty menu entry |
boolean |
showInlineHeader()
|
java.util.ArrayList |
suppressGenericNames()
Returns a list of untranslated generic names that should be be supressed when showing this group. |
Methods inherited from class org.kde.koala.KSycocaEntry |
---|
entryPath, isDeleted, isType, offset, read, read, sycocaType |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected KServiceGroup(java.lang.Class dummy)
public KServiceGroup(java.lang.String name)
name.
name
- the name of the service grouppublic KServiceGroup(java.lang.String _fullpath, java.lang.String _relpath)
_fullpath
- full path to the config file_relpath
- relative path to the config filepublic KServiceGroup(org.kde.qt.QDataStream _str, int offset, boolean deep)
Method Detail |
---|
public boolean isValid()
isValid
in class KSycocaEntry
public java.lang.String name()
name
in class KSycocaEntry
public java.lang.String relPath()
public java.lang.String caption()
public java.lang.String icon()
public java.lang.String comment()
public int childCount()
public boolean noDisplay()
public boolean showEmptyMenu()
public void setShowEmptyMenu(boolean b)
public boolean showInlineHeader()
public void setShowInlineHeader(boolean _b)
public boolean inlineAlias()
public void setInlineAlias(boolean _b)
public boolean allowInline()
public void setAllowInline(boolean _b)
public int inlineValue()
public void setInlineValue(int _val)
public java.util.ArrayList suppressGenericNames()
public void setLayoutInfo(java.lang.String[] layout)
public java.util.ArrayList layoutInfo()
public void load(org.kde.qt.QDataStream arg1)
load
in class KSycocaEntry
public void save(org.kde.qt.QDataStream arg1)
save
in class KSycocaEntry
public java.lang.String baseGroupName()
public java.lang.String directoryEntryPath()
public void parseAttribute(java.lang.String item, boolean showEmptyMenu, boolean showInline, boolean showInlineHeader, boolean showInlineAlias, int[] inlineValue)
protected void addEntry(KSycocaEntry entry)
protected void finalize() throws java.lang.InternalError
finalize
in class java.lang.Object
java.lang.InternalError
public void dispose()
public boolean isDisposed()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |