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
00069 public Q_SLOTS:
00076 void setDirOnlyMode(bool enabled);
00077
00081 void setShowHiddenFiles(bool enabled);
00082
00086 void setCurrentUrl(const KUrl &url);
00087
00093 void setRootUrl(const KUrl &url);
00094
00095 Q_SIGNALS:
00099 void activated(const KUrl &url);
00100
00104 void currentChanged(const KUrl &url);
00105
00106 protected:
00107 virtual void contextMenuEvent( QContextMenuEvent* );
00108
00109 private:
00110 class Private;
00111 Private* const d;
00112
00113 Q_PRIVATE_SLOT(d, void _k_activated(const QModelIndex&))
00114 Q_PRIVATE_SLOT(d, void _k_currentChanged(const QModelIndex&, const QModelIndex&))
00115 Q_PRIVATE_SLOT(d, void _k_expanded(const QModelIndex&))
00116 };
00117
00118 #endif