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

KIO

  • 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
30class QStringList;
31class KUrl;
32class KUrlCompletionPrivate;
33
41class KIO_EXPORT KUrlCompletion : public KCompletion
42{
43 Q_OBJECT
44
45public:
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
168protected:
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
176private:
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
KCompletionMatches
KCompletion
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:42
KUrlCompletion::Mode
Mode
Determines how completion is done.
Definition: kurlcompletion.h:53
KUrl
QList< UDSEntry >
jobclasses.h
kcompletion.h
stop
KGuiItem stop()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
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