KDevelop API Documentation

fileselectorwidget.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2001 by Bernd Gehrmann                                  *
00003  *   bernd@kdevelop.org                                                    *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  ***************************************************************************/
00011 
00012 #ifndef _FILESELECTORWIDGET_H_
00013 #define _FILESELECTORWIDGET_H_
00014 
00015 #include <qlayout.h>
00016 #include <qpushbutton.h>
00017 #include <qhbox.h>
00018 #include <qlabel.h>
00019 #include <qstrlist.h>
00020 #include <qtooltip.h>
00021 
00022 #include <klistview.h>
00023 #include <qvbox.h>
00024 #include <qwidget.h>
00025 #include <kfile.h>
00026 #include <kurlcombobox.h>
00027 #include <kurlcompletion.h>
00028 #include <kcombobox.h>
00029 #include <kprotocolinfo.h>
00030 
00031 #include <kfileview.h>
00032 #include <kfileitem.h>
00033 
00034 #include <kdiroperator.h>
00035 
00036 class AutoProjectPart;
00037 class SubprojectItem;
00038 class KFile;
00039 
00040 class KDnDDirOperator : public KDirOperator
00041 {
00042     Q_OBJECT
00043 
00044     public:
00045         KDnDDirOperator ( const KURL& urlName = KURL(), QWidget *parent = 0, const char* name = 0 );
00046 
00047     protected:
00048         virtual KFileView* createView( QWidget* parent, KFile::FileView view );
00049 };
00050 
00051 class FileSelectorWidget : public QWidget
00052 {
00053     Q_OBJECT
00054 
00055 public:
00056     FileSelectorWidget(AutoProjectPart* part, KFile::Mode, QWidget* parent = 0, const char* name = 0 );
00057     ~FileSelectorWidget();
00058 
00059     KDnDDirOperator * dirOperator(){return dir;}
00060 
00061 public slots:
00062     void slotFilterChanged(const QString&);
00063     void setDir(KURL);
00064     void setDir(const QString&);
00065 
00066 private slots:
00067     void cmbPathActivated( const KURL& u );
00068     void cmbPathReturnPressed( const QString& u );
00069     void dirUrlEntered( const KURL& u );
00070     void dirFinishedLoading();
00071     void filterReturnPressed( const QString& nf );
00072 
00073 protected:
00074     void focusInEvent(QFocusEvent*);
00075     void dragEnterEvent ( QDragEnterEvent* ev );
00076     void dropEvent ( QDropEvent* ev );
00077 
00078 private:
00079     KURLComboBox *cmbPath;
00080     KHistoryCombo * filter;
00081     QLabel* filterIcon;
00082     KDnDDirOperator * dir;
00083     QPushButton *home, *up, *back, *forward;
00084     AutoProjectPart* m_part;
00085 
00086 signals:
00087     void dropped ( const QString& );
00088 
00089 };
00090 
00091 #endif
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:03:39 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003