\section{KSimple\-File\-Filter Class Reference}
\label{classKSimpleFileFilter}\index{KSimpleFileFilter@{KSimpleFileFilter}}
A simple file filter that can filter hidden dot files, by name, by mime type and by mode. A simple file filter.  


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

Inheritance diagram for KSimple\-File\-Filter:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=64pt]{classKSimpleFileFilter__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KSimple\-File\-Filter:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=158pt]{classKSimpleFileFilter__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KSimple\-File\-Filter} ()
\item 
virtual void {\bf set\-Filter\-Dot\-Files} (bool filter)
\item 
bool {\bf filter\-Dot\-Files} () const 
\item 
virtual void {\bf set\-Filter\-Specials} (bool filter)
\item 
bool {\bf filter\-Specials} () const 
\item 
void {\bf set\-Name\-Filters} (const {\bf QString} \&name\-Filters, bool case\-Sensitive, const {\bf QChar} \&separator= ' ')
\item 
virtual void {\bf set\-Name\-Filters} (const {\bf QString} \&name\-Filters)
\item 
virtual void {\bf set\-Mime\-Filters} (const {\bf QString\-List} \&mime\-Filters)
\item 
{\bf QString\-List} {\bf mime\-Filters} () const 
\item 
virtual void {\bf set\-Mode\-Filter} (mode\_\-t mode)
\item 
mode\_\-t {\bf mode\-Filter} () const 
\item 
virtual bool {\bf passes\-Filter} (const {\bf KFile\-Item} $\ast$item) const 
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKSimpleFileFilter_b0}

\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
{\bf QPtr\-List}$<$ {\bf QReg\-Exp} $>$ {\bf m\_\-name\-Filters}\label{classKSimpleFileFilter_p0}

\end{CompactItemize}


\subsection{Detailed Description}
A simple file filter that can filter hidden dot files, by name, by mime type and by mode. A simple file filter. 



Definition at line 59 of file kfilefilter.h.

\subsection{Constructor \& Destructor Documentation}
\index{KSimpleFileFilter@{KSimple\-File\-Filter}!KSimpleFileFilter@{KSimpleFileFilter}}
\index{KSimpleFileFilter@{KSimpleFileFilter}!KSimpleFileFilter@{KSimple\-File\-Filter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KSimple\-File\-Filter::KSimple\-File\-Filter ()}\label{classKSimpleFileFilter_a0}


Creates a new filter. 

By default, it filters only hidden dot files and \char`\"{}.\char`\"{} and \char`\"{}..\char`\"{}. 

Definition at line 28 of file kfilefilter.cpp.

References QPtr\-List::set\-Auto\-Delete().

\subsection{Member Function Documentation}
\index{KSimpleFileFilter@{KSimple\-File\-Filter}!setFilterDotFiles@{setFilterDotFiles}}
\index{setFilterDotFiles@{setFilterDotFiles}!KSimpleFileFilter@{KSimple\-File\-Filter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSimple\-File\-Filter::set\-Filter\-Dot\-Files (bool {\em filter})\hspace{0.3cm}{\tt  [virtual]}}\label{classKSimpleFileFilter_a2}


Enable or disable filtering hidden dot files. 

This option is enabled by default. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em filter}]true to enable filtering dot files, false to disable \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]{\bf filter\-Dot\-Files}{\rm (p.\,\pageref{classKSimpleFileFilter_a3})} \end{Desc}


Definition at line 40 of file kfilefilter.cpp.\index{KSimpleFileFilter@{KSimple\-File\-Filter}!filterDotFiles@{filterDotFiles}}
\index{filterDotFiles@{filterDotFiles}!KSimpleFileFilter@{KSimple\-File\-Filter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KSimple\-File\-Filter::filter\-Dot\-Files () const\hspace{0.3cm}{\tt  [inline]}}\label{classKSimpleFileFilter_a3}


Checks whether filtering dot files is enabled. 

This option is enabled by default. \begin{Desc}
\item[Returns:]true if filtering is enabled, false otherwise \end{Desc}
\begin{Desc}
\item[See also:]{\bf set\-Filter\-Dot\-Files}{\rm (p.\,\pageref{classKSimpleFileFilter_a2})} \end{Desc}


Definition at line 83 of file kfilefilter.h.\index{KSimpleFileFilter@{KSimple\-File\-Filter}!setFilterSpecials@{setFilterSpecials}}
\index{setFilterSpecials@{setFilterSpecials}!KSimpleFileFilter@{KSimple\-File\-Filter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSimple\-File\-Filter::set\-Filter\-Specials (bool {\em filter})\hspace{0.3cm}{\tt  [virtual]}}\label{classKSimpleFileFilter_a4}


Filters \char`\"{}.\char`\"{} and \char`\"{}..\char`\"{}, default is true. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em filter}]true to enable, false otherwise \end{description}
\end{Desc}


Definition at line 45 of file kfilefilter.cpp.\index{KSimpleFileFilter@{KSimple\-File\-Filter}!filterSpecials@{filterSpecials}}
\index{filterSpecials@{filterSpecials}!KSimpleFileFilter@{KSimple\-File\-Filter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KSimple\-File\-Filter::filter\-Specials () const\hspace{0.3cm}{\tt  [inline]}}\label{classKSimpleFileFilter_a5}


Checks whether it filters \char`\"{}.\char`\"{} and \char`\"{}..\char`\"{}, default is true. 

\begin{Desc}
\item[Returns:]true if enabled, false otherwise \end{Desc}


Definition at line 94 of file kfilefilter.h.\index{KSimpleFileFilter@{KSimple\-File\-Filter}!setNameFilters@{setNameFilters}}
\index{setNameFilters@{setNameFilters}!KSimpleFileFilter@{KSimple\-File\-Filter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSimple\-File\-Filter::set\-Name\-Filters (const {\bf QString} \& {\em name\-Filters}, bool {\em case\-Sensitive}, const {\bf QChar} \& {\em separator} = {\tt '~'})}\label{classKSimpleFileFilter_a6}


Sets a list of regular expressions to filter by name. 

The file will only pass if its name matches one of the regular expressions. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name\-Filters}]a list of regular expressions, separated by the character {\tt separator} \item[{\em case\-Sensitive}]if true, matches case sensitive. False otherwise \item[{\em separator}]the separator in the {\tt name\-Filter} \end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 56 of file kfilefilter.cpp.

References QPtr\-List::append(), QPtr\-List::clear(), and QString\-List::split().

Referenced by set\-Name\-Filters().\index{KSimpleFileFilter@{KSimple\-File\-Filter}!setNameFilters@{setNameFilters}}
\index{setNameFilters@{setNameFilters}!KSimpleFileFilter@{KSimple\-File\-Filter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSimple\-File\-Filter::set\-Name\-Filters (const {\bf QString} \& {\em name\-Filters})\hspace{0.3cm}{\tt  [virtual]}}\label{classKSimpleFileFilter_a7}


Sets a list of regular expressions to filter by name. 

The file will only pass if its name matches one of the regular expressions. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name\-Filters}]a list of regular expressions, separated by space (' ') \end{description}
\end{Desc}


Definition at line 50 of file kfilefilter.cpp.

References set\-Name\-Filters().\index{KSimpleFileFilter@{KSimple\-File\-Filter}!setMimeFilters@{setMimeFilters}}
\index{setMimeFilters@{setMimeFilters}!KSimpleFileFilter@{KSimple\-File\-Filter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSimple\-File\-Filter::set\-Mime\-Filters (const {\bf QString\-List} \& {\em mime\-Filters})\hspace{0.3cm}{\tt  [virtual]}}\label{classKSimpleFileFilter_a8}


Sets a list of mime filters. 

A file can only pass if its mime type is contained in this list. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mime\-Filters}]the list of mime types \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]set\-Mime\-Filter \end{Desc}


Definition at line 70 of file kfilefilter.cpp.

References mime\-Filters().\index{KSimpleFileFilter@{KSimple\-File\-Filter}!mimeFilters@{mimeFilters}}
\index{mimeFilters@{mimeFilters}!KSimpleFileFilter@{KSimple\-File\-Filter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KSimple\-File\-Filter::mime\-Filters () const\hspace{0.3cm}{\tt  [inline]}}\label{classKSimpleFileFilter_a9}


Returns the list of mime types. 

\begin{Desc}
\item[Returns:]the list of mime types \end{Desc}
\begin{Desc}
\item[See also:]mime\-Filter \end{Desc}


Definition at line 131 of file kfilefilter.h.

Referenced by set\-Mime\-Filters().\index{KSimpleFileFilter@{KSimple\-File\-Filter}!setModeFilter@{setModeFilter}}
\index{setModeFilter@{setModeFilter}!KSimpleFileFilter@{KSimple\-File\-Filter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSimple\-File\-Filter::set\-Mode\-Filter (mode\_\-t {\em mode})\hspace{0.3cm}{\tt  [virtual]}}\label{classKSimpleFileFilter_a10}


Sets the mode filter. 

If the {\tt mode} is 0, the filter is disabled. When enabled, a file will only pass if the files mode ANDed with {\tt mode} is not zero. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mode}]the new mode. 0 to disable \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]{\bf mode\-Filter}{\rm (p.\,\pageref{classKSimpleFileFilter_a11})} \end{Desc}


Definition at line 75 of file kfilefilter.cpp.\index{KSimpleFileFilter@{KSimple\-File\-Filter}!modeFilter@{modeFilter}}
\index{modeFilter@{modeFilter}!KSimpleFileFilter@{KSimple\-File\-Filter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}mode\_\-t KSimple\-File\-Filter::mode\-Filter () const\hspace{0.3cm}{\tt  [inline]}}\label{classKSimpleFileFilter_a11}


Returns the mode filter, as set by {\bf set\-Mode\-Filter()}{\rm (p.\,\pageref{classKSimpleFileFilter_a10})}. 

\begin{Desc}
\item[Returns:]the mode filter, 0 if disabled \end{Desc}
\begin{Desc}
\item[See also:]{\bf set\-Mode\-Filter}{\rm (p.\,\pageref{classKSimpleFileFilter_a10})} \end{Desc}


Definition at line 147 of file kfilefilter.h.\index{KSimpleFileFilter@{KSimple\-File\-Filter}!passesFilter@{passesFilter}}
\index{passesFilter@{passesFilter}!KSimpleFileFilter@{KSimple\-File\-Filter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KSimple\-File\-Filter::passes\-Filter (const {\bf KFile\-Item} $\ast$ {\em item}) const\hspace{0.3cm}{\tt  [virtual]}}\label{classKSimpleFileFilter_a12}


Checks the given {\tt item}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em item}]the item to filter \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if the {\tt item} passes the filter, false otherwise \end{Desc}


Implements {\bf KFile\-Filter} {\rm (p.\,\pageref{classKFileFilter_a0})}.

Definition at line 80 of file kfilefilter.cpp.

References QString::at(), QPtr\-List\-Iterator::current(), QPtr\-List::is\-Empty(), and KGlobal::static\-QString().

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