kmail

kmfoldernode.h
1 /*
2  * kmail: KDE mail client
3  * Copyright (c) 1996-1998 Stefan Taferner <taferner@kde.org>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  *
19  */
20 #ifndef kmfoldernode_h
21 #define kmfoldernode_h
22 
23 #include <tqobject.h>
24 #include <tqstring.h>
25 #include <tqptrlist.h>
26 
27 class KMFolderDir;
28 
29 class KMFolderNode: public TQObject
30 {
31  TQ_OBJECT
32 
33 
34 public:
35  KMFolderNode( KMFolderDir * parent, const TQString & name );
36  virtual ~KMFolderNode();
37 
42  virtual bool isDir(void) const;
43  virtual void setDir(bool aDir) { mDir = aDir; }
44 
47  KMFolderDir* parent(void) const ;
48  void setParent( KMFolderDir* aParent );
49  // { return (KMFolderDir*)KMFolderNodeInherited::parent(); }
50 
55  virtual TQString path() const;
56 
58  TQString name() const { return mName; }
59  void setName(const TQString& aName) { mName = aName; }
60 
63  virtual TQString label() const;
64 
66  virtual TQString prettyURL() const = 0;
67 
69  uint id() const;
70  void setId( uint id ) { mId = id; }
71 
72 protected:
73  TQString mName;
74  KMFolderDir *mParent;
75  bool mDir;
76  uint mId;
77 };
78 
79 typedef TQPtrList<KMFolderNode> KMFolderNodeList;
80 
81 
82 #endif /*kmfoldernode_h*/
KMail list that manages the contents of one directory that may contain folders and/or other directori...
Definition: kmfolderdir.h:16