.TH "KFileMetaInfoItem" 3 "28 Jan 2004" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KFileMetaInfoItem \- This is one item of the meta information about a file (see \fBKFileMetaInfo\fP).  

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

.in +1c
.ti -1c
.RI "typedef \fBKFileMimeTypeInfo::Hint\fP \fBHint\fP"
.br
.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
.RI "\fICopy onstructor. \fP"
.ti -1c
.RI "const  \fBKFileMetaInfoItem\fP & \fBoperator=\fP (const  \fBKFileMetaInfoItem\fP &item)"
.br
.RI "\fIThe assignment operator, so you can do:. \fP"
.ti -1c
.RI "\fBKFileMetaInfoItem\fP ()"
.br
.RI "\fIDefault constructor. \fP"
.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
.RI "\fIchanges the value of the item \fP"
.ti -1c
.RI "QVariant::Type \fBtype\fP () const "
.br
.RI "\fIconvenience method. \fP"
.ti -1c
.RI "bool \fBisEditable\fP () const "
.br
.RI "\fIYou can query if the application can edit the item and write it back to the file with this method. \fP"
.ti -1c
.RI "bool \fBisRemoved\fP () const "
.br
.RI "\fIIf you remove an item, it is only marked for removal for the file. \fP"
.ti -1c
.RI "bool \fBisModified\fP () const "
.br
.RI "\fIIf you change an item, it is marked as 'dirty'. \fP"
.ti -1c
.RI "\fBQString\fP \fBprefix\fP () const "
.br
.RI "\fIThis method returns a translated prefix to be displayed before the value. \fP"
.ti -1c
.RI "\fBQString\fP \fBsuffix\fP () const "
.br
.RI "\fIThis method returns a translated suffix to be displayed after the value. \fP"
.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 "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 "\fBQDataStream\fP & \fBoperator>>\fP (\fBQDataStream\fP &s, \fBKFileMetaInfoItem\fP &)"
.br
.ti -1c
.RI "\fBQDataStream\fP & \fBoperator>>\fP (\fBQDataStream\fP &s, \fBKFileMetaInfoGroup\fP &)"
.br
.ti -1c
.RI "\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). Definition at line 499 of file kfilemetainfo.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KFileMetaInfoItem::KFileMetaInfoItem (const \fBKFileMetaInfoItem\fP & item)"
.PP
Copy onstructor. Definition at line 100 of file kfilemetainfo.cpp.
.SS "KFileMetaInfoItem::KFileMetaInfoItem ()"
.PP
Default constructor. This creates an 'invalid' item Definition at line 107 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');
 
.PP
.PP
This will create a shared copy of the object. The actual data is automatically deleted if all copies go out of scope Definition at line 118 of file kfilemetainfo.cpp.
.SS "\fBQString\fP KFileMetaInfoItem::key () const"
.PP
\fBReturns:\fP
.RS 4
the key of this item 
.RE
.PP
Definition at line 163 of file kfilemetainfo.cpp.
.PP
Referenced by setValue().
.SS "\fBQString\fP KFileMetaInfoItem::translatedKey () const"
.PP
\fBReturns:\fP
.RS 4
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 
.RE
.PP
Definition at line 168 of file kfilemetainfo.cpp.
.PP
Referenced by KFileItem::getToolTipText().
.SS "const  \fBQVariant\fP & KFileMetaInfoItem::value () const"
.PP
\fBReturns:\fP
.RS 4
the value of the item. 
.RE
.PP
Definition at line 180 of file kfilemetainfo.cpp.
.PP
Referenced by KFileMetaInfoGroup::value().
.SS "\fBQString\fP KFileMetaInfoItem::string (bool mangle = true) const"
.PP
\fBReturns:\fP
.RS 4
a string containing the value, if possible. If not, QString::null is returned. if \fCmangle\fP is true, the string will already contain prefix and suffix 
.RE
.PP
Definition at line 185 of file kfilemetainfo.cpp.
.PP
Referenced by KFileItem::getToolTipText().
.SS "bool KFileMetaInfoItem::setValue (const \fBQVariant\fP & value)"
.PP
changes the value of the item Definition at line 132 of file kfilemetainfo.cpp.
.PP
References QVariant::canCast(), and key().
.SS "QVariant::Type KFileMetaInfoItem::type () const"
.PP
convenience method. It does the same as \fBvalue()\fP->\fBtype()\fP 
.PP
\fBReturns:\fP
.RS 4
the type of the item 
.RE
.PP
Definition at line 190 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. Note that this doesn't ensure that you have write access to the file and that enough space is available.
.PP
\fBReturns:\fP
.RS 4
true if the item's value can be changed, false if not 
.RE
.PP
Definition at line 220 of file kfilemetainfo.cpp.
.SS "bool KFileMetaInfoItem::isRemoved () const"
.PP
If you remove an item, it is only marked for removal for the file. 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
Definition at line 158 of file kfilemetainfo.cpp.
.SS "bool KFileMetaInfoItem::isModified () const"
.PP
If you change an item, it is marked as 'dirty'. 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
Definition at line 195 of file kfilemetainfo.cpp.
.SS "\fBQString\fP KFileMetaInfoItem::prefix () const"
.PP
This method returns a translated prefix to be displayed before the value. Think e.g. of the $ in $30
.PP
\fBReturns:\fP
.RS 4
the prefix 
.RE
.PP
Definition at line 200 of file kfilemetainfo.cpp.
.SS "\fBQString\fP KFileMetaInfoItem::suffix () const"
.PP
This method returns a translated suffix to be displayed after the value. Think of the kbps in 128kbps *
.PP
\fBReturns:\fP
.RS 4
the suffix 
.RE
.PP
Definition at line 205 of file kfilemetainfo.cpp.
.SS "uint KFileMetaInfoItem::hint () const"
.PP
\fBReturns:\fP
.RS 4
the hint for this item. See \fBKFileMimeTypeInfo::Hint\fP 
.RE
.PP
Definition at line 210 of file kfilemetainfo.cpp.
.SS "uint KFileMetaInfoItem::unit () const"
.PP
\fBReturns:\fP
.RS 4
the unit for this item. See \fBKFileMimeTypeInfo::Unit\fP 
.RE
.PP

.SS "uint KFileMetaInfoItem::attributes () const"
.PP
\fBReturns:\fP
.RS 4
the atttributes for this item. See \fBKFileMimeTypeInfo::Attributes\fP 
.RE
.PP
Definition at line 215 of file kfilemetainfo.cpp.
.SS "bool KFileMetaInfoItem::isValid () const"
.PP
\fBReturns:\fP
.RS 4
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 \fBKFileMetaInfoGroup::item\fP() didn't find your requested item) 
.RE
.PP
Definition at line 225 of file kfilemetainfo.cpp.
.PP
Referenced by KFileItem::getToolTipText().

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