\section{KCompletion\-Matches Class Reference}
\label{classKCompletionMatches}\index{KCompletionMatches@{KCompletionMatches}}
This structure is returned by {\bf KCompletion::all\-Weighted\-Matches}{\rm (p.\,\pageref{classKCompletion_a16})} . List for keeping matches returned from {\bf KCompletion}{\rm (p.\,\pageref{classKCompletion})}.  


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

Inheritance diagram for KCompletion\-Matches:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=150pt]{classKCompletionMatches__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KCompletion\-Matches:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=150pt]{classKCompletionMatches__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KCompletion\-Matches} (bool sort)\label{classKCompletionMatches_a0}

\item 
{\bf KCompletion\-Matches} (const  KCompletion\-Matches\-Wrapper \&matches)\label{classKCompletionMatches_a1}

\item 
void {\bf remove\-Duplicates} ()
\begin{CompactList}\small\item\em Removes duplicate matches. \item\end{CompactList}\item 
{\bf QString\-List} {\bf list} (bool sort=true) const 
\begin{CompactList}\small\item\em Returns the matches as a {\bf QString\-List}. \item\end{CompactList}\item 
bool {\bf sorting} () const 
\begin{CompactList}\small\item\em If {\bf sorting()}{\rm (p.\,\pageref{classKCompletionMatches_a5})} returns false, the matches aren't sorted by their weight, even if true is passed to {\bf list()}{\rm (p.\,\pageref{classKCompletionMatches_a4})}. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
This structure is returned by {\bf KCompletion::all\-Weighted\-Matches}{\rm (p.\,\pageref{classKCompletion_a16})} . List for keeping matches returned from {\bf KCompletion}{\rm (p.\,\pageref{classKCompletion})}. 

It also keeps the weight of the matches, allowing you to modify some matches or merge them with matches from another call to all\-Weighted\-Matches(), and sort the matches after that in order to have the matches ordered correctly

Example (a simplified example of what Konqueror's completion does): \small\begin{alltt}
 KCompletionMatches matches = completion-$>$allWeightedMatches( location );
 if( !location.startsWith( "www." ))
       matches += completion-$>$allWeightedmatches( "www." + location" );
 matches.removeDuplicates();
 {\bf QStringList} list = matches.list();
 \end{alltt}\normalsize 




Definition at line 606 of file kcompletion.h.

\subsection{Member Function Documentation}
\index{KCompletionMatches@{KCompletion\-Matches}!removeDuplicates@{removeDuplicates}}
\index{removeDuplicates@{removeDuplicates}!KCompletionMatches@{KCompletion\-Matches}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KCompletion\-Matches::remove\-Duplicates ()}\label{classKCompletionMatches_a3}


Removes duplicate matches. 

Needed only when you merged several matches results and there's a possibility of duplicates. 

Definition at line 779 of file kcompletion.cpp.

References QValue\-List$<$ KSortable\-Item$<$ T, Key $>$ $>$::begin(), QValue\-List$<$ KSortable\-Item$<$ T, Key $>$ $>$::end(), QValue\-List$<$ KSortable\-Item$<$ T, Key $>$ $>$::Iterator(), and QValue\-List$<$ KSortable\-Item$<$ T, Key $>$ $>$::remove().\index{KCompletionMatches@{KCompletion\-Matches}!list@{list}}
\index{list@{list}!KCompletionMatches@{KCompletion\-Matches}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KCompletion\-Matches::list (bool {\em sort} = true) const}\label{classKCompletionMatches_a4}


Returns the matches as a {\bf QString\-List}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em sort}]if false, the matches won't be sorted before the conversion, use only if you're sure the sorting is not needed \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the list of matches \end{Desc}


Definition at line 768 of file kcompletion.cpp.

References QValue\-List$<$ KSortable\-Item$<$ T, Key $>$ $>$::begin(), QValue\-List$<$ KSortable\-Item$<$ T, Key $>$ $>$::Const\-Iterator(), QValue\-List$<$ KSortable\-Item$<$ T, Key $>$ $>$::end(), and QString\-List::sort().\index{KCompletionMatches@{KCompletion\-Matches}!sorting@{sorting}}
\index{sorting@{sorting}!KCompletionMatches@{KCompletion\-Matches}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KCompletion\-Matches::sorting () const\hspace{0.3cm}{\tt  [inline]}}\label{classKCompletionMatches_a5}


If {\bf sorting()}{\rm (p.\,\pageref{classKCompletionMatches_a5})} returns false, the matches aren't sorted by their weight, even if true is passed to {\bf list()}{\rm (p.\,\pageref{classKCompletionMatches_a4})}. 

\begin{Desc}
\item[Returns:]true if the matches won't be sorted \end{Desc}


Definition at line 633 of file kcompletion.h.

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