\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})}).  


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

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

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

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

\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)
\begin{CompactList}\small\item\em Copy onstructor. \item\end{CompactList}\item 
const  {\bf KFile\-Meta\-Info\-Item} \& {\bf operator=} (const  {\bf KFile\-Meta\-Info\-Item} \&item)
\begin{CompactList}\small\item\em The assignment operator, so you can do:. \item\end{CompactList}\item 
{\bf KFile\-Meta\-Info\-Item} ()
\begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\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)
\begin{CompactList}\small\item\em changes the value of the item \item\end{CompactList}\item 
QVariant::Type {\bf type} () const 
\begin{CompactList}\small\item\em convenience method. \item\end{CompactList}\item 
bool {\bf is\-Editable} () const 
\begin{CompactList}\small\item\em You can query if the application can edit the item and write it back to the file with this method. \item\end{CompactList}\item 
bool {\bf is\-Removed} () const 
\begin{CompactList}\small\item\em If you remove an item, it is only marked for removal for the file. \item\end{CompactList}\item 
bool {\bf is\-Modified} () const 
\begin{CompactList}\small\item\em If you change an item, it is marked as \char`\"{}dirty\char`\"{}. \item\end{CompactList}\item 
{\bf QString} {\bf prefix} () const 
\begin{CompactList}\small\item\em This method returns a translated prefix to be displayed before the value. \item\end{CompactList}\item 
{\bf QString} {\bf suffix} () const 
\begin{CompactList}\small\item\em This method returns a translated suffix to be displayed after the value. \item\end{CompactList}\item 
uint {\bf hint} () const 
\item 
uint {\bf unit} () const 
\item 
uint {\bf attributes} () const 
\item 
bool {\bf is\-Valid} () const 
\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 
{\bf QData\-Stream} \& {\bf operator$>$$>$} ({\bf QData\-Stream} \&s, {\bf KFile\-Meta\-Info\-Item} \&)\label{classKFileMetaInfoItem_n1}

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

\item 
{\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})}). 



Definition at line 499 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 onstructor. 



Definition at line 100 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 107 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:. 

\small\begin{alltt}
    KFileMetaInfoItem item = info.item("Title");
 \end{alltt}\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 118 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}


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


Definition at line 163 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}


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


Definition at line 168 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}


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


Definition at line 180 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} = true) const}\label{classKFileMetaInfoItem_a8}


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


Definition at line 185 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 



Definition at line 132 of file kfilemetainfo.cpp.

References QVariant::can\-Cast(), 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}


convenience method. 

It does the same as {\bf value()}{\rm (p.\,\pageref{classKFileMetaInfoItem_a7})}-$>${\bf type()}{\rm (p.\,\pageref{classKFileMetaInfoItem_a10})} \begin{Desc}
\item[Returns:]the type of the item \end{Desc}


Definition at line 190 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. 

Note that this doesn't ensure that you have write access to the file and that enough space is available.

\begin{Desc}
\item[Returns:]true if the item's value can be changed, false if not \end{Desc}


Definition at line 220 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_a19})}() , 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 158 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_a19})}() , 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 195 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 200 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 $\ast$

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


Definition at line 205 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}


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


Definition at line 210 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}


\begin{Desc}
\item[Returns:]the unit for this item. See {\bf KFile\-Mime\-Type\-Info::Unit}{\rm (p.\,\pageref{classKFileMimeTypeInfo_w33})} \end{Desc}
\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}


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


Definition at line 215 of file kfilemetainfo.cpp.\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}


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


Definition at line 225 of file kfilemetainfo.cpp.

Referenced by KFile\-Item::get\-Tool\-Tip\-Text().

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