KDEUI
#include <kcompletion.h>
Public Member Functions | |
KCompletionMatches (bool sort) | |
KCompletionMatches (const KCompletionMatches &) | |
KCompletionMatches (const KCompletionMatchesWrapper &matches) | |
~KCompletionMatches () | |
QStringList | list (bool sort=true) const |
KCompletionMatches & | operator= (const KCompletionMatches &) |
void | removeDuplicates () |
bool | sorting () const |
Public Member Functions inherited from KSortableList< T, Key > | |
void | insert (Key i, const T &t) |
T & | operator[] (Key i) |
const T & | operator[] (Key i) const |
void | sort () |
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):
List for keeping matches returned from KCompletion
Definition at line 579 of file kcompletion.h.
Constructor & Destructor Documentation
KCompletionMatches::KCompletionMatches | ( | bool | sort | ) |
Default constructor.
- Parameters
-
sort if false, the matches won't be sorted before the conversion, use only if you're sure the sorting is not needed
Definition at line 862 of file kcompletion.cpp.
KCompletionMatches::KCompletionMatches | ( | const KCompletionMatches & | o | ) |
copy constructor.
Definition at line 845 of file kcompletion.cpp.
KCompletionMatches::KCompletionMatches | ( | const KCompletionMatchesWrapper & | matches | ) |
Definition at line 867 of file kcompletion.cpp.
KCompletionMatches::~KCompletionMatches | ( | ) |
default destructor.
Definition at line 881 of file kcompletion.cpp.
Member Function Documentation
QStringList KCompletionMatches::list | ( | bool | sort = true | ) | const |
Returns the matches as a QStringList.
- Parameters
-
sort if false, the matches won't be sorted before the conversion, use only if you're sure the sorting is not needed
- Returns
- the list of matches
Definition at line 886 of file kcompletion.cpp.
KCompletionMatches & KCompletionMatches::operator= | ( | const KCompletionMatches & | o | ) |
assignment operator.
Definition at line 852 of file kcompletion.cpp.
void KCompletionMatches::removeDuplicates | ( | ) |
Removes duplicate matches.
Needed only when you merged several matches results and there's a possibility of duplicates.
Definition at line 902 of file kcompletion.cpp.
bool KCompletionMatches::sorting | ( | ) | const |
If sorting() returns false, the matches aren't sorted by their weight, even if true is passed to list().
- Returns
- true if the matches won't be sorted
Definition at line 897 of file kcompletion.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:17 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.