KFile
kfiletreeview.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef KFILETREEVIEW_H
00023 #define KFILETREEVIEW_H
00024
00025 #include <QtGui/QTreeView>
00026
00027 #include <kurl.h>
00028
00029 #include <kfile_export.h>
00030
00034 class KFILE_EXPORT KFileTreeView : public QTreeView
00035 {
00036 Q_OBJECT
00037
00038 public:
00042 KFileTreeView(QWidget *parent = 0);
00043
00047 ~KFileTreeView();
00048
00052 KUrl currentUrl() const;
00053
00057 KUrl selectedUrl() const;
00058
00062 KUrl::List selectedUrls() const;
00063
00067 KUrl rootUrl() const;
00068
00073 bool showHiddenFiles() const;
00074
00075 public Q_SLOTS:
00082 void setDirOnlyMode(bool enabled);
00083
00087 void setShowHiddenFiles(bool enabled);
00088
00092 void setCurrentUrl(const KUrl &url);
00093
00099 void setRootUrl(const KUrl &url);
00100
00101 Q_SIGNALS:
00105 void activated(const KUrl &url);
00106
00110 void currentChanged(const KUrl &url);
00111
00112 protected:
00113 virtual void contextMenuEvent( QContextMenuEvent* );
00114
00115 private:
00116 class Private;
00117 Private* const d;
00118
00119 Q_PRIVATE_SLOT(d, void _k_activated(const QModelIndex&))
00120 Q_PRIVATE_SLOT(d, void _k_currentChanged(const QModelIndex&, const QModelIndex&))
00121 Q_PRIVATE_SLOT(d, void _k_expanded(const QModelIndex&))
00122 };
00123
00124 #endif