kio Library API Documentation

kurlrequester.h

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., 59 Temple Place - Suite 330,
00016     Boston, MA 02111-1307, 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 
00054 class KURLRequester : public QHBox
00055 {
00056     Q_OBJECT
00057 
00058 public:
00062     KURLRequester( QWidget *parent=0, const char *name=0 );
00063 
00067     KURLRequester( const QString& url, QWidget *parent=0, const char *name=0 );
00076     KURLRequester( QWidget *editWidget, QWidget *parent, const char *name=0 );
00080     ~KURLRequester();
00081 
00087     QString url() const;
00088 
00095     void setShowLocalProtocol( bool b );
00096 
00103     void setMode( unsigned int m );
00104 
00109     void setFilter( const QString& filter );
00110 
00116     bool showLocalProtocol() const { return myShowLocalProt; }
00117 
00123     virtual KFileDialog * fileDialog() const;
00124 
00132     KLineEdit * lineEdit() const;
00133 
00138     KComboBox * comboBox() const;
00139 
00144     KPushButton * button() const;
00145 
00149     KURLCompletion *completionObject() const { return myCompletion; }
00150 
00162     KEditListBox::CustomEditor customEditor();
00163 
00164 public slots:
00170     void setURL( const QString& url );
00171 
00177     virtual void setCaption( const QString& caption );
00178 
00182     void clear();
00183 
00184 signals:
00185     // forwards from LineEdit
00191     void textChanged( const QString& );
00192 
00196     void returnPressed();
00197 
00202     void returnPressed( const QString& );
00203 
00215     void openFileDialog( KURLRequester * );
00216 
00221     void urlSelected( const QString& );
00222 
00223 protected:
00224     void        init();
00225 
00226     KURLCompletion *    myCompletion;
00227 
00228 
00229 private:
00230     KURLDragPushButton * myButton;
00231     bool        myShowLocalProt;
00232     mutable KFileDialog * myFileDialog;
00233 
00234 
00235 protected slots:
00240     void slotOpenDialog();
00241 
00242 private slots:
00243     void slotUpdateURL();
00244 
00245 protected:
00246     virtual void virtual_hook( int id, void* data );
00247 private:
00248     class KURLRequesterPrivate;
00249     KURLRequesterPrivate *d;
00250 };
00251 
00252 #endif // KURLREQUESTER_H
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.0.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Oct 8 12:21:32 2003 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2001