org.kde.koala

Class KFileMetaInfoItem

public class KFileMetaInfoItem extends Object implements QtSupport

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

Constructor Summary
protected KFileMetaInfoItem(Class dummy)
KFileMetaInfoItem(KFileMetaInfoItem item)
Copy constructor
KFileMetaInfoItem()
Default constructor.
Method Summary
intattributes()
Returns the attributes for this item.
protected voidderef()
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voidfinalize()
Deletes the wrapped C++ instance
inthint()
Returns the hint for this item.
booleanisDisposed()
Has the wrapped C++ instance been deleted?
booleanisEditable()
You can query if the application can edit the item and write it back to the file with this method.
booleanisModified()
If you change an item, it is marked as "dirty".
booleanisRemoved()
If you remove an item, it is only marked for removal for the file.
booleanisValid()
Return 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).
Stringkey()
Returns the key of the item.
Stringprefix()
This method returns a translated prefix to be displayed before the value.
protected voidref()
protected voidsetAdded()
protected voidsetRemoved()
booleansetValue(QVariant value)
Changes the value of the item.
Stringstring(boolean mangle)
Returns a string containing the value, if possible.
Stringstring()
Stringsuffix()
This method returns a translated suffix to be displayed after the value.
StringtranslatedKey()
Returns a translation of the key for displaying to the user.
inttype()
Return the type of the item.
QVariantvalue()
Returns the value of the item.

Constructor Detail

KFileMetaInfoItem

protected KFileMetaInfoItem(Class dummy)

KFileMetaInfoItem

public KFileMetaInfoItem(KFileMetaInfoItem item)
Copy constructor

UNKNOWN: Copy constructor

KFileMetaInfoItem

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

UNKNOWN: Default constructor.

Method Detail

attributes

public int attributes()
Returns the attributes for this item. See KFileMimeTypeInfo.Attributes.

Returns: the attributes

UNKNOWN: Returns the attributes for this item.

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

hint

public int hint()
Returns the hint for this item. See KFileMimeTypeInfo.Hint.

Returns: the hint

UNKNOWN: Returns the hint for this item.

isDisposed

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

isEditable

public boolean isEditable()
You can query if the application can edit the item and write it back to the file with this method.

Returns: true if the item's value can be changed, false if not

UNKNOWN: This doesn't ensure that you have write access to the file and that enough space is available. You can query if the application can edit the item and write it back to the file with this method.

isModified

public boolean isModified()
If you change an item, it is marked as "dirty". On the next KFileMetaInfo.applyChanges() , the change will be written to the file. With this method, you can ask if this item is dirty.

Returns: true if the item contains changes that have not yet been written back into the file. Removing or adding an item counts as such a change

UNKNOWN: If you change an item, it is marked as "dirty".

isRemoved

public boolean isRemoved()
If you remove an item, it is only marked for removal for the file. On the next KFileMetaInfo.applyChanges() , it will be removed from the file. With this method, you can ask if the item is marked for removal.

Returns: true if the item was removed, false if not

UNKNOWN: If you remove an item, it is only marked for removal for the file.

isValid

public boolean isValid()
Return 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: Return true if the item is valid, i.

key

public String key()
Returns the key of the item.

Returns: the key of this item

UNKNOWN: Returns the key of the item.

prefix

public String prefix()
This method returns a translated prefix to be displayed before the value. Think e.g. of the $ in $30

Returns: the prefix

UNKNOWN: This method returns a translated prefix to be displayed before the value.

ref

protected void ref()

setAdded

protected void setAdded()

setRemoved

protected void setRemoved()

setValue

public boolean setValue(QVariant value)
Changes the value of the item.

Parameters: value the new value

Returns: true if successful, false otherwise

UNKNOWN: Changes the value of the item.

string

public String string(boolean mangle)
Returns a string containing the value, if possible. If not, null is returned.

Parameters: mangle if true, the string will already contain prefix and suffix

Returns: the value string, or null if not possible

UNKNOWN: Returns a string containing the value, if possible.

string

public String string()

suffix

public String suffix()
This method returns a translated suffix to be displayed after the value. Think of the kbps in 128kbps

Returns: the suffix

UNKNOWN: This method returns a translated suffix to be displayed after the value.

translatedKey

public String translatedKey()
Returns a translation of the key for displaying to the user. If the plugin provides translation to the key, it's also in the user's language

Returns: the translated key

UNKNOWN: Returns a translation of the key for displaying to the user.

type

public int type()
Return the type of the item.

Returns: the type of the item

UNKNOWN: Return the type of the item.

value

public QVariant value()
Returns the value of the item.

Returns: the value of the item.

UNKNOWN: Returns the value of the item.