\section{KCompletion\-Matches Class Reference}
\label{classKCompletionMatches}\index{KCompletionMatches@{KCompletionMatches}}
This structure is returned by {\bf KCompletion::all\-Weighted\-Matches}{\rm (p.\,\pageref{classKCompletion_a17})} . 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=129pt]{classKCompletionMatches__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KCompletion\-Matches:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=129pt]{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} ()
\item 
{\bf QString\-List} {\bf list} (bool sort=true) const 
\item 
bool {\bf sorting} () const 
\end{CompactItemize}


\subsection{Detailed Description}
This structure is returned by {\bf KCompletion::all\-Weighted\-Matches}{\rm (p.\,\pageref{classKCompletion_a17})} . 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): 

\footnotesize\begin{verbatim} KCompletionMatches matches = completion->allWeightedMatches( location );
 if( !location.startsWith( "www." ))
 matches += completion->allWeightedmatches( "www." + location" );
 matches.removeDuplicates();
 QStringList list = matches.list();
\end{verbatim}
\normalsize




Definition at line 615 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 796 of file kcompletion.cpp.

References QValue\-List$<$ KSortable\-Item$<$ T, Key $>$ $>$::begin(), QValue\-List$<$ KSortable\-Item$<$ T, Key $>$ $>$::end(), 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} = {\tt 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 785 of file kcompletion.cpp.

References QValue\-List$<$ KSortable\-Item$<$ T, Key $>$ $>$::begin(), 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 641 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}
