kurlrequester.h
/* This file is part of the KDE libraries
Copyright (C) 1999,2000,2001 Carsten Pfeiffer <pfeiffer@kde.org>
library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2, as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KURLREQUESTER_H
#define KURLREQUESTER_H
#include <qhbox.h>
#include <keditlistbox.h>
#include <kfile.h>
#include <kpushbutton.h>
#include <kurl.h>
class KComboBox;
class KFileDialog;
class KLineEdit;
class KURLCompletion;
class KURLDragPushButton;
class QString;
class QTimer;
class KIO_EXPORT KURLRequester : public QHBox
{
Q_OBJECT
Q_PROPERTY( QString url READ url WRITE setURL )
Q_PROPERTY( bool showLocalProtocol READ showLocalProtocol WRITE setShowLocalProtocol )
Q_PROPERTY( QString filter READ filter WRITE setFilter )
Q_PROPERTY( uint mode READ mode WRITE setMode )
public:
KURLRequester( QWidget *parent=0, const char *name=0 );
KURLRequester( const QString& url, QWidget *parent=0, const char *name=0 );
KURLRequester( QWidget *editWidget, QWidget *parent, const char *name=0 );
~KURLRequester();
QString url() const;
void setShowLocalProtocol( bool b );
void setMode( uint m );
uint mode() const;
void setFilter( const QString& filter );
QString filter() const;
bool showLocalProtocol() const { return myShowLocalProt; }
// ## KDE4: there's no reason to keep this, it should always be false
virtual KFileDialog * fileDialog() const;
KLineEdit * lineEdit() const;
KComboBox * comboBox() const;
KPushButton * button() const;
KURLCompletion *completionObject() const { return myCompletion; }
KEditListBox::CustomEditor customEditor();
public slots:
void setURL( const QString& url );
void setKURL( const KURL& url );
virtual void setCaption( const QString& caption );
void clear();
signals:
// forwards from LineEdit
void textChanged( const QString& );
void returnPressed();
void returnPressed( const QString& );
void openFileDialog( KURLRequester * );
void urlSelected( const QString& );
protected:
void init();
KURLCompletion * myCompletion;
private:
KURLDragPushButton * myButton;
bool myShowLocalProt;
mutable KFileDialog * myFileDialog;
protected slots:
void slotOpenDialog();
private slots:
void slotUpdateURL();
protected:
virtual void virtual_hook( int id, void* data );
bool eventFilter( QObject *obj, QEvent *ev );
private:
class KURLRequesterPrivate;
KURLRequesterPrivate *d;
};
class KIO_EXPORT KURLComboRequester : public KURLRequester
{
Q_OBJECT
public:
KURLComboRequester( QWidget *parent=0, const char *name=0 );
};
#endif // KURLREQUESTER_H
KURLRequester::showLocalProtocol
bool showLocalProtocol() const
Definition: kurlrequester.h:138
KFileDialog
Provides a user (and developer) friendly way to select files and directories.
Definition: kfiledialog.h:77
KURLRequester::completionObject
KURLCompletion * completionObject() const
Definition: kurlrequester.h:175
KURLRequester
This class is a widget showing a lineedit and a button, which invokes a filedialog.
Definition: kurlrequester.h:56
KURLComboRequester
URL requester with a combo box, for use in Designer.
Definition: kurlrequester.h:290

KDE Home | KDE Accessibility Home | Description of Access Keys