class KUrlCompletion |
|
|
This class does completion of URLs including user directories (~user) and environment variables. Remote URLs are passed to KIO.
Completion of a single URL
Author David Smith |
|
Constructs a KUrlCompletion object in FileCompletion mode. |
|
This overloaded constructor allows you to set the Mode to ExeCompletion or FileCompletion without using setMode. Default is FileCompletion. |
|
|
Returns the current directory, as it was given in setDir Returns the current directory (path or URL) |
|
Check whether asynchronous completion is in progress. Returns true if asynchronous completion is in progress |
|
Finds completions to the given text. Remote URLs are listed with KIO. For performance reasons, local files are listed with KIO only if KURLCOMPLETION_LOCAL_KIO is set. The completion is done asyncronously if KIO is used. Returns the first match for user, environment, and local dir completion and QString() for asynchronous completion (KIO or threaded).
text - the text to complete Returns the first match, or QString() if not found |
|
Returns the completion mode: exe or file completion (default FileCompletion). Returns the completion mode |
|
|
|
|
Checks whether environment variables are completed and whether they are replaced internally while finding completions. Default is enabled. Returns true if environment vvariables will be replaced |
|
Returns whether ~username is completed and whether ~username is replaced internally with the user's home directory while finding completions. Default is enabled. Returns true to replace tilde with the home directory |
|
Replaces username and/or environment variables, depending on the current settings and returns the filtered url. Only works with local files, i.e. returns back the original string for non-local urls. text - the text to process Returns the path or URL resulting from this operation. If you want to convert it to a KUrl, use KUrl.fromPathOrUrl. |
|
Internal I'll let ossi add a real one to KShell :) |
|
Sets the current directory (used as base for completion). Default = $HOME. dir - the current directory, either as a path or URL |
|
Changes the completion mode: exe or file completion mode - the new completion mode |
|
Enables/disables completion and replacement (internally) of environment variables in URLs. Default is enabled. replace - true to replace environment variables |
|
Enables/disables completion of ~username and replacement (internally) of ~username with the user's home directory. Default is enabled. replace - true to replace tilde with the home directory |
|
|
|
Stops asynchronous completion. |
ExeCompletion | - | ||
FileCompletion | - | ||
DirCompletion | - |