class KCompletionMatches

List for keeping matches returned from KCompletion. More...

Definition#include <kcompletion.h>
InheritsKCompletionMatchesList [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

This structure is returned by KCompletion::allWeightedMatches . It also keeps the weight of the matches, allowing you to modify some matches or merge them with matches from another call to allWeightedMatches(), and sort the matches after that in order to have the matches ordered correctly

Example (a simplified example of what Konqueror's completion does):


 KCompletionMatches matches = completion->allWeightedMatches( location );
 if( !location.startsWith( "www." ))
       matches += completion->allWeightedmatches( "www." + location" );
 matches.removeDuplicates();
 QStringList list = matches.list();

 KCompletionMatches ( bool sort )

KCompletionMatches

 KCompletionMatches ( const KCompletionMatchesWrapper& matches )

KCompletionMatches

 ~KCompletionMatches ()

~KCompletionMatches

void  removeDuplicates ()

removeDuplicates

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

QStringList  list ( bool sort = true )

list

[const]

Returns the matches as a QStringList.

Parameters:
sortif false, the matches won't be sorted before the conversion, use only if you're sure the sorting is not needed

bool  sorting ()

sorting

[const]

If sorting() returns false, the matches aren't sorted by their weight, even if true is passed to list().


Generated by: dfaure on faure on Tue Apr 16 08:49:00 2002, using kdoc 2.0a53.