\section{KFile\-Meta\-Info\-Item Class Reference}
\label{classKFileMetaInfoItem}\index{KFileMetaInfoItem@{KFileMetaInfoItem}}
This is one item of the meta information about a file (see {\bf KFile\-Meta\-Info}{\rm (p.\,\pageref{classKFileMetaInfo})}). A meta information item about a file.  


{\tt \#include $<$kfilemetainfo.h$>$}

\subsection*{Public Types}
\begin{CompactItemize}
\item 
typedef {\bf KFile\-Mime\-Type\-Info::Unit} {\bf Unit}\label{classKFileMetaInfoItem_w0}

\item 
typedef {\bf KFile\-Mime\-Type\-Info::Attributes} {\bf Attributes}\label{classKFileMetaInfoItem_w1}

\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KFile\-Meta\-Info\-Item} (const {\bf KFile\-Mime\-Type\-Info::Item\-Info} $\ast$mti, const {\bf QString} \&key, const {\bf QVariant} \&value)\label{classKFileMetaInfoItem_a0}

\item 
{\bf KFile\-Meta\-Info\-Item} (const {\bf KFile\-Meta\-Info\-Item} \&item)
\item 
const {\bf KFile\-Meta\-Info\-Item} \& {\bf operator=} (const {\bf KFile\-Meta\-Info\-Item} \&item)
\item 
{\bf KFile\-Meta\-Info\-Item} ()
\item 
{\bf QString} {\bf key} () const 
\item 
{\bf QString} {\bf translated\-Key} () const 
\item 
const {\bf QVariant} \& {\bf value} () const 
\item 
{\bf QString} {\bf string} (bool mangle=true) const 
\item 
bool {\bf set\-Value} (const {\bf QVariant} \&value)
\item 
QVariant::Type {\bf type} () const 
\item 
bool {\bf is\-Editable} () const 
\item 
bool {\bf is\-Removed} () const 
\item 
bool {\bf is\-Modified} () const 
\item 
{\bf QString} {\bf prefix} () const 
\item 
{\bf QString} {\bf suffix} () const 
\item 
uint {\bf hint} () const 
\item 
uint {\bf unit} () const 
\item 
uint {\bf attributes} () const 
\item 
bool {\bf is\-Valid} () const 
\end{CompactItemize}
\subsection*{Public Attributes}
\begin{CompactItemize}
\item 
typedef {\bf KFile\-Mime\-Type\-Info::Hint} {\bf Hint}\label{classKFileMetaInfoItem_o0}

\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
void {\bf set\-Added} ()\label{classKFileMetaInfoItem_b0}

\item 
void {\bf set\-Removed} ()\label{classKFileMetaInfoItem_b1}

\item 
void {\bf ref} ()\label{classKFileMetaInfoItem_b2}

\item 
void {\bf deref} ()\label{classKFileMetaInfoItem_b3}

\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
Data $\ast$ {\bf d}\label{classKFileMetaInfoItem_p0}

\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf KFile\-Meta\-Info\-Group}\label{classKFileMetaInfoItem_n0}

\item 
KIO\_\-EXPORT friend {\bf QData\-Stream} \& {\bf operator$>$$>$} ({\bf QData\-Stream} \&s, {\bf KFile\-Meta\-Info\-Item} \&)\label{classKFileMetaInfoItem_n1}

\item 
KIO\_\-EXPORT friend {\bf QData\-Stream} \& {\bf operator$>$$>$} ({\bf QData\-Stream} \&s, {\bf KFile\-Meta\-Info\-Group} \&)\label{classKFileMetaInfoItem_n2}

\item 
KIO\_\-EXPORT friend {\bf QData\-Stream} \& {\bf operator$<$$<$} ({\bf QData\-Stream} \&s, const {\bf KFile\-Meta\-Info\-Item} \&)\label{classKFileMetaInfoItem_n3}

\end{CompactItemize}


\subsection{Detailed Description}
This is one item of the meta information about a file (see {\bf KFile\-Meta\-Info}{\rm (p.\,\pageref{classKFileMetaInfo})}). A meta information item about a file. 



Definition at line 488 of file kfilemetainfo.h.

\subsection{Constructor \& Destructor Documentation}
\index{KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}!KFileMetaInfoItem@{KFileMetaInfoItem}}
\index{KFileMetaInfoItem@{KFileMetaInfoItem}!KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KFile\-Meta\-Info\-Item::KFile\-Meta\-Info\-Item (const {\bf KFile\-Meta\-Info\-Item} \& {\em item})}\label{classKFileMetaInfoItem_a1}


Copy constructor. 



Definition at line 102 of file kfilemetainfo.cpp.\index{KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}!KFileMetaInfoItem@{KFileMetaInfoItem}}
\index{KFileMetaInfoItem@{KFileMetaInfoItem}!KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KFile\-Meta\-Info\-Item::KFile\-Meta\-Info\-Item ()}\label{classKFileMetaInfoItem_a3}


Default constructor. 

This creates an \char`\"{}invalid\char`\"{} item 

Definition at line 109 of file kfilemetainfo.cpp.

\subsection{Member Function Documentation}
\index{KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}!operator=@{operator=}}
\index{operator=@{operator=}!KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf KFile\-Meta\-Info\-Item} \& KFile\-Meta\-Info\-Item::operator= (const {\bf KFile\-Meta\-Info\-Item} \& {\em item})}\label{classKFileMetaInfoItem_a2}


The assignment operator, so you can do: 

\footnotesize\begin{verbatim}    KFileMetaInfoItem item = info.item("Title");
\end{verbatim}
\normalsize
. 

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 120 of file kfilemetainfo.cpp.\index{KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}!key@{key}}
\index{key@{key}!KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KFile\-Meta\-Info\-Item::key () const}\label{classKFileMetaInfoItem_a5}


Returns the key of the item. 

\begin{Desc}
\item[Returns:]the key of this item \end{Desc}


Definition at line 165 of file kfilemetainfo.cpp.

Referenced by set\-Value().\index{KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}!translatedKey@{translatedKey}}
\index{translatedKey@{translatedKey}!KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KFile\-Meta\-Info\-Item::translated\-Key () const}\label{classKFileMetaInfoItem_a6}


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 \begin{Desc}
\item[Returns:]the translated key \end{Desc}


Definition at line 170 of file kfilemetainfo.cpp.

Referenced by KFile\-Item::get\-Tool\-Tip\-Text().\index{KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}!value@{value}}
\index{value@{value}!KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf QVariant} \& KFile\-Meta\-Info\-Item::value () const}\label{classKFileMetaInfoItem_a7}


Returns the value of the item. 

\begin{Desc}
\item[Returns:]the value of the item. \end{Desc}


Definition at line 182 of file kfilemetainfo.cpp.

Referenced by KFile\-Meta\-Info\-Group::value().\index{KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}!string@{string}}
\index{string@{string}!KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KFile\-Meta\-Info\-Item::string (bool {\em mangle} = {\tt true}) const}\label{classKFileMetaInfoItem_a8}


Returns a string containing the value, if possible. 

If not, QString::null is returned. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mangle}]if true, the string will already contain prefix and suffix \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the value string, or QString::null if not possible \end{Desc}


Definition at line 187 of file kfilemetainfo.cpp.

Referenced by KFile\-Item::get\-Tool\-Tip\-Text().\index{KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}!setValue@{setValue}}
\index{setValue@{setValue}!KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KFile\-Meta\-Info\-Item::set\-Value (const {\bf QVariant} \& {\em value})}\label{classKFileMetaInfoItem_a9}


Changes the value of the item. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em value}]the new value \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise \end{Desc}


Definition at line 134 of file kfilemetainfo.cpp.

References QVariant::can\-Cast(), QVariant::cast(), kd\-Debug(), and key().\index{KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}!type@{type}}
\index{type@{type}!KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}QVariant::Type KFile\-Meta\-Info\-Item::type () const}\label{classKFileMetaInfoItem_a10}


Return the type of the item. 

\begin{Desc}
\item[Returns:]the type of the item \end{Desc}


Definition at line 192 of file kfilemetainfo.cpp.\index{KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}!isEditable@{isEditable}}
\index{isEditable@{isEditable}!KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KFile\-Meta\-Info\-Item::is\-Editable () const}\label{classKFileMetaInfoItem_a11}


You can query if the application can edit the item and write it back to the file with this method. 

\begin{Desc}
\item[Note:]This doesn't ensure that you have write access to the file and that enough space is available.\end{Desc}
\begin{Desc}
\item[Returns:]true if the item's value can be changed, false if not \end{Desc}


Definition at line 227 of file kfilemetainfo.cpp.\index{KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}!isRemoved@{isRemoved}}
\index{isRemoved@{isRemoved}!KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KFile\-Meta\-Info\-Item::is\-Removed () const}\label{classKFileMetaInfoItem_a12}


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

On the next {\bf KFile\-Meta\-Info::apply\-Changes()}{\rm (p.\,\pageref{classKFileMetaInfo_a20})} , it will be removed from the file. With this method, you can ask if the item is marked for removal.

\begin{Desc}
\item[Returns:]true if the item was removed, false if not \end{Desc}


Definition at line 160 of file kfilemetainfo.cpp.\index{KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}!isModified@{isModified}}
\index{isModified@{isModified}!KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KFile\-Meta\-Info\-Item::is\-Modified () const}\label{classKFileMetaInfoItem_a13}


If you change an item, it is marked as \char`\"{}dirty\char`\"{}. 

On the next {\bf KFile\-Meta\-Info::apply\-Changes()}{\rm (p.\,\pageref{classKFileMetaInfo_a20})} , the change will be written to the file. With this method, you can ask if this item is dirty.

\begin{Desc}
\item[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 \end{Desc}


Definition at line 202 of file kfilemetainfo.cpp.\index{KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}!prefix@{prefix}}
\index{prefix@{prefix}!KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KFile\-Meta\-Info\-Item::prefix () const}\label{classKFileMetaInfoItem_a14}


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

Think e.g. of the \$ in \$30

\begin{Desc}
\item[Returns:]the prefix \end{Desc}


Definition at line 207 of file kfilemetainfo.cpp.\index{KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}!suffix@{suffix}}
\index{suffix@{suffix}!KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KFile\-Meta\-Info\-Item::suffix () const}\label{classKFileMetaInfoItem_a15}


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

Think of the kbps in 128kbps

\begin{Desc}
\item[Returns:]the suffix \end{Desc}


Definition at line 212 of file kfilemetainfo.cpp.\index{KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}!hint@{hint}}
\index{hint@{hint}!KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint KFile\-Meta\-Info\-Item::hint () const}\label{classKFileMetaInfoItem_a16}


Returns the hint for this item. 

See {\bf KFile\-Mime\-Type\-Info::Hint}{\rm (p.\,\pageref{classKFileMimeTypeInfo_w34})}. \begin{Desc}
\item[Returns:]the hint \end{Desc}


Definition at line 217 of file kfilemetainfo.cpp.\index{KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}!unit@{unit}}
\index{unit@{unit}!KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint KFile\-Meta\-Info\-Item::unit () const}\label{classKFileMetaInfoItem_a17}


Returns the unit for this item. 

See {\bf KFile\-Mime\-Type\-Info::Unit}{\rm (p.\,\pageref{classKFileMimeTypeInfo_w35})}. \begin{Desc}
\item[Returns:]the unit \end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 197 of file kfilemetainfo.cpp.\index{KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}!attributes@{attributes}}
\index{attributes@{attributes}!KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint KFile\-Meta\-Info\-Item::attributes () const}\label{classKFileMetaInfoItem_a18}


Returns the attributes for this item. 

See {\bf KFile\-Mime\-Type\-Info::Attributes}{\rm (p.\,\pageref{classKFileMimeTypeInfo_w33})}. \begin{Desc}
\item[Returns:]the attributes \end{Desc}


Definition at line 222 of file kfilemetainfo.cpp.

Referenced by KFile\-Item::get\-Tool\-Tip\-Text().\index{KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}!isValid@{isValid}}
\index{isValid@{isValid}!KFileMetaInfoItem@{KFile\-Meta\-Info\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KFile\-Meta\-Info\-Item::is\-Valid () const}\label{classKFileMetaInfoItem_a19}


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 {\bf KFile\-Meta\-Info\-Group::item()}{\rm (p.\,\pageref{classKFileMetaInfoGroup_a9})} didn't find your requested item). \begin{Desc}
\item[Returns:]true if valid, false if invalid \end{Desc}


Definition at line 232 of file kfilemetainfo.cpp.

Referenced by KFile\-Item::get\-Tool\-Tip\-Text(), KFile\-Meta\-Info::item(), and KFile\-Meta\-Info::save\-Item().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
kfilemetainfo.h\item 
kfilemetainfo.cpp\end{CompactItemize}
