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

KIO

kurlrequester.h

Go to the documentation of this file.
00001 /* This file is part of the KDE libraries
00002     Copyright (C) 1999,2000,2001 Carsten Pfeiffer <pfeiffer@kde.org>
00003 
00004     library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License version 2, as published by the Free Software Foundation.
00007 
00008     This library is distributed in the hope that it will be useful,
00009     but WITHOUT ANY WARRANTY; without even the implied warranty of
00010     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011     Library General Public License for more details.
00012 
00013     You should have received a copy of the GNU Library General Public License
00014     along with this library; see the file COPYING.LIB.  If not, write to
00015     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016     Boston, MA 02110-1301, USA.
00017 */
00018 
00019 #ifndef KURLREQUESTER_H
00020 #define KURLREQUESTER_H
00021 
00022 #include <kfile.h>
00023 #include <kpushbutton.h>
00024 #include <kurl.h>
00025 #include <khbox.h>
00026 
00027 #ifndef KDE_NO_DEPRECATED
00028 #include <keditlistbox.h>
00029 #else
00030 #include <keditlistwidget.h>
00031 #endif
00032 
00033 class KComboBox;
00034 class KFileDialog;
00035 class KLineEdit;
00036 class KUrlCompletion;
00037 
00038 class QString;
00039 class QEvent;
00040 
00060 class KIO_EXPORT KUrlRequester : public KHBox
00061 {
00062     Q_OBJECT
00063     Q_PROPERTY( KUrl url READ url WRITE setUrl NOTIFY textChanged USER true )
00064     Q_PROPERTY( QString filter READ filter WRITE setFilter )
00065     Q_PROPERTY( KFile::Modes mode READ mode WRITE setMode )
00066     Q_PROPERTY( QString clickMessage READ clickMessage WRITE setClickMessage )
00067     Q_PROPERTY(QString text READ text WRITE setText)
00068     Q_PROPERTY( Qt::WindowModality fileDialogModality READ fileDialogModality WRITE setFileDialogModality )
00069 
00070 public:
00074     explicit KUrlRequester( QWidget *parent=0);
00075 
00079     explicit KUrlRequester( const KUrl& url, QWidget *parent=0);
00080 
00087     KUrlRequester( QWidget *editWidget, QWidget *parent);
00091     ~KUrlRequester();
00092 
00098     KUrl url() const;
00099 
00104     KUrl startDir() const;
00105 
00114     QString text() const;
00115 
00122     void setMode( KFile::Modes m );
00123 
00128     KFile::Modes mode() const;
00129 
00134     void setFilter( const QString& filter );
00135 
00140     QString filter() const;
00141 
00152     virtual KFileDialog * fileDialog() const;
00153 
00161     KLineEdit * lineEdit() const;
00162 
00167     KComboBox * comboBox() const;
00168 
00173     KPushButton * button() const;
00174 
00178     KUrlCompletion *completionObject() const;
00179 
00190 #ifndef KDE_NO_DEPRECATED
00191     const KEditListBox::CustomEditor &customEditor();
00192 #else
00193     const KEditListWidget::CustomEditor &customEditor();
00194 #endif
00195 
00200     QString clickMessage() const;
00201 
00206     void setClickMessage(const QString& msg);
00207 
00212     Qt::WindowModality fileDialogModality() const;
00213 
00219     void setFileDialogModality(Qt::WindowModality modality);
00220 
00221 public Q_SLOTS:
00225     void setUrl( const KUrl& url );
00226 
00232     void setStartDir( const KUrl& startDir );
00233 
00242 #ifndef KDE_NO_DEPRECATED
00243     KDE_DEPRECATED void setPath(const QString& path);
00244 #endif
00245 
00255     void setText(const QString& text);
00256 
00260     void clear();
00261 
00262 Q_SIGNALS:
00263     // forwards from LineEdit
00268     void textChanged( const QString& );
00269 
00273     void returnPressed();
00274 
00279     void returnPressed( const QString& );
00280 
00292     void openFileDialog( KUrlRequester * );
00293 
00298     void urlSelected( const KUrl& );
00299 
00300 protected:
00301     virtual void changeEvent (QEvent *e);
00302     bool eventFilter( QObject *obj, QEvent *ev );
00303 
00304 private:
00305     class KUrlRequesterPrivate;
00306     KUrlRequesterPrivate* const d;
00307 
00308     Q_DISABLE_COPY(KUrlRequester)
00309 
00310     Q_PRIVATE_SLOT(d, void _k_slotUpdateUrl())
00311     Q_PRIVATE_SLOT(d, void _k_slotOpenDialog())
00312     Q_PRIVATE_SLOT(d, void _k_slotFileDialogFinished())
00313 
00314 };
00315 
00316 class KIO_EXPORT KUrlComboRequester : public KUrlRequester // krazy:exclude=dpointer (For use in Qt Designer)
00317 {
00318     Q_OBJECT
00319 public:
00323     explicit KUrlComboRequester(QWidget *parent = 0);
00324 
00325 private:
00326     class Private;
00327     Private* const d;
00328 };
00329 
00330 #endif // KURLREQUESTER_H

KIO

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • 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
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal