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

KIO

  • sources
  • kde-4.12
  • kdelibs
  • kio
  • kfile
kurlrequester.h
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 #ifndef KURLREQUESTER_H
20 #define KURLREQUESTER_H
21 
22 #include <kfile.h>
23 #include <kpushbutton.h>
24 #include <kurl.h>
25 #include <khbox.h>
26 
27 #ifndef KDE_NO_DEPRECATED
28 #include <keditlistbox.h>
29 #else
30 #include <keditlistwidget.h>
31 #endif
32 
33 class KComboBox;
34 class KFileDialog;
35 class KLineEdit;
36 class KUrlCompletion;
37 
38 class QString;
39 class QEvent;
40 
60 class KIO_EXPORT KUrlRequester : public KHBox
61 {
62  Q_OBJECT
63  Q_PROPERTY( KUrl url READ url WRITE setUrl NOTIFY textChanged USER true )
64  Q_PROPERTY( QString filter READ filter WRITE setFilter )
65  Q_PROPERTY( KFile::Modes mode READ mode WRITE setMode )
66  Q_PROPERTY( QString clickMessage READ clickMessage WRITE setClickMessage )
67  Q_PROPERTY(QString text READ text WRITE setText)
68  Q_PROPERTY( Qt::WindowModality fileDialogModality READ fileDialogModality WRITE setFileDialogModality )
69 
70 public:
74  explicit KUrlRequester( QWidget *parent=0);
75 
79  explicit KUrlRequester( const KUrl& url, QWidget *parent=0);
80 
87  KUrlRequester( QWidget *editWidget, QWidget *parent);
91  ~KUrlRequester();
92 
98  KUrl url() const;
99 
104  KUrl startDir() const;
105 
114  QString text() const;
115 
122  void setMode( KFile::Modes m );
123 
128  KFile::Modes mode() const;
129 
134  void setFilter( const QString& filter );
135 
140  QString filter() const;
141 
152  virtual KFileDialog * fileDialog() const;
153 
161  KLineEdit * lineEdit() const;
162 
167  KComboBox * comboBox() const;
168 
173  KPushButton * button() const;
174 
178  KUrlCompletion *completionObject() const;
179 
190 #ifndef KDE_NO_DEPRECATED
191  const KEditListBox::CustomEditor &customEditor();
192 #else
193  const KEditListWidget::CustomEditor &customEditor();
194 #endif
195 
200  QString clickMessage() const;
201 
206  void setClickMessage(const QString& msg);
207 
212  Qt::WindowModality fileDialogModality() const;
213 
219  void setFileDialogModality(Qt::WindowModality modality);
220 
221 public Q_SLOTS:
225  void setUrl( const KUrl& url );
226 
232  void setStartDir( const KUrl& startDir );
233 
242 #ifndef KDE_NO_DEPRECATED
243  KDE_DEPRECATED void setPath(const QString& path);
244 #endif
245 
255  void setText(const QString& text);
256 
260  void clear();
261 
262 Q_SIGNALS:
263  // forwards from LineEdit
268  void textChanged( const QString& );
269 
273  void returnPressed();
274 
279  void returnPressed( const QString& );
280 
292  void openFileDialog( KUrlRequester * );
293 
298  void urlSelected( const KUrl& );
299 
300 protected:
301  virtual void changeEvent (QEvent *e);
302  bool eventFilter( QObject *obj, QEvent *ev );
303 
304 private:
305  class KUrlRequesterPrivate;
306  KUrlRequesterPrivate* const d;
307 
308  Q_DISABLE_COPY(KUrlRequester)
309 
310  Q_PRIVATE_SLOT(d, void _k_slotUpdateUrl())
311  Q_PRIVATE_SLOT(d, void _k_slotOpenDialog())
312  Q_PRIVATE_SLOT(d, void _k_slotFileDialogFinished())
313 
314 };
315 
316 class KIO_EXPORT KUrlComboRequester : public KUrlRequester // krazy:exclude=dpointer (For use in Qt Designer)
317 {
318  Q_OBJECT
319 public:
323  explicit KUrlComboRequester(QWidget *parent = 0);
324 
325 private:
326  class Private;
327  Private* const d;
328 };
329 
330 #endif // KURLREQUESTER_H
keditlistbox.h
KPushButton
kurl.h
kfile.h
KUrlComboRequester
Definition: kurlrequester.h:316
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
QWidget
QString
QObject
KUrl
KEditListBox::CustomEditor
KFileDialog
Provides a user (and developer) friendly way to select files and directories.
Definition: kfiledialog.h:68
KEditListWidget::CustomEditor
clear
KAction * clear(const QObject *recvr, const char *slot, QObject *parent)
kpushbutton.h
KLineEdit
khbox.h
KComboBox
KHBox
keditlistwidget.h
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-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:03 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • 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