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.h

83 lines
2.5 KiB

/*
* kmail: KDE mail client
* Copyright (c) 1996-1998 Stefan Taferner <taferner@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef kmfoldernode_h
#define kmfoldernode_h
#include <tqobject.h>
#include <tqstring.h>
#include <tqptrlist.h>
class KMFolderDir;
class KMFolderNode: public TQObject
{
Q_OBJECT
TQ_OBJECT
public:
KMFolderNode( KMFolderDir * tqparent, const TQString & name );
virtual ~KMFolderNode();
/** Is it a directory where mail folders are stored or is it a folder that
contains mail ?
Note that there are some kinds of mail folders like the type mh uses that
are directories on disk but are handled as folders here. */
virtual bool isDir(void) const;
virtual void setDir(bool aDir) { mDir = aDir; }
/** Returns ptr to owning directory object or 0 if none. This
is just a wrapper for convenient access. */
KMFolderDir* tqparent(void) const ;
void setParent( KMFolderDir* aParent );
// { return (KMFolderDir*)KMFolderNodeInherited::tqparent(); }
/** Returns full path to the directory where this node is stored or 0
if the node has no tqparent. Example: if this object represents a folder
~joe/Mail/inbox then path() returns "/home/joe/Mail" and name() returns
"inbox". */
virtual TQString path() const;
/** Name of the node. Also used as file name. */
TQString name() const { return mName; }
void setName(const TQString& aName) { mName = aName; }
/** Label of the node for visualzation purposes. Default the same as
the name. */
virtual TQString label() const;
/** URL of the node for visualization purposes. */
virtual TQString prettyURL() const = 0;
/** ID of the node */
uint id() const;
void setId( uint id ) { mId = id; }
protected:
TQString mName;
KMFolderDir *mParent;
bool mDir;
uint mId;
};
typedef TQPtrList<KMFolderNode> KMFolderNodeList;
#endif /*kmfoldernode_h*/