• 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
  • kfile
kurlrequester.cpp
Go to the documentation of this file.
1 /* This file is part of the KDE libraries
2  Copyright (C) 1999,2000,2001 Carsten Pfeiffer <pfeiffer@kde.org>
3 
4  library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2, as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 
19 #include "kurlrequester.h"
20 
21 #include <kcombobox.h>
22 #include <kfiledialog.h>
23 #include <klineedit.h>
24 #include <klocale.h>
25 #include <kurlcompletion.h>
26 #include <kprotocolmanager.h>
27 #include <khbox.h>
28 #include <kstandardshortcut.h>
29 #include <kdebug.h>
30 
31 #include <QEvent>
32 #include <QDrag>
33 #include <QMimeData>
34 #include <QAction>
35 #include <QApplication>
36 #include <QDir>
37 
38 class KUrlDragPushButton : public KPushButton
39 {
40 public:
41  KUrlDragPushButton( QWidget *parent)
42  : KPushButton( parent)
43  {
44  setDragEnabled( true );
45  }
46  ~KUrlDragPushButton() {}
47 
48  void setURL( const KUrl& url )
49  {
50  m_urls.clear();
51  m_urls.append( url );
52  }
53 
54 protected:
55  virtual QDrag *dragObject()
56  {
57  if (m_urls.isEmpty())
58  return 0;
59 
60  QDrag *drag = new QDrag(this);
61  QMimeData *mimeData = new QMimeData;
62  m_urls.populateMimeData(mimeData);
63  drag->setMimeData(mimeData);
64  return drag;
65  }
66 
67 private:
68  KUrl::List m_urls;
69 
70 };
71 
72 
73 class KUrlRequester::KUrlRequesterPrivate
74 {
75 public:
76  KUrlRequesterPrivate(KUrlRequester *parent)
77  : m_parent(parent),
78  edit(0),
79  combo(0),
80  fileDialogMode(KFile::File | KFile::ExistingOnly | KFile::LocalOnly)
81  {
82  }
83 
84  ~KUrlRequesterPrivate()
85  {
86  delete myCompletion;
87  delete myFileDialog;
88  }
89 
90  void init();
91 
92  void setText( const QString& text ) {
93  if ( combo )
94  {
95  if (combo->isEditable())
96  {
97  combo->setEditText( text );
98  }
99  else
100  {
101  int i = combo->findText( text );
102  if ( i == -1 )
103  {
104  combo->addItem( text );
105  combo->setCurrentIndex( combo->count()-1 );
106  }
107  else
108  {
109  combo->setCurrentIndex( i );
110  }
111  }
112  }
113  else
114  {
115  edit->setText( text );
116  }
117  }
118 
119  void connectSignals( QObject *receiver )
120  {
121  QObject *sender;
122  if ( combo )
123  sender = combo;
124  else
125  sender = edit;
126 
127  if (combo )
128  connect( sender, SIGNAL(editTextChanged(QString)),
129  receiver, SIGNAL(textChanged(QString)));
130  else
131  connect( sender, SIGNAL(textChanged(QString)),
132  receiver, SIGNAL(textChanged(QString)));
133 
134  connect( sender, SIGNAL(returnPressed()),
135  receiver, SIGNAL(returnPressed()));
136  connect( sender, SIGNAL(returnPressed(QString)),
137  receiver, SIGNAL(returnPressed(QString)));
138  }
139 
140  void setCompletionObject( KCompletion *comp )
141  {
142  if ( combo )
143  combo->setCompletionObject( comp );
144  else
145  edit->setCompletionObject( comp );
146  }
147 
148  void updateCompletionStartDir( const KUrl &newStartDir )
149  {
150  if ( newStartDir.isLocalFile() )
151  myCompletion->setDir(newStartDir.toLocalFile());
152  }
153 
154  QString text() const {
155  return combo ? combo->currentText() : edit->text();
156  }
157 
162  KUrl url() const {
163  const QString txt = text();
164  KUrlCompletion *comp;
165  if ( combo )
166  comp = qobject_cast<KUrlCompletion*>(combo->completionObject());
167  else
168  comp = qobject_cast<KUrlCompletion*>(edit->completionObject());
169 
170  KUrl enteredPath;
171  KUrl baseDir(m_startDir);
172  if ( comp )
173  enteredPath = KUrl( comp->replacedPath( txt ) );
174  else
175  enteredPath = KUrl( txt );
176 
177  if ( enteredPath.isRelative() && !txt.isEmpty() ) {
178  baseDir.addPath(enteredPath.path());
179  return baseDir;
180  } else {
181  return enteredPath;
182  }
183  }
184 
185  // slots
186  void _k_slotUpdateUrl();
187  void _k_slotOpenDialog();
188  void _k_slotFileDialogFinished();
189 
190  KUrl m_startDir;
191  bool m_startDirCustomized;
192  KUrlRequester *m_parent;
193  KLineEdit *edit;
194  KComboBox *combo;
195  KFile::Modes fileDialogMode;
196  QString fileDialogFilter;
197 #ifndef KDE_NO_DEPRECATED
198  KEditListBox::CustomEditor editor;
199 #else
200  KEditListWidget::CustomEditor editor;
201 #endif
202  KUrlDragPushButton *myButton;
203  KFileDialog *myFileDialog;
204  KUrlCompletion *myCompletion;
205  Qt::WindowModality fileDialogModality;
206 };
207 
208 
209 
210 KUrlRequester::KUrlRequester( QWidget *editWidget, QWidget *parent)
211  : KHBox( parent),d(new KUrlRequesterPrivate(this))
212 {
213  // must have this as parent
214  editWidget->setParent( this );
215  d->combo = qobject_cast<KComboBox*>( editWidget );
216  d->edit = qobject_cast<KLineEdit*>( editWidget );
217  if ( d->edit ) {
218  d->edit->setClearButtonShown( true );
219  }
220 
221  d->init();
222 }
223 
224 
225 KUrlRequester::KUrlRequester( QWidget *parent)
226  : KHBox( parent),d(new KUrlRequesterPrivate(this))
227 {
228  d->init();
229 }
230 
231 
232 KUrlRequester::KUrlRequester( const KUrl& url, QWidget *parent)
233  : KHBox( parent),d(new KUrlRequesterPrivate(this))
234 {
235  d->init();
236  setUrl( url );
237 }
238 
239 KUrlRequester::~KUrlRequester()
240 {
241  delete d;
242 }
243 
244 
245 void KUrlRequester::KUrlRequesterPrivate::init()
246 {
247  m_parent->setMargin(0);
248  m_parent->setSpacing(-1); // use default spacing
249 
250  myFileDialog = 0L;
251  fileDialogModality = Qt::ApplicationModal;
252 
253  if ( !combo && !edit ) {
254  edit = new KLineEdit( m_parent );
255  edit->setClearButtonShown( true );
256  }
257 
258  QWidget *widget = combo ? (QWidget*) combo : (QWidget*) edit;
259 
260  myButton = new KUrlDragPushButton(m_parent);
261  myButton->setIcon(KIcon("document-open"));
262  int buttonSize = myButton->sizeHint().expandedTo(widget->sizeHint()).height();
263  myButton->setFixedSize(buttonSize, buttonSize);
264  myButton->setToolTip(i18n("Open file dialog"));
265 
266  m_parent->connect(myButton, SIGNAL(pressed()), SLOT(_k_slotUpdateUrl()));
267 
268  widget->installEventFilter( m_parent );
269  m_parent->setFocusProxy( widget );
270  m_parent->setFocusPolicy(Qt::StrongFocus);
271 
272  connectSignals( m_parent );
273  m_parent->connect(myButton, SIGNAL(clicked()), m_parent, SLOT(_k_slotOpenDialog()));
274 
275  m_startDir = KUrl::fromPath(QDir::currentPath());
276  m_startDirCustomized = false;
277 
278  myCompletion = new KUrlCompletion();
279  updateCompletionStartDir(m_startDir);
280  setCompletionObject( myCompletion );
281 
282  QAction* openAction = new QAction(m_parent);
283  openAction->setShortcut(KStandardShortcut::Open);
284  m_parent->connect(openAction, SIGNAL(triggered(bool)), SLOT(_k_slotOpenDialog()));
285 }
286 
287 void KUrlRequester::setUrl( const KUrl& url )
288 {
289  d->setText( url.pathOrUrl() );
290 }
291 
292 #ifndef KDE_NO_DEPRECATED
293 void KUrlRequester::setPath( const QString& path )
294 {
295  d->setText( path );
296 }
297 #endif
298 
299 void KUrlRequester::setText(const QString& text)
300 {
301  d->setText(text);
302 }
303 
304 void KUrlRequester::setStartDir(const KUrl& startDir)
305 {
306  d->m_startDir = startDir;
307  d->m_startDirCustomized = true;
308  d->updateCompletionStartDir(startDir);
309 }
310 
311 void KUrlRequester::changeEvent(QEvent *e)
312 {
313  if (e->type()==QEvent::WindowTitleChange) {
314  if (d->myFileDialog) {
315  d->myFileDialog->setCaption(windowTitle());
316  }
317  }
318  KHBox::changeEvent(e);
319 }
320 
321 KUrl KUrlRequester::url() const
322 {
323  return d->url();
324 }
325 
326 KUrl KUrlRequester::startDir() const
327 {
328  return d->m_startDir;
329 }
330 
331 QString KUrlRequester::text() const
332 {
333  return d->text();
334 }
335 
336 void KUrlRequester::KUrlRequesterPrivate::_k_slotOpenDialog()
337 {
338  if ( myFileDialog )
339  if ( myFileDialog->isVisible() )
340  {
341  //The file dialog is already being shown, raise it and exit
342  myFileDialog->raise();
343  myFileDialog->activateWindow();
344  return;
345  }
346 
347  if ( ((fileDialogMode & KFile::Directory) && !(fileDialogMode & KFile::File)) ||
348  /* catch possible fileDialog()->setMode( KFile::Directory ) changes */
349  (myFileDialog && (myFileDialog->mode() & KFile::Directory) &&
350  (myFileDialog->mode() & (KFile::File | KFile::Files)) == 0) )
351  {
352  const KUrl openUrl = (!m_parent->url().isEmpty() && !m_parent->url().isRelative() )
353  ? m_parent->url() : m_startDir;
354 
355  /* FIXME We need a new abstract interface for using KDirSelectDialog in a non-modal way */
356 
357  KUrl newurl;
358  if (fileDialogMode & KFile::LocalOnly)
359  newurl = KFileDialog::getExistingDirectory( openUrl, m_parent);
360  else
361  newurl = KFileDialog::getExistingDirectoryUrl( openUrl, m_parent);
362 
363  if ( newurl.isValid() )
364  {
365  m_parent->setUrl( newurl );
366  emit m_parent->urlSelected( url() );
367  }
368  }
369  else
370  {
371  emit m_parent->openFileDialog( m_parent );
372 
373  //Creates the fileDialog if it doesn't exist yet
374  KFileDialog *dlg = m_parent->fileDialog();
375 
376  if ( !url().isEmpty() && !url().isRelative() ) {
377  KUrl u( url() );
378  // If we won't be able to list it (e.g. http), then don't try :)
379  if ( KProtocolManager::supportsListing( u ) )
380  dlg->setSelection( u.url() );
381  } else {
382  dlg->setUrl(m_startDir);
383  }
384 
385  //Update the file dialog window modality
386  if ( dlg->windowModality() != fileDialogModality )
387  dlg->setWindowModality(fileDialogModality);
388 
389  if ( fileDialogModality == Qt::NonModal )
390  {
391  dlg->show();
392  } else {
393  dlg->exec();
394  }
395  }
396 }
397 
398 void KUrlRequester::KUrlRequesterPrivate::_k_slotFileDialogFinished()
399 {
400  if ( !myFileDialog )
401  return;
402 
403  if ( myFileDialog->result() == QDialog::Accepted )
404  {
405  KUrl newUrl = myFileDialog->selectedUrl();
406  if ( newUrl.isValid() )
407  {
408  m_parent->setUrl( newUrl );
409  emit m_parent->urlSelected( url() );
410  // remember url as defaultStartDir and update startdir for autocompletion
411  if ( newUrl.isLocalFile() && !m_startDirCustomized ) {
412  m_startDir = newUrl;
413  m_startDir.setPath(m_startDir.directory());
414  updateCompletionStartDir(m_startDir);
415  }
416  }
417  }
418 }
419 
420 void KUrlRequester::setMode( KFile::Modes mode)
421 {
422  Q_ASSERT( (mode & KFile::Files) == 0 );
423  d->fileDialogMode = mode;
424  if ( (mode & KFile::Directory) && !(mode & KFile::File) )
425  d->myCompletion->setMode( KUrlCompletion::DirCompletion );
426 
427  if (d->myFileDialog) {
428  d->myFileDialog->setMode(d->fileDialogMode);
429  }
430 }
431 
432 KFile::Modes KUrlRequester::mode() const
433 {
434  return d->fileDialogMode;
435 }
436 
437 void KUrlRequester::setFilter(const QString &filter)
438 {
439  d->fileDialogFilter = filter;
440  if (d->myFileDialog) {
441  d->myFileDialog->setFilter(d->fileDialogFilter);
442  }
443 }
444 
445 QString KUrlRequester::filter( ) const
446 {
447  return d->fileDialogFilter;
448 }
449 
450 KFileDialog * KUrlRequester::fileDialog() const
451 {
452  if (!d->myFileDialog) {
453  QWidget *p = parentWidget();
454  d->myFileDialog = new KFileDialog(QString(), d->fileDialogFilter, p);
455  d->myFileDialog->setMode(d->fileDialogMode);
456  d->myFileDialog->setCaption(windowTitle());
457  d->myFileDialog->setWindowModality(d->fileDialogModality);
458  connect(d->myFileDialog, SIGNAL(finished()), SLOT(_k_slotFileDialogFinished()));
459  }
460 
461  return d->myFileDialog;
462 }
463 
464 void KUrlRequester::clear()
465 {
466  d->setText( QString() );
467 }
468 
469 KLineEdit * KUrlRequester::lineEdit() const
470 {
471  return d->edit;
472 }
473 
474 KComboBox * KUrlRequester::comboBox() const
475 {
476  return d->combo;
477 }
478 
479 void KUrlRequester::KUrlRequesterPrivate::_k_slotUpdateUrl()
480 {
481  KUrl u( KUrl::fromPath( QDir::currentPath() + '/' ), url().url() );
482  myButton->setURL( u );
483 }
484 
485 bool KUrlRequester::eventFilter( QObject *obj, QEvent *ev )
486 {
487  if ( ( d->edit == obj ) || ( d->combo == obj ) )
488  {
489  if (( ev->type() == QEvent::FocusIn ) || ( ev->type() == QEvent::FocusOut ))
490  // Forward focusin/focusout events to the urlrequester; needed by file form element in khtml
491  QApplication::sendEvent( this, ev );
492  }
493  return QWidget::eventFilter( obj, ev );
494 }
495 
496 KPushButton * KUrlRequester::button() const
497 {
498  return d->myButton;
499 }
500 
501 KUrlCompletion *KUrlRequester::completionObject() const
502 {
503  return d->myCompletion;
504 }
505 
506 void KUrlRequester::setClickMessage(const QString& msg)
507 {
508  if(d->edit)
509  d->edit->setClickMessage(msg);
510 }
511 
512 QString KUrlRequester::clickMessage() const
513 {
514  if(d->edit)
515  return d->edit->clickMessage();
516  else
517  return QString();
518 }
519 
520 Qt::WindowModality KUrlRequester::fileDialogModality() const
521 {
522  return d->fileDialogModality;
523 }
524 
525 void KUrlRequester::setFileDialogModality(Qt::WindowModality modality)
526 {
527  d->fileDialogModality = modality;
528 }
529 
530 #ifndef KDE_NO_DEPRECATED
531 const KEditListBox::CustomEditor &KUrlRequester::customEditor()
532 #else
533 const KEditListWidget::CustomEditor &KUrlRequester::customEditor()
534 #endif
535 {
536  setSizePolicy(QSizePolicy( QSizePolicy::Preferred,
537  QSizePolicy::Fixed));
538 
539  KLineEdit *edit = d->edit;
540  if ( !edit && d->combo )
541  edit = qobject_cast<KLineEdit*>( d->combo->lineEdit() );
542 
543 #ifndef NDEBUG
544  if ( !edit ) {
545  kWarning() << "KUrlRequester's lineedit is not a KLineEdit!??\n";
546  }
547 #endif
548 
549  d->editor.setRepresentationWidget(this);
550  d->editor.setLineEdit(edit);
551  return d->editor;
552 }
553 
554 KUrlComboRequester::KUrlComboRequester( QWidget *parent)
555  : KUrlRequester( new KComboBox(false), parent), d(0)
556 {
557 }
558 
559 #include "kurlrequester.moc"
KUrlRequester::url
KUrl url() const
KUrlRequester::returnPressed
void returnPressed()
Emitted when return or enter was pressed in the lineedit.
KUrlRequester::setFilter
void setFilter(const QString &filter)
Sets the filter for the file dialog.
Definition: kurlrequester.cpp:437
kcombobox.h
KPushButton
QEvent
QWidget
QEvent::type
Type type() const
kdebug.h
KUrlRequester::startDir
KUrl startDir() const
Definition: kurlrequester.cpp:326
QDrag::setMimeData
void setMimeData(QMimeData *data)
QWidget::windowModality
windowModality
KFile::Directory
Definition: kfile.h:46
KUrlRequester::fileDialog
virtual KFileDialog * fileDialog() const
Definition: kurlrequester.cpp:450
KUrlRequester::text
QString text() const
QObject::sender
QObject * sender() const
kfiledialog.h
KUrlRequester
This class is a widget showing a lineedit and a button, which invokes a filedialog.
Definition: kurlrequester.h:60
KFile
KFile is a class which provides a namespace for some enumerated values associated with the kfile libr...
Definition: kfile.h:31
KUrlRequester::setMode
void setMode(KFile::Modes m)
Sets the mode of the file dialog.
Definition: kurlrequester.cpp:420
QSizePolicy
kurlrequester.h
KFile::Files
Definition: kfile.h:47
KUrl::fromPath
static KUrl fromPath(const QString &text)
KUrlRequester::mode
KFile::Modes mode() const
Returns the current mode.
KFileDialog::getExistingDirectoryUrl
static KUrl getExistingDirectoryUrl(const KUrl &startDir=KUrl(), QWidget *parent=0, const QString &caption=QString())
Creates a modal directory-selection dialog and returns the selected directory or an empty string if n...
Definition: kfiledialog.cpp:617
KUrl::toLocalFile
QString toLocalFile(AdjustPathOption trailing=LeaveTrailingSlash) const
QDir::currentPath
QString currentPath()
KFile::File
Definition: kfile.h:45
klocale.h
KUrlRequester::setClickMessage
void setClickMessage(const QString &msg)
Set a click message msg.
Definition: kurlrequester.cpp:506
KUrlRequester::setUrl
void setUrl(const KUrl &url)
Sets the url in the lineedit to url.
Definition: kurlrequester.cpp:287
QWidget::setParent
void setParent(QWidget *parent)
QMimeData
KUrl
KEditListBox::CustomEditor
KFileDialog
Provides a user (and developer) friendly way to select files and directories.
Definition: kfiledialog.h:68
kprotocolmanager.h
KUrl::setPath
void setPath(const QString &path)
KUrlRequester::button
KPushButton * button() const
Definition: kurlrequester.cpp:496
KUrlRequester::setPath
void setPath(const QString &path)
Sets the url in the lineedit to KUrl::fromPath(path).
Definition: kurlrequester.cpp:293
KUrlRequester::filter
QString filter() const
Returns the current filter for the file dialog.
QUrl::setUrl
void setUrl(const QString &url)
KUrlRequester::eventFilter
bool eventFilter(QObject *obj, QEvent *ev)
Definition: kurlrequester.cpp:485
KUrlRequester::fileDialogModality
Qt::WindowModality fileDialogModality() const
KEditListWidget::CustomEditor
QObject
KUrlRequester::customEditor
const KEditListBox::CustomEditor & customEditor()
Definition: kurlrequester.cpp:531
KIO::open
FileJob * open(const KUrl &url, QIODevice::OpenMode mode)
Open ( random access I/O )
Definition: filejob.cpp:211
KFileDialog::setUrl
void setUrl(const KUrl &url, bool clearforward=true)
Sets the directory to view.
Definition: kfiledialog.cpp:444
QDrag
QString::isEmpty
bool isEmpty() const
KUrlRequester::setStartDir
void setStartDir(const KUrl &startDir)
Sets the start dir startDir.
Definition: kurlrequester.cpp:304
KCompletion
QCoreApplication::sendEvent
bool sendEvent(QObject *receiver, QEvent *event)
QFrame::changeEvent
virtual void changeEvent(QEvent *ev)
KUrlRequester::~KUrlRequester
~KUrlRequester()
Destructs the KUrlRequester.
Definition: kurlrequester.cpp:239
KIcon
KUrlComboRequester::KUrlComboRequester
KUrlComboRequester(QWidget *parent=0)
Constructs a KUrlRequester widget with a combobox.
Definition: kurlrequester.cpp:554
QObject::eventFilter
virtual bool eventFilter(QObject *watched, QEvent *event)
QString
KUrl::path
QString path(AdjustPathOption trailing=LeaveTrailingSlash) const
KFileDialog::exec
int exec()
Definition: kfiledialog.cpp:965
KUrlRequester::comboBox
KComboBox * comboBox() const
Definition: kurlrequester.cpp:474
KUrlRequester::KUrlRequester
KUrlRequester(QWidget *parent=0)
Constructs a KUrlRequester widget.
Definition: kurlrequester.cpp:225
kstandardshortcut.h
KUrlRequester::setFileDialogModality
void setFileDialogModality(Qt::WindowModality modality)
Set the window modality for the file dialog to modality Directory selection dialogs are always modal...
Definition: kurlrequester.cpp:525
KUrlCompletion::DirCompletion
Definition: kurlcompletion.h:53
KPushButton::setDragEnabled
void setDragEnabled(bool enable)
QDir
KUrl::List
KFile::LocalOnly
Definition: kfile.h:49
KLineEdit
QUrl::isValid
bool isValid() const
KFileDialog::getExistingDirectory
static QString getExistingDirectory(const KUrl &startDir=KUrl(), QWidget *parent=0, const QString &caption=QString())
Creates a modal directory-selection dialog and returns the selected directory (local only) or an empt...
Definition: kfiledialog.cpp:630
KPushButton::dragObject
virtual QDrag * dragObject()
KUrlRequester::clear
void clear()
Clears the lineedit/combobox.
Definition: kurlrequester.cpp:464
KUrlRequester::textChanged
void textChanged(const QString &)
Emitted when the text in the lineedit changes.
QUrl::isRelative
bool isRelative() const
QWidget::parentWidget
QWidget * parentWidget() const
QWidget::windowTitle
QString windowTitle() const
QAction
khbox.h
KUrlRequester::completionObject
KUrlCompletion * completionObject() const
Definition: kurlrequester.cpp:501
KComboBox
kWarning
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
klineedit.h
KHBox
KUrl::url
QString url(AdjustPathOption trailing=LeaveTrailingSlash) const
QWidget::show
void show()
KProtocolManager::supportsListing
static bool supportsListing(const KUrl &url)
Returns whether the protocol can list files/objects.
Definition: kprotocolmanager.cpp:1032
KUrlRequester::changeEvent
virtual void changeEvent(QEvent *e)
Definition: kurlrequester.cpp:311
KUrl::isLocalFile
bool isLocalFile() const
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QObject::parent
QObject * parent() const
KUrlRequester::setText
void setText(const QString &text)
Sets the current text in the lineedit or combobox.
Definition: kurlrequester.cpp:299
KUrlCompletion
This class does completion of URLs including user directories (~user) and environment variables...
Definition: kurlcompletion.h:41
KUrlRequester::lineEdit
KLineEdit * lineEdit() const
Definition: kurlrequester.cpp:469
KUrlRequester::clickMessage
QString clickMessage() const
kurlcompletion.h
KFileDialog::setSelection
void setSelection(const QString &name)
Sets the file name to preselect to name.
Definition: kfiledialog.cpp:454
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