.TH "KFileMetaInfoItem" kde3 "11 Jun 2005" "Version Version 3.4.1" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KFileMetaInfoItem \- This is one item of the meta information about a file (see \fBKFileMetaInfo\fP). A meta information item about a file.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kfilemetainfo.h>\fP
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "typedef \fBKFileMimeTypeInfo::Unit\fP \fBUnit\fP"
.br
.ti -1c
.RI "typedef \fBKFileMimeTypeInfo::Attributes\fP \fBAttributes\fP"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKFileMetaInfoItem\fP (const \fBKFileMimeTypeInfo::ItemInfo\fP *mti, const \fBQString\fP &key, const \fBQVariant\fP &value)"
.br
.ti -1c
.RI "\fBKFileMetaInfoItem\fP (const \fBKFileMetaInfoItem\fP &item)"
.br
.ti -1c
.RI "const \fBKFileMetaInfoItem\fP & \fBoperator=\fP (const \fBKFileMetaInfoItem\fP &item)"
.br
.ti -1c
.RI "\fBKFileMetaInfoItem\fP ()"
.br
.ti -1c
.RI "\fBQString\fP \fBkey\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBtranslatedKey\fP () const "
.br
.ti -1c
.RI "const \fBQVariant\fP & \fBvalue\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBstring\fP (bool mangle=true) const "
.br
.ti -1c
.RI "bool \fBsetValue\fP (const \fBQVariant\fP &value)"
.br
.ti -1c
.RI "QVariant::Type \fBtype\fP () const "
.br
.ti -1c
.RI "bool \fBisEditable\fP () const "
.br
.ti -1c
.RI "bool \fBisRemoved\fP () const "
.br
.ti -1c
.RI "bool \fBisModified\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBprefix\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBsuffix\fP () const "
.br
.ti -1c
.RI "uint \fBhint\fP () const "
.br
.ti -1c
.RI "uint \fBunit\fP () const "
.br
.ti -1c
.RI "uint \fBattributes\fP () const "
.br
.ti -1c
.RI "bool \fBisValid\fP () const "
.br
.in -1c
.SS "Public Attributes"

.in +1c
.ti -1c
.RI "typedef \fBKFileMimeTypeInfo::Hint\fP \fBHint\fP"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "void \fBsetAdded\fP ()"
.br
.ti -1c
.RI "void \fBsetRemoved\fP ()"
.br
.ti -1c
.RI "void \fBref\fP ()"
.br
.ti -1c
.RI "void \fBderef\fP ()"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "Data * \fBd\fP"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBKFileMetaInfoGroup\fP"
.br
.ti -1c
.RI "KIO_EXPORT friend \fBQDataStream\fP & \fBoperator>>\fP (\fBQDataStream\fP &s, \fBKFileMetaInfoItem\fP &)"
.br
.ti -1c
.RI "KIO_EXPORT friend \fBQDataStream\fP & \fBoperator>>\fP (\fBQDataStream\fP &s, \fBKFileMetaInfoGroup\fP &)"
.br
.ti -1c
.RI "KIO_EXPORT friend \fBQDataStream\fP & \fBoperator<<\fP (\fBQDataStream\fP &s, const \fBKFileMetaInfoItem\fP &)"
.br
.in -1c
.SH "Detailed Description"
.PP 
This is one item of the meta information about a file (see \fBKFileMetaInfo\fP). A meta information item about a file. 
.PP
Definition at line 488 of file kfilemetainfo.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KFileMetaInfoItem::KFileMetaInfoItem (const \fBKFileMetaInfoItem\fP & item)"
.PP
Copy constructor. 
.PP
Definition at line 102 of file kfilemetainfo.cpp.
.SS "KFileMetaInfoItem::KFileMetaInfoItem ()"
.PP
Default constructor. 
.PP
This creates an 'invalid' item 
.PP
Definition at line 109 of file kfilemetainfo.cpp.
.SH "Member Function Documentation"
.PP 
.SS "const \fBKFileMetaInfoItem\fP & KFileMetaInfoItem::operator= (const \fBKFileMetaInfoItem\fP & item)"
.PP
The assignment operator, so you can do: 
.PP
.nf
    KFileMetaInfoItem item = info.item('Title');

.fi
.PP
. 
.PP
This will create a shared copy of the object. The actual data is automatically deleted if all copies go out of scope 
.PP
Definition at line 120 of file kfilemetainfo.cpp.
.SS "\fBQString\fP KFileMetaInfoItem::key () const"
.PP
Returns the key of the item. 
.PP
\fBReturns:\fP
.RS 4
the key of this item 
.RE
.PP

.PP
Definition at line 165 of file kfilemetainfo.cpp.
.PP
Referenced by setValue().
.SS "\fBQString\fP KFileMetaInfoItem::translatedKey () const"
.PP
Returns a translation of the key for displaying to the user. 
.PP
If the plugin provides translation to the key, it's also in the user's language 
.PP
\fBReturns:\fP
.RS 4
the translated key 
.RE
.PP

.PP
Definition at line 170 of file kfilemetainfo.cpp.
.PP
Referenced by KFileItem::getToolTipText().
.SS "const \fBQVariant\fP & KFileMetaInfoItem::value () const"
.PP
Returns the value of the item. 
.PP
\fBReturns:\fP
.RS 4
the value of the item. 
.RE
.PP

.PP
Definition at line 182 of file kfilemetainfo.cpp.
.PP
Referenced by KFileMetaInfoGroup::value().
.SS "\fBQString\fP KFileMetaInfoItem::string (bool mangle = \fCtrue\fP) const"
.PP
Returns a string containing the value, if possible. 
.PP
If not, QString::null is returned. 
.PP
\fBParameters:\fP
.RS 4
\fImangle\fP if true, the string will already contain prefix and suffix 
.RE
.PP
\fBReturns:\fP
.RS 4
the value string, or QString::null if not possible 
.RE
.PP

.PP
Definition at line 187 of file kfilemetainfo.cpp.
.PP
Referenced by KFileItem::getToolTipText().
.SS "bool KFileMetaInfoItem::setValue (const \fBQVariant\fP & value)"
.PP
Changes the value of the item. 
.PP
\fBParameters:\fP
.RS 4
\fIvalue\fP the new value 
.RE
.PP
\fBReturns:\fP
.RS 4
true if successful, false otherwise 
.RE
.PP

.PP
Definition at line 134 of file kfilemetainfo.cpp.
.PP
References QVariant::canCast(), QVariant::cast(), kdDebug(), and key().
.SS "QVariant::Type KFileMetaInfoItem::type () const"
.PP
Return the type of the item. 
.PP
\fBReturns:\fP
.RS 4
the type of the item 
.RE
.PP

.PP
Definition at line 192 of file kfilemetainfo.cpp.
.SS "bool KFileMetaInfoItem::isEditable () const"
.PP
You can query if the application can edit the item and write it back to the file with this method. 
.PP
\fBNote:\fP
.RS 4
This doesn't ensure that you have write access to the file and that enough space is available.
.RE
.PP
\fBReturns:\fP
.RS 4
true if the item's value can be changed, false if not 
.RE
.PP

.PP
Definition at line 227 of file kfilemetainfo.cpp.
.SS "bool KFileMetaInfoItem::isRemoved () const"
.PP
If you remove an item, it is only marked for removal for the file. 
.PP
On the next \fBKFileMetaInfo::applyChanges()\fP , it will be removed from the file. With this method, you can ask if the item is marked for removal.
.PP
\fBReturns:\fP
.RS 4
true if the item was removed, false if not 
.RE
.PP

.PP
Definition at line 160 of file kfilemetainfo.cpp.
.SS "bool KFileMetaInfoItem::isModified () const"
.PP
If you change an item, it is marked as 'dirty'. 
.PP
On the next \fBKFileMetaInfo::applyChanges()\fP , the change will be written to the file. With this method, you can ask if this item is dirty.
.PP
\fBReturns:\fP
.RS 4
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 
.RE
.PP

.PP
Definition at line 202 of file kfilemetainfo.cpp.
.SS "\fBQString\fP KFileMetaInfoItem::prefix () const"
.PP
This method returns a translated prefix to be displayed before the value. 
.PP
Think e.g. of the $ in $30
.PP
\fBReturns:\fP
.RS 4
the prefix 
.RE
.PP

.PP
Definition at line 207 of file kfilemetainfo.cpp.
.SS "\fBQString\fP KFileMetaInfoItem::suffix () const"
.PP
This method returns a translated suffix to be displayed after the value. 
.PP
Think of the kbps in 128kbps
.PP
\fBReturns:\fP
.RS 4
the suffix 
.RE
.PP

.PP
Definition at line 212 of file kfilemetainfo.cpp.
.SS "uint KFileMetaInfoItem::hint () const"
.PP
Returns the hint for this item. 
.PP
See \fBKFileMimeTypeInfo::Hint\fP. 
.PP
\fBReturns:\fP
.RS 4
the hint 
.RE
.PP

.PP
Definition at line 217 of file kfilemetainfo.cpp.
.SS "uint KFileMetaInfoItem::unit () const"
.PP
Returns the unit for this item. 
.PP
See \fBKFileMimeTypeInfo::Unit\fP. 
.PP
\fBReturns:\fP
.RS 4
the unit 
.RE
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 197 of file kfilemetainfo.cpp.
.SS "uint KFileMetaInfoItem::attributes () const"
.PP
Returns the attributes for this item. 
.PP
See \fBKFileMimeTypeInfo::Attributes\fP. 
.PP
\fBReturns:\fP
.RS 4
the attributes 
.RE
.PP

.PP
Definition at line 222 of file kfilemetainfo.cpp.
.PP
Referenced by KFileItem::getToolTipText().
.SS "bool KFileMetaInfoItem::isValid () const"
.PP
Return true if the item is valid, i.e. 
.PP
if it contains data, false if it's invalid (created with the default constructor and not been assigned anything), or if \fBKFileMetaInfoGroup::item()\fP didn't find your requested item). 
.PP
\fBReturns:\fP
.RS 4
true if valid, false if invalid 
.RE
.PP

.PP
Definition at line 232 of file kfilemetainfo.cpp.
.PP
Referenced by KFileItem::getToolTipText(), KFileMetaInfo::item(), and KFileMetaInfo::saveItem().

.SH "Author"
.PP 
Generated automatically by Doxygen for kio Library from the source code.
