class KFileMetaInfoItem

This is one item of the meta information about a file (see KFileMetaInfo). More...

Definition#include <kfilemetainfo.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods

Public Members

Protected Methods

Protected Members


Detailed Description

This is one item of the meta information about a file (see KFileMetaInfo). The groups, hints and units are not yet supported, but already added to the interface so that adding support doesn't break compatibility later.

typedef KFileMimeTypeInfo::Hint Hint

Hint

typedef KFileMimeTypeInfo::Unit Unit

Unit

typedef KFileMimeTypeInfo::Attributes Attributes

Attributes

 KFileMetaInfoItem ( const KFileMimeTypeInfo::ItemInfo* mti, const QString& key, const QVariant& value)

KFileMetaInfoItem

You usually don't need to use this constructor yourself. Let KFileMetaInfo do it for you.

 KFileMetaInfoItem ( const KFileMetaInfoItem & item )

KFileMetaInfoItem

Copy onstructor

const KFileMetaInfoItem&  operator= (const KFileMetaInfoItem & item )

operator=

The assignment operator, so you can do:


    KFileMetaInfoItem item = info.item("Title");

This will create a shared copy of the object. The actual data is automatically deleted if all copies go out of scope

 KFileMetaInfoItem ()

KFileMetaInfoItem

Default constructor. This creates an "invalid" item

 ~KFileMetaInfoItem ()

~KFileMetaInfoItem

QString  key ()

key

[const]

Returns: the key of this item

QString  translatedKey ()

translatedKey

[const]

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

const QVariant&  value ()

value

[const]

Returns: the value of the item.

QString  string ( bool mangle = true )

string

[const]

Returns: a string containing the value, if possible. If not, QString::null is returned. if mangle is true, the string will already contain prefix and suffix

bool  setValue ( const QVariant& value )

setValue

changes the value of the item

QVariant::Type  type ()

type

[const]

convenience method. It does the same as value()->type()

bool  isEditable ()

isEditable

[const]

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

bool  isRemoved ()

isRemoved

[const]

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

bool  isModified ()

isModified

[const]

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

QString  prefix ()

prefix

[const]

Returns: a translated prefix to be displayed before the value. Think e.g. of the $ in $30

QString  suffix ()

suffix

[const]

Returns: a translated suffix to be displayed after the value. Think of the kbps in 128kbps

uint  hint ()

hint

[const]

Returns: the hint for this item. See Hint

uint  unit ()

unit

[const]

Returns: the unit for this item. See Unit

uint  attributes ()

attributes

[const]

bool  isValid ()

isValid

[const]

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 KFileMetaInfo::item() didn't find your requested item)

friend QDataStream&  operator >> (QDataStream& s, KFileMetaInfoItem& )

operator >>

friend QDataStream&  operator >> (QDataStream& s, KFileMetaInfoGroup& )

operator >>

friend QDataStream&  operator << (QDataStream& s, const KFileMetaInfoItem& )

operator <<

friend class KFileMetaInfoGroup

KFileMetaInfoGroup

void  setAdded ()

setAdded

[protected]

void  ref ()

ref

[protected]

void  deref ()

deref

[protected]

Data * d

d

[protected]


Generated by: dfaure on faure on Tue Apr 16 08:49:48 2002, using kdoc 2.0a53.