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 KURLRequester :
public QHBox
00057 {
00058 Q_OBJECT
00059 Q_PROPERTY(
QString url READ url WRITE
setURL )
00060
00061
public:
00065
KURLRequester(
QWidget *parent=0,
const char *name=0 );
00066
00070
KURLRequester(
const QString& url,
QWidget *parent=0,
const char *name=0 );
00071
00080
KURLRequester(
QWidget *editWidget,
QWidget *parent,
const char *name=0 );
00084
~KURLRequester();
00085
00091
QString url()
const;
00092
00099
void setShowLocalProtocol(
bool b );
00100
00107
void setMode(
unsigned int m );
00108
00113
void setFilter(
const QString& filter );
00114
00120 bool showLocalProtocol()
const {
return myShowLocalProt; }
00121
00127
virtual KFileDialog *
fileDialog() const;
00128
00136
KLineEdit * lineEdit() const;
00137
00142
KComboBox * comboBox() const;
00143
00148
KPushButton * button() const;
00149
00153 KURLCompletion *completionObject()
const {
return myCompletion; }
00154
00166
KEditListBox::CustomEditor customEditor();
00167
00168
public slots:
00174
void setURL(
const QString& url );
00175
00180
virtual void setCaption(
const QString& caption );
00181
00185
void clear();
00186
00187 signals:
00188
00194
void textChanged(
const QString& );
00195
00199
void returnPressed();
00200
00205
void returnPressed(
const QString& );
00206
00218
void openFileDialog(
KURLRequester * );
00219
00224
void urlSelected(
const QString& );
00225
00226
protected:
00227
void init();
00228
00229
KURLCompletion * myCompletion;
00230
00231
00232
private:
00233 KURLDragPushButton * myButton;
00234
bool myShowLocalProt;
00235
mutable KFileDialog * myFileDialog;
00236
00237
00238
protected slots:
00243
void slotOpenDialog();
00244
00245
private slots:
00246
void slotUpdateURL();
00247
00248
protected:
00249
virtual void virtual_hook(
int id,
void* data );
00250
private:
00251
class KURLRequesterPrivate;
00252 KURLRequesterPrivate *d;
00253 };
00254
00255
class KURLComboRequester :
public KURLRequester
00256 {
00257 Q_OBJECT
00258
public:
00262 KURLComboRequester(
QWidget *parent=0,
const char *name=0 );
00263 };
00264
00265
00266
#endif // KURLREQUESTER_H