• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/tdefile
 

tdeio/tdefile

  • tdeio
  • tdefile
tdefiletreeviewitem.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 <tdefileitem.h>
22#include <kicontheme.h>
23
24#include "tdefiletreeviewitem.h"
25
26/* --- KFileTreeViewItem --- */
27/*
28 */
29KFileTreeViewItem::KFileTreeViewItem( KFileTreeViewItem *parent,
30 KFileItem* item,
31 KFileTreeBranch *brnch )
32 : TDEListViewItem( parent ),
33 m_tdefileitem( item ),
34 m_branch( brnch ),
35 m_wasListed(false)
36{
37 setPixmap(0, item->pixmap( TDEIcon::SizeSmall ));
38 setText( 0, item->text());
39
40}
41
42KFileTreeViewItem::KFileTreeViewItem( KFileTreeView* parent,
43 KFileItem* item,
44 KFileTreeBranch *brnch )
45 :TDEListViewItem( (TQListView*)parent ),
46 m_tdefileitem(item ),
47 m_branch( brnch ),
48 m_wasListed(false)
49{
50 setPixmap(0, item->pixmap( TDEIcon::SizeSmall ));
51 setText( 0, item->text());
52}
53
54KFileTreeViewItem::~KFileTreeViewItem()
55{
56 if ( m_tdefileitem )
57 m_tdefileitem->removeExtraData( m_branch );
58}
59
60bool KFileTreeViewItem::alreadyListed() const
61{
62 return m_wasListed;
63}
64
65void KFileTreeViewItem::setListed( bool wasListed )
66{
67 m_wasListed = wasListed;
68}
69
70KURL KFileTreeViewItem::url() const
71{
72 return m_tdefileitem ? m_tdefileitem->url() : KURL();
73}
74
75TQString KFileTreeViewItem::path() const
76{
77 return m_tdefileitem ? m_tdefileitem->url().path() : TQString::null;
78}
79
80bool KFileTreeViewItem::isDir() const
81{
82 return m_tdefileitem ? m_tdefileitem->isDir() : false;
83}
KFileTreeBranch
This is the branch class of the KFileTreeView, which represents one branch in the treeview.
Definition: tdefiletreebranch.h:49
KFileTreeViewItem
An item for a KFileTreeView that knows about its own KFileItem.
Definition: tdefiletreeviewitem.h:41
KFileTreeViewItem::path
TQString path() const
Definition: tdefiletreeviewitem.cpp:75
KFileTreeViewItem::isDir
bool isDir() const
Definition: tdefiletreeviewitem.cpp:80
KFileTreeViewItem::setListed
void setListed(bool wasListed)
set the flag if the directory was already listed.
Definition: tdefiletreeviewitem.cpp:65
KFileTreeViewItem::url
KURL url() const
Definition: tdefiletreeviewitem.cpp:70
KFileTreeViewItem::alreadyListed
bool alreadyListed() const
Definition: tdefiletreeviewitem.cpp:60
KFileTreeView
The filetreeview offers a treeview on the file system which behaves like a QTreeView showing files an...
Definition: tdefiletreeview.h:67

tdeio/tdefile

Skip menu "tdeio/tdefile"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

tdeio/tdefile

Skip menu "tdeio/tdefile"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdefile by doxygen 1.9.4
This website is maintained by Timothy Pearson.