org.kde.koala
Class KFileMetaInfoItem

java.lang.Object
  extended by org.kde.koala.KFileMetaInfoItem
All Implemented Interfaces:
org.kde.qt.QtSupport

public class KFileMetaInfoItem
extends java.lang.Object
implements org.kde.qt.QtSupport


Constructor Summary
  KFileMetaInfoItem()
          Default constructor.
protected KFileMetaInfoItem(java.lang.Class dummy)
           
  KFileMetaInfoItem(KFileMetaInfoItem item)
          Copy constructor
 
Method Summary
 int attributes()
          Returns the attributes for this item.
protected  void deref()
           
 void dispose()
          Delete the wrapped C++ instance ahead of finalize()
protected  void finalize()
          Deletes the wrapped C++ instance
 int hint()
          Returns the hint for this item.
 boolean isDisposed()
          Has the wrapped C++ instance been deleted?
 boolean isEditable()
          You can query if the application can edit the item and write it back to the file with this method.
 boolean isModified()
          If you change an item, it is marked as "dirty".
 boolean isRemoved()
          If you remove an item, it is only marked for removal for the file.
 boolean isValid()
          Return true if the item is valid, i.e.
 java.lang.String key()
          Returns the key of the item.
 java.lang.String prefix()
          This method returns a translated prefix to be displayed before the value.
protected  void ref()
           
protected  void setAdded()
           
protected  void setRemoved()
           
 boolean setValue(org.kde.qt.QVariant value)
          Changes the value of the item.
 java.lang.String string()
           
 java.lang.String string(boolean mangle)
          Returns a string containing the value, if possible.
 java.lang.String suffix()
          This method returns a translated suffix to be displayed after the value.
 java.lang.String translatedKey()
          Returns a translation of the key for displaying to the user.
 int type()
          Return the type of the item.
 org.kde.qt.QVariant value()
          Returns the value of the item.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KFileMetaInfoItem

protected KFileMetaInfoItem(java.lang.Class dummy)

KFileMetaInfoItem

public KFileMetaInfoItem(KFileMetaInfoItem item)
Copy constructor


KFileMetaInfoItem

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

Method Detail

key

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

Returns:
the key of this item

translatedKey

public java.lang.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

value

public org.kde.qt.QVariant value()
Returns the value of the item.

Returns:
the value of the item.

string

public java.lang.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

string

public java.lang.String string()

setValue

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

Parameters:
value - the new value
Returns:
true if successful, false otherwise

type

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

Returns:
the type of the item

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

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

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

prefix

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

Returns:
the prefix

suffix

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

Returns:
the suffix

hint

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

Returns:
the hint

attributes

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

Returns:
the attributes

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

setAdded

protected void setAdded()

setRemoved

protected void setRemoved()

ref

protected void ref()

deref

protected void deref()

finalize

protected void finalize()
                 throws java.lang.InternalError
Deletes the wrapped C++ instance

Overrides:
finalize in class java.lang.Object
Throws:
java.lang.InternalError

dispose

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


isDisposed

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