class KURLCompletion

Completion of a single URL. More...

Definition#include <kurlcompletion.h>
InheritsKCompletion (kdecore) [public ]
Inherited byKShellCompletion
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods

Protected Methods

Protected Slots


Detailed Description

This class does completion of URLs including user directories (~user) and environment variables. Remote URLs are passed to KIO.

enum Mode { ExeCompletion=1, FileCompletion }; }

Mode

Determines how completion is done

 KURLCompletion ()

KURLCompletion

 KURLCompletion (Mode)

KURLCompletion

This overloaded constructor allows you to set the Mode to ExeCompletion or FileCompletion without using setMode. Default is FileCompletion

 ~KURLCompletion ()

~KURLCompletion

[virtual]

QString  makeCompletion (const QString&)

makeCompletion

[virtual]

Find 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::null for asyncronous completion (KIO)

Reimplemented from KCompletion.

void  setDir ( QString dir)

setDir

[virtual]

Set the current directory (used as base for completion) Default = $HOME

QString  dir ()

dir

[virtual]

Get the current directory

bool  isRunning ()

isRunning

[virtual]

Returns true if asyncronous completion is in progress

void  stop ()

stop

[virtual]

Stop asyncronous copmpletion

Mode  mode ()

mode

[virtual]

Return completion mode: exe or file completion (default FileCompletion)

void  setMode ( Mode mode )

setMode

[virtual]

Change completion mode: exe or file completion

bool  replaceEnv ()

replaceEnv

[virtual]

Replace environment variables when doing completion (default true)

void  setReplaceEnv ( bool replace )

setReplaceEnv

[virtual]

Enables/disables replacing of environment variables (default is enabled)

bool  replaceHome ()

replaceHome

[virtual]

Replace user home dirs (~user) when doing completion (default true)

void  setReplaceHome ( bool replace )

setReplaceHome

[virtual]

Enables/disables replacing of ~username with the user's homedirectory. Default is enabled.

void  postProcessMatch ( QString *match )

postProcessMatch

[protected: ]

Reimplemented from KCompletion.

void  postProcessMatches ( QStringList *matches )

postProcessMatches

[protected: ]

Reimplemented from KCompletion.

void  slotEntries ( KIO::Job *, const KIO::UDSEntryList& )

slotEntries

[protected slots: slot]

void  slotIOFinished ( KIO::Job * )

slotIOFinished

[protected slots: slot]