1
/***************************************************************************
2
smb4kpreviewitem - A container for previews of a remote share
5
copyright : (C) 2007 by Alexander Reinholdt
6
email : dustpuppy@users.berlios.de
7
***************************************************************************/
9
/***************************************************************************
10
* This program is free software; you can redistribute it and/or modify *
11
* it under the terms of the GNU General Public License as published by *
12
* the Free Software Foundation; either version 2 of the License, or *
13
* (at your option) any later version. *
15
* This program is distributed in the hope that it will be useful, but *
16
* WITHOUT ANY WARRANTY; without even the implied warranty of *
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
18
* General Public License for more details. *
20
* You should have received a copy of the GNU General Public License *
21
* along with this program; if not, write to the *
22
* Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
24
***************************************************************************/
27
#include <QHostAddress>
29
// application specific includes
30
#include <smb4kpreviewitem.h>
32
Smb4KPreviewItem::Smb4KPreviewItem( Smb4KShare *share, const QString &path )
39
Smb4KPreviewItem::~Smb4KPreviewItem()
44
void Smb4KPreviewItem::setPath( const QString &path )
46
if ( path.trimmed().isEmpty() )
52
m_path = path+(!path.endsWith( "/" ) ? "/" : QString());
55
m_location = m_share.unc()+m_path;
61
void Smb4KPreviewItem::addContents( const ContentsItem &item )
63
m_contents.append( item );
67
void Smb4KPreviewItem::clearContents()
73
bool Smb4KPreviewItem::isRootDirectory()
75
if ( QString::compare( m_path.trimmed(), "/" ) == 0 )