• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KIO

  • sources
  • kde-4.14
  • kdelibs
  • kio
  • kio
kurlcompletion.h
Go to the documentation of this file.
1 /* This file is part of the KDE libraries
2  Copyright (C) 2000 David Smith <dsmith@algonet.se>
3 
4  This class was inspired by a previous KUrlCompletion by
5  Henner Zeller <zeller@think.de>
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Library General Public
9  License as published by the Free Software Foundation; either
10  version 2 of the License, or (at your option) any later version.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Library General Public License for more details.
16 
17  You should have received a copy of the GNU Library General Public License
18  along with this library; see the file COPYING.LIB. If not, write to
19  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  Boston, MA 02110-1301, USA.
21 */
22 
23 #ifndef KURLCOMPLETION_H
24 #define KURLCOMPLETION_H
25 
26 #include <kcompletion.h>
27 #include <kio/jobclasses.h>
28 #include <QtCore/QString>
29 
30 class QStringList;
31 class KUrl;
32 class KUrlCompletionPrivate;
33 
41 class KIO_EXPORT KUrlCompletion : public KCompletion
42 {
43  Q_OBJECT
44 
45 public:
53  enum Mode { ExeCompletion = 1, FileCompletion, DirCompletion };
54 
58  KUrlCompletion();
63  KUrlCompletion(Mode);
67  virtual ~KUrlCompletion();
68 
82  virtual QString makeCompletion(const QString& text);
83 
89  virtual void setDir(const QString& dir);
90 
95  virtual QString dir() const;
96 
101  virtual bool isRunning() const;
102 
106  virtual void stop();
107 
112  virtual Mode mode() const;
113 
118  virtual void setMode(Mode mode);
119 
126  virtual bool replaceEnv() const;
127 
133  virtual void setReplaceEnv(bool replace);
134 
141  virtual bool replaceHome() const;
142 
149  virtual void setReplaceHome(bool replace);
150 
160  QString replacedPath(const QString& text) const;
161 
165  static QString replacedPath(const QString& text,
166  bool replaceHome, bool replaceEnv = true);
167 
168 protected:
169  // Called by KCompletion, adds '/' to directories
170  void postProcessMatch(QString* match) const;
171  void postProcessMatches(QStringList* matches) const;
172  void postProcessMatches(KCompletionMatches* matches) const;
173 
174  virtual void customEvent(QEvent* e);
175 
176 private:
177  KUrlCompletionPrivate* const d;
178 
179  Q_PRIVATE_SLOT(d, void _k_slotEntries (KIO::Job*, const KIO::UDSEntryList&))
180  Q_PRIVATE_SLOT(d, void _k_slotIOFinished (KJob*))
181 };
182 
183 #endif // KURLCOMPLETION_H
KCompletion::postProcessMatches
virtual void postProcessMatches(QStringList *pMatches) const
QEvent
KUrlCompletion::Mode
Mode
Determines how completion is done.
Definition: kurlcompletion.h:53
KImageIO::Mode
Mode
Possible image file access modes.
Definition: kimageio.h:53
KUrl
KCompletion::postProcessMatch
virtual void postProcessMatch(QString *pMatch) const
KCompletion
QString
QList< UDSEntry >
KCompletionMatches
QStringList
kcompletion.h
QObject::customEvent
virtual void customEvent(QEvent *event)
KCompletion::makeCompletion
virtual QString makeCompletion(const QString &string)
KRecentDirs::dir
QString dir(const QString &fileClass)
Returns the most recently used directory accociated with this file-class.
Definition: krecentdirs.cpp:68
jobclasses.h
stop
KGuiItem stop()
KIO::Job
The base class for all jobs.
Definition: jobclasses.h:94
KJob
KUrlCompletion
This class does completion of URLs including user directories (~user) and environment variables...
Definition: kurlcompletion.h:41
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal