00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
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 Q_PROPERTY( QString url READ url WRITE setURL )
00058
00059 public:
00063 KURLRequester( QWidget *parent=0, const char *name=0 );
00064
00068 KURLRequester( const QString& url, QWidget *parent=0, const char *name=0 );
00077 KURLRequester( QWidget *editWidget, QWidget *parent, const char *name=0 );
00081 ~KURLRequester();
00082
00088 QString url() const;
00089
00096 void setShowLocalProtocol( bool b );
00097
00104 void setMode( unsigned int m );
00105
00110 void setFilter( const QString& filter );
00111
00117 bool showLocalProtocol() const { return myShowLocalProt; }
00118
00124 virtual KFileDialog * fileDialog() const;
00125
00133 KLineEdit * lineEdit() const;
00134
00139 KComboBox * comboBox() const;
00140
00145 KPushButton * button() const;
00146
00150 KURLCompletion *completionObject() const { return myCompletion; }
00151
00163 KEditListBox::CustomEditor customEditor();
00164
00165 public slots:
00171 void setURL( const QString& url );
00172
00178 virtual void setCaption( const QString& caption );
00179
00183 void clear();
00184
00185 signals:
00186
00192 void textChanged( const QString& );
00193
00197 void returnPressed();
00198
00203 void returnPressed( const QString& );
00204
00216 void openFileDialog( KURLRequester * );
00217
00222 void urlSelected( const QString& );
00223
00224 protected:
00225 void init();
00226
00227 KURLCompletion * myCompletion;
00228
00229
00230 private:
00231 KURLDragPushButton * myButton;
00232 bool myShowLocalProt;
00233 mutable KFileDialog * myFileDialog;
00234
00235
00236 protected slots:
00241 void slotOpenDialog();
00242
00243 private slots:
00244 void slotUpdateURL();
00245
00246 protected:
00247 virtual void virtual_hook( int id, void* data );
00248 private:
00249 class KURLRequesterPrivate;
00250 KURLRequesterPrivate *d;
00251 };
00252
00253 #endif // KURLREQUESTER_H