You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
286 lines
9.2 KiB
286 lines
9.2 KiB
15 years ago
|
//Auto-generated by kalyptus. DO NOT EDIT.
|
||
11 years ago
|
package org.trinitydesktop.koala;
|
||
15 years ago
|
|
||
11 years ago
|
import org.trinitydesktop.qt.Qt;
|
||
|
import org.trinitydesktop.qt.QtSupport;
|
||
|
import org.trinitydesktop.qt.TQDataStream;
|
||
15 years ago
|
import java.util.ArrayList;
|
||
|
|
||
|
/**
|
||
|
|
||
|
KServiceGroup represents a group of service, for example
|
||
|
screensavers.
|
||
|
This class is typically used like this:
|
||
|
<pre>
|
||
|
// 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 ...
|
||
|
}
|
||
|
}
|
||
|
</pre>
|
||
|
@short Represents a group of services.
|
||
|
|
||
|
*/
|
||
|
public class KServiceGroup extends KSycocaEntry {
|
||
|
protected KServiceGroup(Class dummy){super((Class) null);}
|
||
11 years ago
|
/**
|
||
15 years ago
|
Construct a dummy servicegroup indexed with <code>name.</code>
|
||
|
@param name the name of the service group
|
||
|
@short Construct a dummy servicegroup indexed with <code>name.</code>
|
||
|
*/
|
||
|
public KServiceGroup(String name) {
|
||
|
super((Class) null);
|
||
|
newKServiceGroup(name);
|
||
|
}
|
||
|
private native void newKServiceGroup(String name);
|
||
11 years ago
|
/**
|
||
15 years ago
|
Construct a service and take all informations from a config file
|
||
|
@param _fullpath full path to the config file
|
||
|
@param _relpath relative path to the config file
|
||
|
@short Construct a service and take all informations from a config file
|
||
|
*/
|
||
|
public KServiceGroup(String _fullpath, String _relpath) {
|
||
|
super((Class) null);
|
||
|
newKServiceGroup(_fullpath,_relpath);
|
||
|
}
|
||
|
private native void newKServiceGroup(String _fullpath, String _relpath);
|
||
11 years ago
|
/**
|
||
15 years ago
|
The stream must already be positionned at the correct offset
|
||
|
@short
|
||
|
*/
|
||
13 years ago
|
public KServiceGroup(TQDataStream _str, int offset, boolean deep) {
|
||
15 years ago
|
super((Class) null);
|
||
|
newKServiceGroup(_str,offset,deep);
|
||
|
}
|
||
13 years ago
|
private native void newKServiceGroup(TQDataStream _str, int offset, boolean deep);
|
||
11 years ago
|
/**
|
||
15 years ago
|
Checks whether the entry is valid, returns always true.
|
||
|
@return true
|
||
11 years ago
|
|
||
15 years ago
|
@short Checks whether the entry is valid, returns always true.
|
||
|
*/
|
||
|
public native boolean isValid();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Name used for indexing.
|
||
|
@return the service group's name
|
||
11 years ago
|
|
||
15 years ago
|
@short Name used for indexing.
|
||
|
*/
|
||
|
public native String name();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Returns the relative path of the service group.
|
||
|
@return the service group's relative path
|
||
11 years ago
|
|
||
15 years ago
|
@short Returns the relative path of the service group.
|
||
|
*/
|
||
|
public native String relPath();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Returns the caption of this group.
|
||
|
@return the caption of this group
|
||
11 years ago
|
|
||
15 years ago
|
@short Returns the caption of this group.
|
||
|
*/
|
||
|
public native String caption();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Returns the name of the icon associated with the group.
|
||
|
@return the name of the icon associated with the group,
|
||
|
or null if not set
|
||
11 years ago
|
|
||
15 years ago
|
@short Returns the name of the icon associated with the group.
|
||
|
*/
|
||
|
public native String icon();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Returns the comment about this service group.
|
||
|
@return the descriptive comment for the group, if there is one,
|
||
|
or null if not set
|
||
11 years ago
|
|
||
15 years ago
|
@short Returns the comment about this service group.
|
||
|
*/
|
||
|
public native String comment();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Returns the total number of displayable services in this group and
|
||
|
any of its subgroups.
|
||
|
@return the number of child services
|
||
11 years ago
|
|
||
15 years ago
|
@short Returns the total number of displayable services in this group and any of its subgroups.
|
||
|
*/
|
||
|
public native int childCount();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Returns true if the NoDisplay flag was set, i.e. if this
|
||
12 years ago
|
group should be hidden from menus, while still being in tdesycoca.
|
||
15 years ago
|
@return true to hide this service group, false to display it
|
||
|
|
||
|
@short Returns true if the NoDisplay flag was set, i.
|
||
|
*/
|
||
|
public native boolean noDisplay();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Return true if we want to display empty menu entry
|
||
|
@return true to show this service group as menu entry is empty, false to hide it
|
||
|
|
||
|
@short Return true if we want to display empty menu entry
|
||
|
*/
|
||
|
public native boolean showEmptyMenu();
|
||
|
public native void setShowEmptyMenu(boolean b);
|
||
11 years ago
|
/**
|
||
15 years ago
|
@return true to show an inline header into menu
|
||
|
|
||
|
@short
|
||
|
*/
|
||
|
public native boolean showInlineHeader();
|
||
|
public native void setShowInlineHeader(boolean _b);
|
||
11 years ago
|
/**
|
||
15 years ago
|
@return true to show an inline alias item into menu
|
||
|
|
||
|
@short
|
||
|
*/
|
||
|
public native boolean inlineAlias();
|
||
|
public native void setInlineAlias(boolean _b);
|
||
11 years ago
|
/**
|
||
15 years ago
|
@return true if we allow to inline menu.
|
||
|
|
||
|
@short
|
||
|
*/
|
||
|
public native boolean allowInline();
|
||
|
public native void setAllowInline(boolean _b);
|
||
11 years ago
|
/**
|
||
15 years ago
|
@return inline limite value
|
||
|
|
||
|
@short
|
||
|
*/
|
||
|
public native int inlineValue();
|
||
|
public native void setInlineValue(int _val);
|
||
11 years ago
|
/**
|
||
15 years ago
|
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.
|
||
|
@short Returns a list of untranslated generic names that should be be supressed when showing this group.
|
||
|
*/
|
||
|
public native ArrayList suppressGenericNames();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Sets information related to the layout of services in this group.
|
||
|
@short
|
||
|
*/
|
||
|
public native void setLayoutInfo(String[] layout);
|
||
11 years ago
|
/**
|
||
15 years ago
|
Returns information related to the layout of services in this group.
|
||
|
@short
|
||
|
*/
|
||
|
public native ArrayList layoutInfo();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Load the service from a stream.
|
||
|
@short
|
||
|
*/
|
||
13 years ago
|
public native void load(TQDataStream arg1);
|
||
11 years ago
|
/**
|
||
15 years ago
|
Save the service to a stream.
|
||
|
@short
|
||
|
*/
|
||
13 years ago
|
public native void save(TQDataStream arg1);
|
||
11 years ago
|
/**
|
||
15 years ago
|
List of all Services and ServiceGroups within this
|
||
|
ServiceGroup.
|
||
|
@param sorted true to sort items
|
||
|
@param excludeNoDisplay true to exclude items marked "NoDisplay"
|
||
|
@param allowSeparators true to allow separator items to be included
|
||
|
@param sortByGenericName true to sort GenericName+Name instead of Name+GenericName
|
||
|
@return the list of entries
|
||
|
|
||
|
@short List of all Services and ServiceGroups within this ServiceGroup.
|
||
|
*/
|
||
|
// KServiceGroup::List entries(bool arg1,bool arg2,bool arg3,bool arg4); >>>> NOT CONVERTED
|
||
|
// KServiceGroup::List entries(bool arg1,bool arg2,bool arg3); >>>> NOT CONVERTED
|
||
|
// KServiceGroup::List entries(bool arg1,bool arg2); >>>> NOT CONVERTED
|
||
11 years ago
|
/**
|
||
15 years ago
|
List of all Services and ServiceGroups within this
|
||
|
ServiceGroup.
|
||
|
@param sorted true to sort items
|
||
|
@return the list of entried
|
||
11 years ago
|
|
||
15 years ago
|
@short List of all Services and ServiceGroups within this ServiceGroup.
|
||
|
*/
|
||
|
// KServiceGroup::List entries(bool arg1); >>>> NOT CONVERTED
|
||
|
// KServiceGroup::List entries(); >>>> NOT CONVERTED
|
||
11 years ago
|
/**
|
||
15 years ago
|
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.
|
||
13 years ago
|
The base group is defined by the X-TDE-BaseGroup key
|
||
15 years ago
|
in the .directory file.
|
||
|
@return the base group name, or null if no base group
|
||
11 years ago
|
|
||
15 years ago
|
@short Returns a non-empty string if the group is a special base group.
|
||
|
*/
|
||
|
public native String baseGroupName();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Returns a path to the .directory file describing this service group.
|
||
|
The path is either absolute or relative to the "apps" resource.
|
||
|
@short Returns a path to the .
|
||
|
*/
|
||
|
public native String directoryEntryPath();
|
||
11 years ago
|
/**
|
||
15 years ago
|
This function parse attributes into menu
|
||
|
@short This function parse attributes into menu
|
||
|
*/
|
||
|
public native void parseAttribute(String item, boolean showEmptyMenu, boolean showInline, boolean showInlineHeader, boolean showInlineAlias, int[] inlineValue);
|
||
11 years ago
|
/**
|
||
15 years ago
|
Returns the group for the given baseGroupName.
|
||
|
Can return null if the directory (or the .directory file) was deleted.
|
||
|
@return the base group with the given name, or 0 if not available.
|
||
11 years ago
|
|
||
15 years ago
|
@short Returns the group for the given baseGroupName.
|
||
|
*/
|
||
13 years ago
|
// KServiceGroup::Ptr baseGroup(const TQString& arg1); >>>> NOT CONVERTED
|
||
11 years ago
|
/**
|
||
15 years ago
|
Returns the root service group.
|
||
|
@return the root service group
|
||
11 years ago
|
|
||
15 years ago
|
@short Returns the root service group.
|
||
|
*/
|
||
|
// KServiceGroup::Ptr root(); >>>> NOT CONVERTED
|
||
11 years ago
|
/**
|
||
15 years ago
|
Returns the group with the given relative path.
|
||
|
@param relPath the path of the service group
|
||
|
@return the group with the given relative path name.
|
||
11 years ago
|
|
||
15 years ago
|
@short Returns the group with the given relative path.
|
||
|
*/
|
||
13 years ago
|
// KServiceGroup::Ptr group(const TQString& arg1); >>>> NOT CONVERTED
|
||
11 years ago
|
/**
|
||
13 years ago
|
Returns the group of services that have X-TDE-ParentApp equal
|
||
15 years ago
|
to <code>parent</code> (siblings).
|
||
|
@param parent the name of the service's parent
|
||
|
@return the services group
|
||
|
|
||
13 years ago
|
@short Returns the group of services that have X-TDE-ParentApp equal to <code>parent</code> (siblings).
|
||
15 years ago
|
*/
|
||
13 years ago
|
// KServiceGroup::Ptr childGroup(const TQString& arg1); >>>> NOT CONVERTED
|
||
11 years ago
|
/**
|
||
15 years ago
|
Add a service to this group
|
||
|
@short
|
||
|
*/
|
||
|
protected native void addEntry(KSycocaEntry entry);
|
||
|
/** Deletes the wrapped C++ instance */
|
||
|
protected native void finalize() throws InternalError;
|
||
|
/** Delete the wrapped C++ instance ahead of finalize() */
|
||
|
public native void dispose();
|
||
|
/** Has the wrapped C++ instance been deleted? */
|
||
|
public native boolean isDisposed();
|
||
|
}
|