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

tdeio/tdefile

tdefiletreeviewitem.cpp

00001 /* This file is part of the KDEproject
00002    Copyright (C) 2000 David Faure <faure@kde.org>
00003                  2000 Carsten Pfeiffer <pfeiffer@kde.org>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License version 2 as published by the Free Software Foundation.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017    Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #include <kdebug.h>
00021 #include <tdefileitem.h>
00022 #include <kicontheme.h>
00023 
00024 #include "tdefiletreeviewitem.h"
00025 
00026 /* --- KFileTreeViewItem --- */
00027 /*
00028  */
00029 KFileTreeViewItem::KFileTreeViewItem( KFileTreeViewItem *parent,
00030                       KFileItem* item,
00031                       KFileTreeBranch *brnch )
00032    : TDEListViewItem( parent ),
00033      m_tdefileitem( item ),
00034      m_branch( brnch ),
00035      m_wasListed(false)
00036 {
00037    setPixmap(0, item->pixmap( TDEIcon::SizeSmall ));
00038    setText( 0, item->text());
00039 
00040 }
00041 
00042 KFileTreeViewItem::KFileTreeViewItem( KFileTreeView* parent,
00043                       KFileItem* item,
00044                       KFileTreeBranch *brnch )
00045    :TDEListViewItem( (TQListView*)parent ),
00046     m_tdefileitem(item ),
00047     m_branch( brnch ),
00048     m_wasListed(false)
00049 {
00050    setPixmap(0, item->pixmap( TDEIcon::SizeSmall ));
00051    setText( 0, item->text());
00052 }
00053 
00054 KFileTreeViewItem::~KFileTreeViewItem()
00055 {
00056     if ( m_tdefileitem )
00057         m_tdefileitem->removeExtraData( m_branch );
00058 }
00059 
00060 bool KFileTreeViewItem::alreadyListed() const
00061 {
00062    return m_wasListed;
00063 }
00064 
00065 void KFileTreeViewItem::setListed( bool wasListed )
00066 {
00067    m_wasListed = wasListed;
00068 }
00069 
00070 KURL KFileTreeViewItem::url() const
00071 {
00072     return m_tdefileitem ? m_tdefileitem->url() : KURL();
00073 }
00074 
00075 TQString KFileTreeViewItem::path()  const
00076 {
00077     return m_tdefileitem ? m_tdefileitem->url().path() : TQString::null;
00078 }
00079 
00080 bool KFileTreeViewItem::isDir() const
00081 {
00082     return m_tdefileitem ? m_tdefileitem->isDir() : false;
00083 }

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.7.1
This website is maintained by Timothy Pearson.