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

KFile

  • sources
  • kde-4.14
  • kdelibs
  • 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 
34 class 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
QModelIndex
QWidget
kurl.h
QTreeView::currentChanged
virtual void currentChanged(const QModelIndex &current, const QModelIndex &previous)
KFileTreeView
The file treeview offers a treeview on the filesystem.
Definition: kfiletreeview.h:34
QAbstractScrollArea::contextMenuEvent
virtual void contextMenuEvent(QContextMenuEvent *e)
QAbstractScrollArea::sizeHint
virtual QSize sizeHint() const
KUrl
QContextMenuEvent
QSize
QAbstractItemView::activated
void activated(const QModelIndex &index)
KUrl::List
QTreeView
kfile_export.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:27:26 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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

Search



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