• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • 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 
00020 #ifndef KURLREQUESTER_H
00021 #define KURLREQUESTER_H
00022 
00023 #include <qhbox.h>
00024 
00025 #include <keditlistbox.h>
00026 #include <kfile.h>
00027 #include <kpushbutton.h>
00028 #include <kurl.h>
00029 
00030 class KComboBox;
00031 class KFileDialog;
00032 class KLineEdit;
00033 class KURLCompletion;
00034 class KURLDragPushButton;
00035 
00036 class QString;
00037 class QTimer;
00038 
00056 class KIO_EXPORT KURLRequester : public QHBox
00057 {
00058     Q_OBJECT
00059     Q_PROPERTY( QString url READ url WRITE setURL )
00060     Q_PROPERTY( bool showLocalProtocol READ showLocalProtocol WRITE setShowLocalProtocol )
00061     Q_PROPERTY( QString filter READ filter WRITE setFilter )
00062     Q_PROPERTY( uint mode READ mode WRITE setMode )
00063 
00064 public:
00068     KURLRequester( QWidget *parent=0, const char *name=0 );
00069 
00074     KURLRequester( const QString& url, QWidget *parent=0, const char *name=0 );
00075 
00082     KURLRequester( QWidget *editWidget, QWidget *parent, const char *name=0 );
00086     ~KURLRequester();
00087 
00094     QString url() const;
00095 
00102     void setShowLocalProtocol( bool b );
00103 
00110     void setMode( uint m );
00111 
00117     uint mode() const;
00118 
00119 
00124     void setFilter( const QString& filter );
00125 
00131     QString filter() const;
00132 
00138     bool showLocalProtocol() const { return myShowLocalProt; }
00139     // ## KDE4: there's no reason to keep this, it should always be false
00140 
00149     virtual KFileDialog * fileDialog() const;
00150 
00158     KLineEdit * lineEdit() const;
00159 
00164     KComboBox * comboBox() const;
00165 
00170     KPushButton * button() const;
00171 
00175     KURLCompletion *completionObject() const { return myCompletion; }
00176 
00188     KEditListBox::CustomEditor customEditor();
00189 
00190 public slots:
00197     void setURL( const QString& url );
00198 
00204     void setKURL( const KURL& url );
00205 
00210     virtual void setCaption( const QString& caption );
00211 
00215     void clear();
00216 
00217 signals:
00218     // forwards from LineEdit
00224     void textChanged( const QString& );
00225 
00229     void returnPressed();
00230 
00235     void returnPressed( const QString& );
00236 
00248     void openFileDialog( KURLRequester * );
00249 
00255     void urlSelected( const QString& );
00256 
00257 protected:
00258     void        init();
00259 
00260     KURLCompletion *    myCompletion;
00261 
00262 
00263 private:
00264     KURLDragPushButton * myButton;
00265     bool        myShowLocalProt;
00266     mutable KFileDialog * myFileDialog;
00267 
00268 
00269 protected slots:
00274     void slotOpenDialog();
00275 
00276 private slots:
00277     void slotUpdateURL();
00278 
00279 protected:
00280     virtual void virtual_hook( int id, void* data );
00281     bool eventFilter( QObject *obj, QEvent *ev );
00282 private:
00283     class KURLRequesterPrivate;
00284     KURLRequesterPrivate *d;
00285 };
00286 
00290 class KIO_EXPORT KURLComboRequester : public KURLRequester
00291 {
00292     Q_OBJECT
00293 public:
00297     KURLComboRequester( QWidget *parent=0, const char *name=0 );
00298 };
00299 
00300 
00301 #endif // KURLREQUESTER_H

kio

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

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
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