#include </home/clem/local/src/opie/libopie2/qt3/opiecore/ocompletion.h>
Inheritance diagram for OCompletionMatches:


Public Member Functions | |
| OCompletionMatches (bool sort) | |
| OCompletionMatches (const OCompletionMatchesWrapper &matches) | |
| ~OCompletionMatches () | |
| void | removeDuplicates () |
| QStringList | list (bool sort=true) const |
| bool | sorting () const |
Private Attributes | |
| bool | _sorting |
| OCompletionMatchesPrivate * | d |
This structure is returned by OCompletion::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 Oonqueror's completion does):
OCompletionMatches matches = completion->allWeightedMatches( location );
if( !location.startsWith( "www." ))
matches += completion->allWeightedmatches( "www." + location" );
matches.removeDuplicates();
QStringList list = matches.list();
Definition at line 569 of file ocompletion.h.
|
|
Definition at line 932 of file ocompletion.cpp. |
|
|
For internal use only.
Definition at line 937 of file ocompletion.cpp. References QValueList< T >::begin(), QValueList< T >::end(), l, OCompletionMatchesWrapper::list(), QValueList< OSortableItem< QString, int > >::operator=(), QValueList< OSortableItem< T, Key > >::prepend(), and OCompletionMatchesWrapper::sortedList. |
|
|
Definition at line 951 of file ocompletion.cpp. |
|
|
Returns the matches as a QStringList.
Definition at line 955 of file ocompletion.cpp. References _sorting, QValueList< OSortableItem< T, Key > >::begin(), QValueList< OSortableItem< T, Key > >::end(), and QValueList< T >::prepend(). |
|
|
Removes duplicate matches. Needed only when you merged several matches results and there's a possibility of duplicates. Definition at line 966 of file ocompletion.cpp. References QValueList< OSortableItem< T, Key > >::begin(), QValueList< OSortableItem< T, Key > >::end(), and QValueList< OSortableItem< T, Key > >::remove(). |
|
|
If sorting() returns false, the matches aren't sorted by their weight, even if true is passed to list(). Definition at line 594 of file ocompletion.h. References _sorting. |
|
|
Definition at line 598 of file ocompletion.h. |
|
|
Definition at line 599 of file ocompletion.h. |
1.4.2