kurlrequester.h
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
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
00148 virtual KFileDialog * fileDialog() const;
00149
00157 KLineEdit * lineEdit() const;
00158
00163 KComboBox * comboBox() const;
00164
00169 KPushButton * button() const;
00170
00174 KURLCompletion *completionObject() const { return myCompletion; }
00175
00187 KEditListBox::CustomEditor customEditor();
00188
00189 public slots:
00196 void setURL( const QString& url );
00197
00202 virtual void setCaption( const QString& caption );
00203
00207 void clear();
00208
00209 signals:
00210
00216 void textChanged( const QString& );
00217
00221 void returnPressed();
00222
00227 void returnPressed( const QString& );
00228
00240 void openFileDialog( KURLRequester * );
00241
00247 void urlSelected( const QString& );
00248
00249 protected:
00250 void init();
00251
00252 KURLCompletion * myCompletion;
00253
00254
00255 private:
00256 KURLDragPushButton * myButton;
00257 bool myShowLocalProt;
00258 mutable KFileDialog * myFileDialog;
00259
00260
00261 protected slots:
00266 void slotOpenDialog();
00267
00268 private slots:
00269 void slotUpdateURL();
00270
00271 protected:
00272 virtual void virtual_hook( int id, void* data );
00273 private:
00274 class KURLRequesterPrivate;
00275 KURLRequesterPrivate *d;
00276 };
00277
00278 class KIO_EXPORT KURLComboRequester : public KURLRequester
00279 {
00280 Q_OBJECT
00281 public:
00285 KURLComboRequester( QWidget *parent=0, const char *name=0 );
00286 };
00287
00288
00289 #endif // KURLREQUESTER_H
This file is part of the documentation for kio Library Version 3.3.90.