• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kio/kfile
 

kio/kfile

  • kio
  • kfile
kfiletreeviewitem.cpp
1 /* This file is part of the KDEproject
2  Copyright (C) 2000 David Faure <faure@kde.org>
3  2000 Carsten Pfeiffer <pfeiffer@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License version 2 as published by the Free Software Foundation.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #include <kdebug.h>
21 #include <kfileitem.h>
22 #include <kicontheme.h>
23 
24 #include "kfiletreeviewitem.h"
25 
26 /* --- KFileTreeViewItem --- */
27 /*
28  */
29 KFileTreeViewItem::KFileTreeViewItem( KFileTreeViewItem *parent,
30  KFileItem* item,
31  KFileTreeBranch *brnch )
32  : KListViewItem( parent ),
33  m_kfileitem( item ),
34  m_branch( brnch ),
35  m_wasListed(false)
36 {
37  setPixmap(0, item->pixmap( KIcon::SizeSmall ));
38  setText( 0, item->text());
39 
40 }
41 
42 KFileTreeViewItem::KFileTreeViewItem( KFileTreeView* parent,
43  KFileItem* item,
44  KFileTreeBranch *brnch )
45  :KListViewItem( (TQListView*)parent ),
46  m_kfileitem(item ),
47  m_branch( brnch ),
48  m_wasListed(false)
49 {
50  setPixmap(0, item->pixmap( KIcon::SizeSmall ));
51  setText( 0, item->text());
52 }
53 
54 KFileTreeViewItem::~KFileTreeViewItem()
55 {
56  if ( m_kfileitem )
57  m_kfileitem->removeExtraData( m_branch );
58 }
59 
60 bool KFileTreeViewItem::alreadyListed() const
61 {
62  return m_wasListed;
63 }
64 
65 void KFileTreeViewItem::setListed( bool wasListed )
66 {
67  m_wasListed = wasListed;
68 }
69 
70 KURL KFileTreeViewItem::url() const
71 {
72  return m_kfileitem ? m_kfileitem->url() : KURL();
73 }
74 
75 TQString KFileTreeViewItem::path() const
76 {
77  return m_kfileitem ? m_kfileitem->url().path() : TQString::null;
78 }
79 
80 bool KFileTreeViewItem::isDir() const
81 {
82  return m_kfileitem ? m_kfileitem->isDir() : false;
83 }
KFileTreeViewItem::setListed
void setListed(bool wasListed)
set the flag if the directory was already listed.
Definition: kfiletreeviewitem.cpp:65
KFileTreeViewItem::path
TQString path() const
Definition: kfiletreeviewitem.cpp:75
KFileTreeBranch
This is the branch class of the KFileTreeView, which represents one branch in the treeview...
Definition: kfiletreebranch.h:48
KFileTreeView
The filetreeview offers a treeview on the file system which behaves like a QTreeView showing files an...
Definition: kfiletreeview.h:66
KFileTreeViewItem
An item for a KFileTreeView that knows about its own KFileItem.
Definition: kfiletreeviewitem.h:40
KFileTreeViewItem::alreadyListed
bool alreadyListed() const
Definition: kfiletreeviewitem.cpp:60
KFileTreeViewItem::isDir
bool isDir() const
Definition: kfiletreeviewitem.cpp:80
KFileTreeViewItem::url
KURL url() const
Definition: kfiletreeviewitem.cpp:70

kio/kfile

Skip menu "kio/kfile"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

kio/kfile

Skip menu "kio/kfile"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kio/kfile by doxygen 1.8.8
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |