.TH "KURLCompletion" 3 "28 Jan 2004" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KURLCompletion \- This class does completion of URLs including user directories (~user) and environment variables. Completion of a single URL.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kurlcompletion.h>\fP
.PP
Inherits \fBKCompletion\fP.
.PP
Inherited by \fBKShellCompletion\fP.
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "enum \fBMode\fP { \fBExeCompletion\fP = 1, \fBFileCompletion\fP, \fBDirCompletion\fP }"
.br
.RI "\fIDetermines how completion is done. \fP"
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKURLCompletion\fP ()"
.br
.RI "\fIConstructs a KURLCompletion object in FileCompletion mode. \fP"
.ti -1c
.RI "\fBKURLCompletion\fP (\fBMode\fP)"
.br
.RI "\fIThis overloaded constructor allows you to set the Mode to ExeCompletion or FileCompletion without using \fBsetMode\fP. \fP"
.ti -1c
.RI "virtual \fB~KURLCompletion\fP ()"
.br
.RI "\fIDestructs the KURLCompletion object. \fP"
.ti -1c
.RI "virtual \fBQString\fP \fBmakeCompletion\fP (const  \fBQString\fP &)"
.br
.RI "\fIFinds completions to the given text. \fP"
.ti -1c
.RI "virtual void \fBsetDir\fP (const  \fBQString\fP &dir)"
.br
.RI "\fISets the current directory (used as base for completion) Default = $HOME. \fP"
.ti -1c
.RI "virtual \fBQString\fP \fBdir\fP () const "
.br
.RI "\fIReturns the current directory. \fP"
.ti -1c
.RI "virtual bool \fBisRunning\fP () const "
.br
.RI "\fIReturns true if asyncronous completion is in progress. \fP"
.ti -1c
.RI "virtual void \fBstop\fP ()"
.br
.RI "\fIStops asyncronous completion. \fP"
.ti -1c
.RI "virtual \fBMode\fP \fBmode\fP () const "
.br
.RI "\fIReturns the completion mode: exe or file completion (default FileCompletion). \fP"
.ti -1c
.RI "virtual void \fBsetMode\fP (\fBMode\fP mode)"
.br
.RI "\fIChanges the completion mode: exe or file completion. \fP"
.ti -1c
.RI "virtual bool \fBreplaceEnv\fP () const "
.br
.RI "\fIReturns whether environment variables are completed and whether they are replaced internally while finding completions. \fP"
.ti -1c
.RI "virtual void \fBsetReplaceEnv\fP (bool replace)"
.br
.RI "\fIEnables/disables completion and replacement (internally) of environment variables in URLs. \fP"
.ti -1c
.RI "virtual bool \fBreplaceHome\fP () const "
.br
.RI "\fIReturns whether ~username is completed and whether ~username is replaced internally with the user's home directory while finding completions. \fP"
.ti -1c
.RI "virtual void \fBsetReplaceHome\fP (bool replace)"
.br
.RI "\fIEnables/disables completion of ~username and replacement (internally) of ~username with the user's home directory. \fP"
.ti -1c
.RI "\fBQString\fP \fBreplacedPath\fP (const  \fBQString\fP &text)"
.br
.RI "\fIReplaces username and/or environment variables, depending on the current settings and returns the filtered url. \fP"
.in -1c
.SS "Protected Slots"

.in +1c
.ti -1c
.RI "void \fBslotEntries\fP (\fBKIO::Job\fP *, const  \fBKIO::UDSEntryList\fP &)"
.br
.ti -1c
.RI "void \fBslotIOFinished\fP (\fBKIO::Job\fP *)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "void \fBpostProcessMatch\fP (\fBQString\fP *\fBmatch\fP) const "
.br
.ti -1c
.RI "void \fBpostProcessMatches\fP (\fBQStringList\fP *\fBmatches\fP) const "
.br
.ti -1c
.RI "void \fBpostProcessMatches\fP (\fBKCompletionMatches\fP *\fBmatches\fP) const "
.br
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SH "Detailed Description"
.PP 
This class does completion of URLs including user directories (~user) and environment variables. Completion of a single URL. 

Remote URLs are passed to \fBKIO\fP.
.PP
\fBAuthor:\fP
.RS 4
David Smith <dsmith@algonet.se> 
.RE
.PP
\fBVersion:\fP
.RS 4
\fBId\fP.RS 4
\fBkurlcompletion.h\fP,v 1.28 2002/06/19 17:46:01 domi Exp 
.RE
.PP
.RE
.PP

.PP
Definition at line 42 of file kurlcompletion.h.
.SH "Member Enumeration Documentation"
.PP 
.SS "enum \fBKURLCompletion::Mode\fP"
.PP
Determines how completion is done. .IP "\(bu" 2
ExeCompletion - executables in $PATH or with full path. 
.IP "\(bu" 2
FileCompletion - all files with full path or in \fBdir()\fP, URLs are listed using \fBKIO\fP. 
.IP "\(bu" 2
DirCompletion - as FileCompletion but only returns directories.
.PP
Definition at line 54 of file kurlcompletion.h.
.PP
Referenced by KShellCompletion::makeCompletion(), and mode().
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KURLCompletion::KURLCompletion ()"
.PP
Constructs a KURLCompletion object in FileCompletion mode. Definition at line 475 of file kurlcompletion.cpp.
.SS "KURLCompletion::KURLCompletion (\fBMode\fP)"
.PP
This overloaded constructor allows you to set the Mode to ExeCompletion or FileCompletion without using \fBsetMode\fP. Default is FileCompletionDefinition at line 481 of file kurlcompletion.cpp.
.PP
References mode().
.SS "KURLCompletion::~\fBKURLCompletion\fP ()\fC [virtual]\fP"
.PP
Destructs the KURLCompletion object. Definition at line 486 of file kurlcompletion.cpp.
.PP
References stop().
.SH "Member Function Documentation"
.PP 
.SS "\fBQString\fP KURLCompletion::makeCompletion (const \fBQString\fP &)\fC [virtual]\fP"
.PP
Finds completions to the given text. Remote URLs are listed with \fBKIO\fP. For performance reasons, local files are listed with \fBKIO\fP only if KURLCOMPLETION_LOCAL_KIO is set. The completion is done asyncronously if \fBKIO\fP is used.
.PP
Returns the first match for user, environment, and local dir completion and QString::null for asyncronous completion (\fBKIO\fP).Reimplemented from \fBKCompletion\fP.
.PP
Reimplemented in \fBKShellCompletion\fP.
.PP
Definition at line 560 of file kurlcompletion.cpp.
.PP
References KCompletion::match(), and stop().
.PP
Referenced by KShellCompletion::makeCompletion().
.SS "void KURLCompletion::setDir (const \fBQString\fP & dir)\fC [virtual]\fP"
.PP
Sets the current directory (used as base for completion) Default = $HOME. Definition at line 515 of file kurlcompletion.cpp.
.SS "\fBQString\fP KURLCompletion::dir () const\fC [virtual]\fP"
.PP
Returns the current directory. Definition at line 520 of file kurlcompletion.cpp.
.SS "bool KURLCompletion::isRunning () const\fC [virtual]\fP"
.PP
Returns true if asyncronous completion is in progress. Definition at line 639 of file kurlcompletion.cpp.
.SS "void KURLCompletion::stop ()\fC [virtual]\fP"
.PP
Stops asyncronous completion. Definition at line 650 of file kurlcompletion.cpp.
.PP
Referenced by makeCompletion(), and ~KURLCompletion().
.SS "\fBKURLCompletion::Mode\fP KURLCompletion::mode () const\fC [virtual]\fP"
.PP
Returns the completion mode: exe or file completion (default FileCompletion). Definition at line 525 of file kurlcompletion.cpp.
.PP
References Mode.
.PP
Referenced by KURLCompletion(), and KShellCompletion::makeCompletion().
.SS "void KURLCompletion::setMode (\fBMode\fP mode)\fC [virtual]\fP"
.PP
Changes the completion mode: exe or file completion. Definition at line 530 of file kurlcompletion.cpp.
.PP
Referenced by KDirSelectDialog::KDirSelectDialog(), KShellCompletion::makeCompletion(), and KURLRequester::setMode().
.SS "bool KURLCompletion::replaceEnv () const\fC [virtual]\fP"
.PP
Returns whether environment variables are completed and whether they are replaced internally while finding completions. Default is enabled.Definition at line 535 of file kurlcompletion.cpp.
.SS "void KURLCompletion::setReplaceEnv (bool replace)\fC [virtual]\fP"
.PP
Enables/disables completion and replacement (internally) of environment variables in URLs. Default is enabled.Definition at line 540 of file kurlcompletion.cpp.
.PP
References KStdAccel::replace().
.SS "bool KURLCompletion::replaceHome () const\fC [virtual]\fP"
.PP
Returns whether ~username is completed and whether ~username is replaced internally with the user's home directory while finding completions. Default is enabled.Definition at line 545 of file kurlcompletion.cpp.
.SS "void KURLCompletion::setReplaceHome (bool replace)\fC [virtual]\fP"
.PP
Enables/disables completion of ~username and replacement (internally) of ~username with the user's home directory. Default is enabled.Definition at line 550 of file kurlcompletion.cpp.
.PP
References KStdAccel::replace().
.SS "\fBQString\fP KURLCompletion::replacedPath (const \fBQString\fP & text)"
.PP
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.Definition at line 1342 of file kurlcompletion.cpp.

.SH "Author"
.PP 
Generated automatically by Doxygen for kio Library from the source code.
