org.kde.koala

Class KFileMetaInfoGroup

public class KFileMetaInfoGroup extends Object implements QtSupport

UNKNOWN: A group of meta information items about a file This is one group of meta information items about a file (see KFileMetaInfo). @brief A group of meta information items about a file

Constructor Summary
protected KFileMetaInfoGroup(Class dummy)
KFileMetaInfoGroup(KFileMetaInfoGroup original)
Copy constructor
KFileMetaInfoGroup()
Default constructor.
Method Summary
KFileMetaInfoItemaddItem(String key)
Add an item to the info.
protected KFileMetaInfoItemappendItem(String key, QVariant value)
intattributes()
Returns the attributes of this item.
booleancontains(String key)
Checks whether an item with the given key exists.
protected voidderef()
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voidfinalize()
Deletes the wrapped C++ instance
booleanisDisposed()
Has the wrapped C++ instance been deleted?
booleanisEmpty()
Returns false if the object contains data, true if it's empty.
booleanisModified()
Returns true if an item as added or removed from the group.
booleanisValid()
Returns true if the item is valid, i.e. if it contains data, false if it's invalid (created with the default constructor and not been assigned anything), or if KFileMetaInfoGroup.item() didn't find your requested item).
KFileMetaInfoItemitem(String key)
This method searches for the specified item.
KFileMetaInfoItemitem(int hint)
Returns the item with the given hint.
ArrayListkeys()
Returns a list of all keys.
Stringname()
The name of this group.
KFileMetaInfoItemop_at(String key)
Operator for convenience.
ArrayListpreferredKeys()
Returns a list of all keys in preference order.
protected voidref()
ArrayListremovedItems()
Returns a list of all removed items.
booleanremoveItem(String key)
Remove this item from the meta info of the file.
protected voidsetAdded()
ArrayListsupportedKeys()
Use this method to get a list of keys in the specified group that the plugin knows about.
booleansupportsVariableKeys()
Returns true if this group supports adding or removing arbitrary keys, false if not.
StringtranslatedName()
The translated name of this group.
QVariantvalue(String key)
Convenience function.

Constructor Detail

KFileMetaInfoGroup

protected KFileMetaInfoGroup(Class dummy)

KFileMetaInfoGroup

public KFileMetaInfoGroup(KFileMetaInfoGroup original)
Copy constructor

UNKNOWN: Copy constructor

KFileMetaInfoGroup

public KFileMetaInfoGroup()
Default constructor. This creates an "invalid" item

UNKNOWN: Default constructor.

Method Detail

addItem

public KFileMetaInfoItem addItem(String key)
Add an item to the info. This is only possible if the specified key is in the supportedKeys list and not yet defined or if the group supports variable keys.

Parameters: key the key of the item

Returns: the KFileMetaInfoItem for the given key

UNKNOWN: Add an item to the info.

appendItem

protected KFileMetaInfoItem appendItem(String key, QVariant value)

attributes

public int attributes()
Returns the attributes of this item.

Returns: the attributes

UNKNOWN: Returns the attributes of this item.

contains

public boolean contains(String key)
Checks whether an item with the given key exists.

Returns: true if an item for this key exists.

UNKNOWN: Checks whether an item with the given key exists.

deref

protected void deref()

dispose

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

finalize

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

isDisposed

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

isEmpty

public boolean isEmpty()
Returns false if the object contains data, true if it's empty. An empty group is a group with no items (amazing, isn't it?).

Returns: true if empty, false otherwise

UNKNOWN: Returns false if the object contains data, true if it's empty.

isModified

public boolean isModified()
Returns true if an item as added or removed from the group.

Returns: true if an item was added or removed from the group, otherwise false.

UNKNOWN: Returns true if an item as added or removed from the group.

isValid

public boolean isValid()
Returns true if the item is valid, i.e. if it contains data, false if it's invalid (created with the default constructor and not been assigned anything), or if KFileMetaInfoGroup.item() didn't find your requested item).

Returns: true if valid, false if invalid

UNKNOWN: Returns true if the item is valid, i.

item

public KFileMetaInfoItem item(String key)
This method searches for the specified item.

Parameters: key the key of the item to search

Returns: the specified item if found, an invalid item, if not

UNKNOWN: This method searches for the specified item.

item

public KFileMetaInfoItem item(int hint)
Returns the item with the given hint.

Parameters: hint the hint of the item

Returns: the item with the specified hint

UNKNOWN: Returns the item with the given hint.

keys

public ArrayList keys()
Returns a list of all keys.

Returns: a list of all keys in the order they were inserted.

UNKNOWN: Returns a list of all keys.

name

public String name()
The name of this group.

Returns: the name of this group

UNKNOWN: The name of this group.

op_at

public KFileMetaInfoItem op_at(String key)
Operator for convenience. It does the same as item(), but you cannot specify a group to search in

UNKNOWN: Operator for convenience.

preferredKeys

public ArrayList preferredKeys()
Returns a list of all keys in preference order.

Returns: a list of all keys in preference order.

UNKNOWN: Returns a list of all keys in preference order.

ref

protected void ref()

removedItems

public ArrayList removedItems()
Returns a list of all removed items.

Returns: a list of all removed items

UNKNOWN: Returns a list of all removed items.

removeItem

public boolean removeItem(String key)
Remove this item from the meta info of the file. You cannot query KFileMetaInfo for a removed object, but you can query for a list of removed items with removedItems() if you need to. If you re-add it, its value will be cleared.

Parameters: key the key of the removed item

Returns: true if successful, false otherwise

UNKNOWN: Remove this item from the meta info of the file.

setAdded

protected void setAdded()

supportedKeys

public ArrayList supportedKeys()
Use this method to get a list of keys in the specified group that the plugin knows about. No variable keys. For a group that doesn't support variable keys, all keys that this group may have are returned. For a group that does support them, the non-variable ones are returned. See KFileMetaInfo about variable keys

Returns: the list of keys supported for this mimetype

UNKNOWN: Use this method to get a list of keys in the specified group that the plugin knows about.

supportsVariableKeys

public boolean supportsVariableKeys()
Returns true if this group supports adding or removing arbitrary keys, false if not.

Returns: true is variable keys are supported, false otherwise

UNKNOWN: Returns true if this group supports adding or removing arbitrary keys, false if not.

translatedName

public String translatedName()
The translated name of this group.

Returns: the translated name of this group

UNKNOWN: The translated name of this group.

value

public QVariant value(String key)
Convenience function. Returns the value of the specified key. It does the same as item(key).value().

Parameters: key the key of the item to search

Returns: the value with the given key

UNKNOWN: Convenience function.