KFile
kdirselectdialog.h
Go to the documentation of this file.
00001 /* 00002 Copyright (C) 2001 Michael Jarrett <michaelj@corel.com> 00003 Copyright (C) 2001 Carsten Pfeiffer <pfeiffer@kde.org> 00004 Copyright (C) 2009 Shaun Reich <shaun.reich@kdemail.net> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License version 2 as published by the Free Software Foundation. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to 00017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 Boston, MA 02110-1301, USA. 00019 */ 00020 00021 #ifndef KDIRSELECTDIALOG_H 00022 #define KDIRSELECTDIALOG_H 00023 00024 #include <kfile_export.h> 00025 00026 #include <kdialog.h> 00027 #include <kurl.h> 00028 00029 class QAbstractItemView; 00030 00036 class KFILE_EXPORT KDirSelectDialog : public KDialog 00037 { 00038 Q_OBJECT 00039 00040 public: 00048 explicit KDirSelectDialog(const KUrl& startDir = KUrl(), 00049 bool localOnly = false, 00050 QWidget *parent = 0L); 00051 00055 ~KDirSelectDialog(); 00056 00063 KUrl url() const; 00064 00068 QAbstractItemView* view() const; 00069 00073 bool localOnly() const; 00074 00090 static KUrl selectDirectory( const KUrl& startDir = KUrl(), 00091 bool localOnly = false, QWidget *parent = 0L, 00092 const QString& caption = QString()); 00093 00097 KUrl startDir() const; 00098 00099 public Q_SLOTS: 00103 void setCurrentUrl( const KUrl& url ); 00104 00105 protected: 00106 virtual void accept(); 00107 00111 virtual void hideEvent( QHideEvent *event ); 00112 00113 private: 00114 class Private; 00115 Private* const d; 00116 00117 Q_PRIVATE_SLOT( d, void slotCurrentChanged() ) 00118 Q_PRIVATE_SLOT( d, void slotExpand(const QModelIndex&) ) 00119 Q_PRIVATE_SLOT( d, void slotUrlActivated(const QString&) ) 00120 Q_PRIVATE_SLOT( d, void slotComboTextChanged(const QString&) ) 00121 Q_PRIVATE_SLOT( d, void slotContextMenuRequested(const QPoint&) ) 00122 Q_PRIVATE_SLOT( d, void slotNewFolder() ) 00123 Q_PRIVATE_SLOT( d, void slotMoveToTrash() ) 00124 Q_PRIVATE_SLOT( d, void slotDelete() ) 00125 Q_PRIVATE_SLOT( d, void slotProperties() ) 00126 }; 00127 00128 #endif
KDE 4.6 API Reference