Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

KShellCompletion Class Reference

Shell-like completion of file names. More...

#include <kshellcompletion.h>

Inheritance diagram for KShellCompletion:

KURLCompletion KCompletion List of all members.

Public Methods

 KShellCompletion ()
QString makeCompletion (const QString &)

Protected Methods

void postProcessMatch (QString *match) const
void postProcessMatches (QStringList *matches) const
void postProcessMatches (KCompletionMatches *matches) const
virtual void virtual_hook (int id, void *data)

Detailed Description

Shell-like completion of file names.

This class does shell-like completion of file names. A string passed to makeCompletion() will be interpreted as a shell command line. Completion will be done on the last argument on the line. Returned matches consist of the first arguments (uncompleted) plus the completed last argument.

Author:
David Smith <dsmith@algonet.se>
Version:
$Id:

Definition at line 41 of file kshellcompletion.h.


Constructor & Destructor Documentation

KShellCompletion::KShellCompletion  
 

Constructs a KShellCompletion object.


Member Function Documentation

QString KShellCompletion::makeCompletion const QString &    [virtual]
 

Finds completions to the given text. The first match is returned and emitted in the signal match()

Reimplemented from KURLCompletion.

void KShellCompletion::postProcessMatch QString *    match const [protected, virtual]
 

This method is called after a completion is found and before the matching string is emitted. You can override this method to modify the string that will be emitted. This is necessary e.g. in KURLCompletion(), where files with spaces in their names are shown escaped ("filename\ with\ spaces"), but stored unescaped inside KCompletion. Never delete that pointer!

Default implementation does nothing.

Parameters:
match  the match to process
See also:
postProcessMatches

Reimplemented from KURLCompletion.

void KShellCompletion::postProcessMatches KCompletionMatches   matches const [protected, virtual]
 

This method is called before a list of all available completions is emitted via matches. You can override this method to modify the found items before match() or matches() are emitted. Never delete that pointer!

Default implementation does nothing.

Parameters:
matches  the matches to process
See also:
postProcessMatch

Reimplemented from KURLCompletion.

void KShellCompletion::postProcessMatches QStringList *    matches const [protected, virtual]
 

This method is called before a list of all available completions is emitted via matches. You can override this method to modify the found items before match() or matches are emitted. Never delete that pointer!

Default implementation does nothing.

Parameters:
matches  the matches to process
See also:
postProcessMatch

Reimplemented from KURLCompletion.


The documentation for this class was generated from the following file:
Generated on Wed Aug 13 23:30:24 2003 for kdelibs by doxygen1.2.18