#include <kcompletion.h>
Inheritance diagram for KCompletionMatches:

Public Methods | |
| void | removeDuplicates () |
| QStringList | list (bool sort=true) const |
| bool | sorting () const |
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();
Definition at line 606 of file kcompletion.h.
|
|
Returns the matches as a QStringList.
|
|
|
Removes duplicate matches. Needed only when you merged several matches results and there's a possibility of duplicates. |
|
|
If sorting() returns false, the matches aren't sorted by their weight, even if true is passed to list().
Definition at line 633 of file kcompletion.h. |
1.2.18