\section{KFile\-Mime\-Type\-Info Class Reference}
\label{classKFileMimeTypeInfo}\index{KFileMimeTypeInfo@{KFileMimeTypeInfo}}
This class provides information about the capabilities that a {\bf KFile\-Plugin}{\rm (p.\,\pageref{classKFilePlugin})} for a given mimetype has.  


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

Collaboration diagram for KFile\-Mime\-Type\-Info:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=281pt]{classKFileMimeTypeInfo__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
enum {\bf Attributes} \{ \par
{\bf Addable} =  1, 
{\bf Removable} =  2, 
{\bf Modifiable} =  4, 
{\bf Cummulative} =  8, 
\par
{\bf Averaged} =  16, 
{\bf Multi\-Line} =  32, 
{\bf Squeeze\-Text} =  64
 \}
\begin{CompactList}\small\item\em This enum is used to specify some attributes that an item can have, which fit neither in the {\bf Hint}{\rm (p.\,\pageref{classKFileMimeTypeInfo_w32})} nor in the {\bf Unit}{\rm (p.\,\pageref{classKFileMimeTypeInfo_w33})} enum. \item\end{CompactList}\item 
enum {\bf Hint} \{ \par
{\bf No\-Hint} =  0, 
{\bf Name} =  1, 
{\bf Author} =  2, 
{\bf Description} =  3, 
\par
{\bf Width} =  4, 
{\bf Height} =  5, 
{\bf Size} =  6, 
{\bf Bitrate} =  7, 
\par
{\bf Length} =  8, 
{\bf Hidden} =  9, 
{\bf Thumbnail} =  10
 \}
\begin{CompactList}\small\item\em This enum is mainly for items that have a special meaning for some applications. \item\end{CompactList}\item 
enum {\bf Unit} \{ \par
{\bf No\-Unit} =  0, 
{\bf Seconds} =  1, 
{\bf Milli\-Seconds} =  2, 
{\bf Bits\-Per\-Second} =  3, 
\par
{\bf Pixels} =  4, 
{\bf Inches} =  5, 
{\bf Centimeters} =  6, 
{\bf Bytes} =  7, 
\par
{\bf Frames\-Per\-Second} =  8, 
{\bf Dots\-Per\-Inch} =  9, 
{\bf Bits\-Per\-Pixel} =  10, 
{\bf Hertz} =  11, 
\par
{\bf Kilo\-Bytes} =  12
 \}
\begin{CompactList}\small\item\em This enum exists so that you can specify units for items, which you can usually use for integer items, so an application knows how to display it (e.g. \item\end{CompactList}\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf QValidator} $\ast$ {\bf create\-Validator} (const  {\bf QString} \&group, const  {\bf QString} \&key, {\bf QObject} $\ast$parent=0, const  char $\ast$name=0) const 
\begin{CompactList}\small\item\em Creates a validator for this item. \item\end{CompactList}\item 
{\bf QString\-List} {\bf supported\-Groups} () const 
\begin{CompactList}\small\item\em Returns the list of all groups that the plugin for this mimetype supports. \item\end{CompactList}\item 
{\bf QString\-List} {\bf translated\-Groups} () const 
\begin{CompactList}\small\item\em Same as the above function, but returns the strings to display to the user. \item\end{CompactList}\item 
{\bf QString\-List} {\bf preferred\-Groups} () const 
\begin{CompactList}\small\item\em This returns the list of groups in the preferred order that's specified in the .desktop file. \item\end{CompactList}\item 
{\bf QString} {\bf mime\-Type} () const 
\begin{CompactList}\small\item\em Returns the mimetype to which this info belongs. \item\end{CompactList}\item 
const  {\bf Group\-Info} $\ast$ {\bf group\-Info} (const  {\bf QString} \&group) const 
\begin{CompactList}\small\item\em Get the group info for a specific group. \item\end{CompactList}\item 
{\bf QString\-List} {\bf supported\-Keys} () const 
\begin{CompactList}\small\item\em Return a list of all supported keys without looking for a specific group. \item\end{CompactList}\item 
{\bf QString\-List} {\bf preferred\-Keys} () const 
\begin{CompactList}\small\item\em Return a list of all supported keys in preference order. \item\end{CompactList}\item 
{\bf Group\-Info} $\ast$ {\bf add\-Group\-Info} (const  {\bf QString} \&name, const  {\bf QString} \&translated\-Name)\label{classKFileMimeTypeInfo_a10}

\end{CompactItemize}
\subsection*{Public Attributes}
\begin{CompactItemize}
\item 
{\bf QString} {\bf m\_\-translated\-Name}\label{classKFileMimeTypeInfo_o0}

\item 
{\bf QString\-List} {\bf m\_\-supported\-Keys}\label{classKFileMimeTypeInfo_o1}

\item 
uint {\bf m\_\-attr}\label{classKFileMimeTypeInfo_o2}

\item 
{\bf QDict}$<$ {\bf Item\-Info} $>$ {\bf m\_\-item\-Dict}\label{classKFileMimeTypeInfo_o3}

\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
{\bf KFile\-Mime\-Type\-Info} (const  {\bf QString} \&mime\-Type)\label{classKFileMimeTypeInfo_b0}

\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
{\bf QDict}$<$ {\bf Group\-Info} $>$ {\bf m\_\-groups}\label{classKFileMimeTypeInfo_p0}

\item 
{\bf QString} {\bf m\_\-mime\-Type}\label{classKFileMimeTypeInfo_p1}

\item 
{\bf QString\-List} {\bf m\_\-preferred\-Keys}\label{classKFileMimeTypeInfo_p2}

\item 
{\bf QString\-List} {\bf m\_\-preferred\-Groups}\label{classKFileMimeTypeInfo_p3}

\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf KFile\-Plugin}\label{classKFileMimeTypeInfo_n0}

\item 
class {\bf KFile\-Meta\-Info\-Provider}\label{classKFileMimeTypeInfo_n1}

\end{CompactItemize}


\subsection{Detailed Description}
This class provides information about the capabilities that a {\bf KFile\-Plugin}{\rm (p.\,\pageref{classKFilePlugin})} for a given mimetype has. 

It includes a list of metainfo groups and items together with their type, a prefix, suffix and some other information about how to use, display or edit the items. 



Definition at line 47 of file kfilemetainfo.h.

\subsection{Member Enumeration Documentation}
\index{KFileMimeTypeInfo@{KFile\-Mime\-Type\-Info}!Attributes@{Attributes}}
\index{Attributes@{Attributes}!KFileMimeTypeInfo@{KFile\-Mime\-Type\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}enum {\bf KFile\-Mime\-Type\-Info::Attributes}}\label{classKFileMimeTypeInfo_w31}


This enum is used to specify some attributes that an item can have, which fit neither in the {\bf Hint}{\rm (p.\,\pageref{classKFileMimeTypeInfo_w32})} nor in the {\bf Unit}{\rm (p.\,\pageref{classKFileMimeTypeInfo_w33})} enum. 

\begin{itemize}
\item {\tt Addable} The item or group can be added by a user \item {\tt Removable} It can be removed \item {\tt Modifiable} Its value can be edited (no meaning for a group) \item {\tt Cummulative} If an application wants to display information for more than one file, it may add up the values for this item (e.g. play time of an mp3 file) \item {\tt Averaged} Similar to Cummulative, but the average should be calculated instead of the sum \item {\tt Multi\-Line} This attribute says that a string item is likely to be more than one line long, so for editing, a widget capable for multline text should be used \item {\tt Squeeze\-Text} If the text for this item is very long, it should be squeezed to the size of the widget where it's displayed \end{itemize}
\begin{Desc}
\item[Enumeration values: ]\par
\begin{description}
\index{MultiLine@{MultiLine}!KFileMimeTypeInfo@{KFileMimeTypeInfo}}\index{KFileMimeTypeInfo@{KFileMimeTypeInfo}!MultiLine@{MultiLine}}\item[{\em 
Multi\-Line\label{classKFileMimeTypeInfo_w31w5}
}]\begin{Desc}
\item[Since:]3.1 \end{Desc}
\index{SqueezeText@{SqueezeText}!KFileMimeTypeInfo@{KFileMimeTypeInfo}}\index{KFileMimeTypeInfo@{KFileMimeTypeInfo}!SqueezeText@{SqueezeText}}\item[{\em 
Squeeze\-Text\label{classKFileMimeTypeInfo_w31w6}
}]\begin{Desc}
\item[Since:]3.1 \end{Desc}
\end{description}
\end{Desc}



Definition at line 77 of file kfilemetainfo.h.\index{KFileMimeTypeInfo@{KFile\-Mime\-Type\-Info}!Hint@{Hint}}
\index{Hint@{Hint}!KFileMimeTypeInfo@{KFile\-Mime\-Type\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}enum {\bf KFile\-Mime\-Type\-Info::Hint}}\label{classKFileMimeTypeInfo_w32}


This enum is mainly for items that have a special meaning for some applications. 

\begin{itemize}
\item {\tt No\-Hint} No hint \item {\tt Name} The name or title of the document \item {\tt Author} The one who created the contents of it \item {\tt Description} Some information about the document \item {\tt Width} A width in pixels \item {\tt Height} A height in pixels \item {\tt Size} A size in pixels (witdh and height) \item {\tt Bitrate} For media files \item {\tt Length} The length of the file, also for media files \item {\tt Hidden} The item is usually not shown to the user \item {\tt Thumbnail} The item is a thumbnail of the file \end{itemize}


Definition at line 104 of file kfilemetainfo.h.\index{KFileMimeTypeInfo@{KFile\-Mime\-Type\-Info}!Unit@{Unit}}
\index{Unit@{Unit}!KFileMimeTypeInfo@{KFile\-Mime\-Type\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}enum {\bf KFile\-Mime\-Type\-Info::Unit}}\label{classKFileMimeTypeInfo_w33}


This enum exists so that you can specify units for items, which you can usually use for integer items, so an application knows how to display it (e.g. 

a time in seconds in a hh:mm:ss form). You can either use one of those units, or if you don't find one that fits, you can add it yourself using a prefix and/or suffix.

\begin{itemize}
\item {\tt No\-Unit} None of the listed units \item {\tt Seconds} The item represents a time in seconds \item {\tt Milli\-Seconds} The item represents a time in milliseconds \item {\tt Bits\-Per\-Second} A bit rate \item {\tt Pixels} For resolutions \item {\tt Inches} Sizes \item {\tt Centimeters} Sizes \item {\tt Bytes} Some data/file size in bytes \item {\tt Kilo\-Bytes} Some data/file size in kilobytes \item {\tt Frames\-Per\-Second} A frame rate \item {\tt Dots\-Per\-Inch} Resolution in DPI \item {\tt Bits\-Per\-Pixel} A bit depth \item {\tt Hertz} Sample rates and similar \end{itemize}
\begin{Desc}
\item[Enumeration values: ]\par
\begin{description}
\index{FramesPerSecond@{FramesPerSecond}!KFileMimeTypeInfo@{KFileMimeTypeInfo}}\index{KFileMimeTypeInfo@{KFileMimeTypeInfo}!FramesPerSecond@{FramesPerSecond}}\item[{\em 
Frames\-Per\-Second\label{classKFileMimeTypeInfo_w33w26}
}]\begin{Desc}
\item[Since:]3.1 \end{Desc}
\index{DotsPerInch@{DotsPerInch}!KFileMimeTypeInfo@{KFileMimeTypeInfo}}\index{KFileMimeTypeInfo@{KFileMimeTypeInfo}!DotsPerInch@{DotsPerInch}}\item[{\em 
Dots\-Per\-Inch\label{classKFileMimeTypeInfo_w33w27}
}]\begin{Desc}
\item[Since:]3.1 \end{Desc}
\index{BitsPerPixel@{BitsPerPixel}!KFileMimeTypeInfo@{KFileMimeTypeInfo}}\index{KFileMimeTypeInfo@{KFileMimeTypeInfo}!BitsPerPixel@{BitsPerPixel}}\item[{\em 
Bits\-Per\-Pixel\label{classKFileMimeTypeInfo_w33w28}
}]\begin{Desc}
\item[Since:]3.1 \end{Desc}
\index{Hertz@{Hertz}!KFileMimeTypeInfo@{KFileMimeTypeInfo}}\index{KFileMimeTypeInfo@{KFileMimeTypeInfo}!Hertz@{Hertz}}\item[{\em 
Hertz\label{classKFileMimeTypeInfo_w33w29}
}]\begin{Desc}
\item[Since:]3.1 \end{Desc}
\index{KiloBytes@{KiloBytes}!KFileMimeTypeInfo@{KFileMimeTypeInfo}}\index{KFileMimeTypeInfo@{KFileMimeTypeInfo}!KiloBytes@{KiloBytes}}\item[{\em 
Kilo\-Bytes\label{classKFileMimeTypeInfo_w33w30}
}]\begin{Desc}
\item[Since:]3.1 \end{Desc}
\end{description}
\end{Desc}



Definition at line 139 of file kfilemetainfo.h.

\subsection{Member Function Documentation}
\index{KFileMimeTypeInfo@{KFile\-Mime\-Type\-Info}!createValidator@{createValidator}}
\index{createValidator@{createValidator}!KFileMimeTypeInfo@{KFile\-Mime\-Type\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QValidator} $\ast$ KFile\-Mime\-Type\-Info::create\-Validator (const {\bf QString} \& {\em group}, const {\bf QString} \& {\em key}, {\bf QObject} $\ast$ {\em parent} = 0, const char $\ast$ {\em name} = 0) const}\label{classKFileMimeTypeInfo_a2}


Creates a validator for this item. 

Make sure to supply a proper parent argument or delete the validator yourself. 

Definition at line 1377 of file kfilemetainfo.cpp.

References KFile\-Plugin::create\-Validator(), KStd\-Accel::key(), mime\-Type(), and KStd\-Accel::name().\index{KFileMimeTypeInfo@{KFile\-Mime\-Type\-Info}!supportedGroups@{supportedGroups}}
\index{supportedGroups@{supportedGroups}!KFileMimeTypeInfo@{KFile\-Mime\-Type\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KFile\-Mime\-Type\-Info::supported\-Groups () const}\label{classKFileMimeTypeInfo_a3}


Returns the list of all groups that the plugin for this mimetype supports. 

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


Definition at line 1339 of file kfilemetainfo.cpp.

References QDict\-Iterator::current().\index{KFileMimeTypeInfo@{KFile\-Mime\-Type\-Info}!translatedGroups@{translatedGroups}}
\index{translatedGroups@{translatedGroups}!KFileMimeTypeInfo@{KFile\-Mime\-Type\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KFile\-Mime\-Type\-Info::translated\-Groups () const}\label{classKFileMimeTypeInfo_a4}


Same as the above function, but returns the strings to display to the user. 

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


Definition at line 1349 of file kfilemetainfo.cpp.

References QDict\-Iterator::current().\index{KFileMimeTypeInfo@{KFile\-Mime\-Type\-Info}!preferredGroups@{preferredGroups}}
\index{preferredGroups@{preferredGroups}!KFileMimeTypeInfo@{KFile\-Mime\-Type\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KFile\-Mime\-Type\-Info::preferred\-Groups () const\hspace{0.3cm}{\tt  [inline]}}\label{classKFileMimeTypeInfo_a5}


This returns the list of groups in the preferred order that's specified in the .desktop file. 

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


Definition at line 434 of file kfilemetainfo.h.\index{KFileMimeTypeInfo@{KFile\-Mime\-Type\-Info}!mimeType@{mimeType}}
\index{mimeType@{mimeType}!KFileMimeTypeInfo@{KFile\-Mime\-Type\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KFile\-Mime\-Type\-Info::mime\-Type () const\hspace{0.3cm}{\tt  [inline]}}\label{classKFileMimeTypeInfo_a6}


Returns the mimetype to which this info belongs. 



Definition at line 442 of file kfilemetainfo.h.

Referenced by create\-Validator().\index{KFileMimeTypeInfo@{KFile\-Mime\-Type\-Info}!groupInfo@{groupInfo}}
\index{groupInfo@{groupInfo}!KFileMimeTypeInfo@{KFile\-Mime\-Type\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const  {\bf KFile\-Mime\-Type\-Info::Group\-Info} $\ast$ KFile\-Mime\-Type\-Info::group\-Info (const {\bf QString} \& {\em group}) const}\label{classKFileMimeTypeInfo_a7}


Get the group info for a specific group. 

\begin{Desc}
\item[Returns:]a pointer to the info. Don't delete this object! \end{Desc}


Definition at line 1326 of file kfilemetainfo.cpp.

References QDict$<$ Group\-Info $>$::find().\index{KFileMimeTypeInfo@{KFile\-Mime\-Type\-Info}!supportedKeys@{supportedKeys}}
\index{supportedKeys@{supportedKeys}!KFileMimeTypeInfo@{KFile\-Mime\-Type\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KFile\-Mime\-Type\-Info::supported\-Keys () const}\label{classKFileMimeTypeInfo_a8}


Return a list of all supported keys without looking for a specific group. 

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


Definition at line 1359 of file kfilemetainfo.cpp.

References QDict\-Iterator::current().\index{KFileMimeTypeInfo@{KFile\-Mime\-Type\-Info}!preferredKeys@{preferredKeys}}
\index{preferredKeys@{preferredKeys}!KFileMimeTypeInfo@{KFile\-Mime\-Type\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KFile\-Mime\-Type\-Info::preferred\-Keys () const\hspace{0.3cm}{\tt  [inline]}}\label{classKFileMimeTypeInfo_a9}


Return a list of all supported keys in preference order. 

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


Definition at line 468 of file kfilemetainfo.h.

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