• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

Public Member Functions | List of all members
TDECompletionMatches Class Reference

#include <kcompletion.h>

Inheritance diagram for TDECompletionMatches:
KSortableValueList< T, Key >

Public Member Functions

 TDECompletionMatches (bool sort)
 
 TDECompletionMatches (const TDECompletionMatchesWrapper &matches)
 
void removeDuplicates ()
 
TQStringList list (bool sort=true) const
 
bool sorting () const
 
- Public Member Functions inherited from KSortableValueList< 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 TDECompletion::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):

TDECompletionMatches matches = completion->allWeightedMatches( location );
if( !location.startsWith( "www." ))
matches += completion->allWeightedmatches( "www." + location" );
matches.removeDuplicates();
TQStringList list = matches.list();
TDECompletionMatches
This structure is returned by TDECompletion::allWeightedMatches .
Definition: kcompletion.h:616

List for keeping matches returned from TDECompletion

Definition at line 615 of file kcompletion.h.

Constructor & Destructor Documentation

◆ TDECompletionMatches() [1/2]

TDECompletionMatches::TDECompletionMatches ( bool  sort)

Definition at line 763 of file kcompletion.cpp.

◆ TDECompletionMatches() [2/2]

TDECompletionMatches::TDECompletionMatches ( const TDECompletionMatchesWrapper &  matches)

Definition at line 768 of file kcompletion.cpp.

◆ ~TDECompletionMatches()

TDECompletionMatches::~TDECompletionMatches ( )

Definition at line 782 of file kcompletion.cpp.

Member Function Documentation

◆ list()

TQStringList TDECompletionMatches::list ( bool  sort = true) const

Returns the matches as a TQStringList.

Parameters
sortif 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 786 of file kcompletion.cpp.

◆ removeDuplicates()

void TDECompletionMatches::removeDuplicates ( )

Removes duplicate matches.

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

Definition at line 797 of file kcompletion.cpp.

◆ sorting()

bool TDECompletionMatches::sorting ( ) const
inline

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 641 of file kcompletion.h.


The documentation for this class was generated from the following files:
  • kcompletion.h
  • kcompletion.cpp

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.4
This website is maintained by Timothy Pearson.