class KURLCompletion
|
Completion of a single URL. More... |
|
|
Public Types
- enum Mode { ExeCompletion=1, FileCompletion };
}
Public Methods
- KURLCompletion ()
- KURLCompletion (Mode)
- virtual ~KURLCompletion ()
- virtual QString makeCompletion (const QString&)
- virtual void setDir ( QString dir)
- virtual QString dir ()
- virtual bool isRunning ()
- virtual void stop ()
- virtual Mode mode ()
- virtual void setMode ( Mode mode )
- virtual bool replaceEnv ()
- virtual void setReplaceEnv ( bool replace )
- virtual bool replaceHome ()
- virtual void setReplaceHome ( bool replace )
- QString replacedPath ( const QString& text )
- void postProcessMatch ( QString *match )
- void postProcessMatches ( QStringList *matches )
- bool isAutoCompletion ()
- bool userCompletion (const MyURL &url, QString *match)
- bool envCompletion (const MyURL &url, QString *match)
- bool exeCompletion (const MyURL &url, QString *match)
- bool fileCompletion (const MyURL &url, QString *match)
- bool urlCompletion (const MyURL &url, QString *match)
- bool infoCompletion (const MyURL &url, QString *match)
- bool manCompletion (const MyURL &url, QString *match)
- void listDir ( const QString& dir, QStringList *matches, const QString& filter, bool only_exe, bool no_hidden )
- QString listDirectories (const QStringList &, const QString &, bool only_exe = false, bool no_hidden = false, bool stat_files = true)
- void listURLs ( const QValueList<KURL *> &urls, const QString &filter = QString::null, bool only_exe = false, bool no_hidden = false )
- void addMatches ( QStringList * )
- QString finished ()
- void init ()
- void setListedURL (int compl_type , QString dir = QString::null, QString filter = QString::null, bool no_hidden = false )
- bool isListedURL ( int compl_type , QString dir = QString::null, QString filter = QString::null, bool no_hidden = false )
Protected Methods
- KURLCompletion ()
- KURLCompletion (Mode)
- virtual ~KURLCompletion ()
- virtual QString makeCompletion (const QString&)
- virtual void setDir ( QString dir)
- virtual QString dir ()
- virtual bool isRunning ()
- virtual void stop ()
- virtual Mode mode ()
- virtual void setMode ( Mode mode )
- virtual bool replaceEnv ()
- virtual void setReplaceEnv ( bool replace )
- virtual bool replaceHome ()
- virtual void setReplaceHome ( bool replace )
- QString replacedPath ( const QString& text )
- void postProcessMatch ( QString *match )
- void postProcessMatches ( QStringList *matches )
- bool isAutoCompletion ()
- bool userCompletion (const MyURL &url, QString *match)
- bool envCompletion (const MyURL &url, QString *match)
- bool exeCompletion (const MyURL &url, QString *match)
- bool fileCompletion (const MyURL &url, QString *match)
- bool urlCompletion (const MyURL &url, QString *match)
- bool infoCompletion (const MyURL &url, QString *match)
- bool manCompletion (const MyURL &url, QString *match)
- void listDir ( const QString& dir, QStringList *matches, const QString& filter, bool only_exe, bool no_hidden )
- QString listDirectories (const QStringList &, const QString &, bool only_exe = false, bool no_hidden = false, bool stat_files = true)
- void listURLs ( const QValueList<KURL *> &urls, const QString &filter = QString::null, bool only_exe = false, bool no_hidden = false )
- void addMatches ( QStringList * )
- QString finished ()
- void init ()
- void setListedURL (int compl_type , QString dir = QString::null, QString filter = QString::null, bool no_hidden = false )
- bool isListedURL ( int compl_type , QString dir = QString::null, QString filter = QString::null, bool no_hidden = false )
Protected Slots
This class does completion of URLs including user directories (~user)
and environment variables. Remote URLs are passed to KIO.
enum Mode { ExeCompletion=1, FileCompletion };
}
|
Determines how completion is done
- ExeCompletion - executables in $PATH or with full path
- FileCompletion - all files with full path or in dir(), URLs
are listed using KIO
This overloaded constructor allows you to set the Mode to ExeCompletion
or FileCompletion without using setMode. Default is FileCompletion
[virtual]
[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.
[virtual]
Set the current directory (used as base for completion)
Default = $HOME
[virtual]
Get the current directory
[virtual]
Returns true if asyncronous completion is in progress
[virtual]
Stop asyncronous copmpletion
[virtual]
Return completion mode: exe or file completion (default FileCompletion)
void setMode ( Mode mode )
|
[virtual]
Change completion mode: exe or file completion
[virtual]
Returns whether environment variables are completed and
whether they are replaced internally while finding completions.
Default is enabled.
void setReplaceEnv ( bool replace )
|
[virtual]
Enables/disables completion and replacement (internally) of
environment variables in URLs. Default is enabled.
[virtual]
Returns whether ~username is completed and whether ~username
is replaced internally with the user's home directory while
finding completions. Default is enabled.
void setReplaceHome ( bool replace )
|
[virtual]
Enables/disables completion of ~username and replacement
(internally) of ~username with the user's home directory.
Default is enabled.
Replaces username and/or environment variables, depending on the
current settings and returns the filtered url. Only works with
local files.
void postProcessMatch ( QString *match )
|
[protected:
]
Reimplemented from KCompletion.
[protected:
]
Reimplemented from KCompletion.
[protected slots:
slot]
[protected slots:
slot]
- Version: $Id: kurlcompletion.h,v 1.12 2001/02/05 00:08:59 pfeiffer Exp $
- Author: David Smith <dsmith@algonet.se>
- Generated: marc@yogi on Tue Mar 27 13:07:59 2001, using kdoc 2.0a48.