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 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 // forwards from LineEdit 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 // For use in Qt Designer 00256 { 00257 Q_OBJECT 00258 public: 00262 KURLComboRequester( QWidget *parent=0, const char *name=0 ); 00263 }; 00264 00265 00266 #endif // KURLREQUESTER_H
KDE Logo
This file is part of the documentation for kio Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Aug 20 09:49:16 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003