• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KFile

  • kfile
kfiletreeview.h
Go to the documentation of this file.
1/*
2 This file is part of the KDE project
3
4 Copyright (C) 2007 Tobias Koenig <tokoe@kde.org>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
20*/
21
22#ifndef KFILETREEVIEW_H
23#define KFILETREEVIEW_H
24
25#include <QtGui/QTreeView>
26
27#include <kurl.h>
28
29#include <kfile_export.h>
30
34class KFILE_EXPORT KFileTreeView : public QTreeView // KDE5: remove KFILE_EXPORT? Seems internal only.
35{
36 Q_OBJECT
37
38 public:
42 KFileTreeView(QWidget *parent = 0);
43
47 ~KFileTreeView();
48
52 KUrl currentUrl() const;
53
57 KUrl selectedUrl() const;
58
62 KUrl::List selectedUrls() const;
63
67 KUrl rootUrl() const;
68
73 bool showHiddenFiles() const;
74
78 QSize sizeHint() const;
79
80 public Q_SLOTS:
87 void setDirOnlyMode(bool enabled);
88
92 void setShowHiddenFiles(bool enabled);
93
97 void setCurrentUrl(const KUrl &url);
98
104 void setRootUrl(const KUrl &url);
105
106 Q_SIGNALS:
110 void activated(const KUrl &url);
111
115 void currentChanged(const KUrl &url);
116
117 protected:
118 virtual void contextMenuEvent( QContextMenuEvent* );
119
120 private:
121 class Private;
122 Private* const d;
123
124 Q_PRIVATE_SLOT(d, void _k_activated(const QModelIndex&))
125 Q_PRIVATE_SLOT(d, void _k_currentChanged(const QModelIndex&, const QModelIndex&))
126 Q_PRIVATE_SLOT(d, void _k_expanded(const QModelIndex&))
127};
128
129#endif
KFileTreeView
The file treeview offers a treeview on the filesystem.
Definition: kfiletreeview.h:35
KFileTreeView::currentChanged
void currentChanged(const KUrl &url)
This signal is emitted whenever the current url has been changed.
KFileTreeView::activated
void activated(const KUrl &url)
This signal is emitted whenever an url has been activated.
KUrl::List
KUrl
QTreeView
QWidget
kfile_export.h
kurl.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KFile

Skip menu "KFile"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal