You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdepim/kmail/kmfoldernode.cpp

66 lines
1.4 KiB

// kmfoldernode.cpp
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "kmfolderdir.h"
//-----------------------------------------------------------------------------
KMFolderNode::KMFolderNode( KMFolderDir * tqparent, const TQString & name )
: mName( name ),
mParent( tqparent ),
mDir( false ),
mId( 0 )
{
}
//-----------------------------------------------------------------------------
KMFolderNode::~KMFolderNode()
{
}
//-----------------------------------------------------------------------------
bool KMFolderNode::isDir(void) const
{
return mDir;
}
//-----------------------------------------------------------------------------
TQString KMFolderNode::path() const
{
if (tqparent()) return tqparent()->path();
return TQString();
}
//-----------------------------------------------------------------------------
TQString KMFolderNode::label(void) const
{
return name();
}
//-----------------------------------------------------------------------------
KMFolderDir* KMFolderNode::tqparent(void) const
{
return mParent;
}
//-----------------------------------------------------------------------------
void KMFolderNode::setParent( KMFolderDir* aParent )
{
mParent = aParent;
}
//-----------------------------------------------------------------------------
uint KMFolderNode::id() const
{
if (mId > 0)
return mId;
// compatibility, returns 0 on error
return name().toUInt();
}
#include "kmfoldernode.moc"