summaryrefslogtreecommitdiffstats
path: root/kmail/kmfolderdir.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit460c52653ab0dcca6f19a4f492ed2c5e4e963ab0 (patch)
tree67208f7c145782a7e90b123b982ca78d88cc2c87 /kmail/kmfolderdir.h
downloadtdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.tar.gz
tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmail/kmfolderdir.h')
-rw-r--r--kmail/kmfolderdir.h92
1 files changed, 92 insertions, 0 deletions
diff --git a/kmail/kmfolderdir.h b/kmail/kmfolderdir.h
new file mode 100644
index 000000000..5fa30b86e
--- /dev/null
+++ b/kmail/kmfolderdir.h
@@ -0,0 +1,92 @@
+#ifndef kmfolderdir_h
+#define kmfolderdir_h
+
+#include <qstring.h>
+#include "kmfoldernode.h"
+#include "kmfoldertype.h"
+
+class KMFolder;
+class KMFolderMgr;
+
+
+/** KMail list that manages the contents of one directory that may
+ * contain folders and/or other directories.
+ */
+class KMFolderDir: public KMFolderNode, public KMFolderNodeList
+{
+ Q_OBJECT
+
+public:
+ KMFolderDir( KMFolder * owner, KMFolderDir * parent = 0,
+ const QString& path = QString::null,
+ KMFolderDirType = KMStandardDir );
+ virtual ~KMFolderDir();
+
+ virtual bool isDir() const { return true; }
+
+ /** Read contents of directory. */
+ virtual bool reload();
+
+ /** Return full pathname of this directory. */
+ virtual QString path() const;
+
+ /** Returns the label of the folder for visualization. */
+ QString label() const;
+
+ /** URL of the node for visualization purposes. */
+ virtual QString prettyURL() const;
+
+ /** Create a mail folder in this directory with given name. If sysFldr==TRUE
+ the folder is marked as a (KMail) system folder.
+ Returns Folder on success. */
+ virtual KMFolder* createFolder(const QString& folderName,
+ bool sysFldr=false,
+ KMFolderType folderType=KMFolderTypeMbox);
+
+ /** Returns folder with given name or zero if it does not exist */
+ virtual KMFolderNode* hasNamedFolder(const QString& name);
+
+ /** Returns the folder manager that manages this folder */
+ virtual KMFolderMgr* manager() const;
+
+ /** Returns the folder whose children we are holding */
+ KMFolder* owner() const { return mOwner; }
+
+ virtual KMFolderDirType type() const { return mDirType; }
+
+protected:
+ KMFolder * mOwner;
+ KMFolderDirType mDirType;
+};
+
+
+//-----------------------------------------------------------------------------
+
+class KMFolderRootDir: public KMFolderDir
+{
+ Q_OBJECT
+
+public:
+ KMFolderRootDir(KMFolderMgr* manager,
+ const QString& path=QString::null,
+ KMFolderDirType dirType = KMStandardDir);
+ virtual ~KMFolderRootDir();
+ virtual QString path() const;
+
+ /** set the absolute path */
+ virtual void setPath(const QString&);
+
+ virtual QString prettyURL() const;
+
+ void setBaseURL( const QCString& baseURL );
+
+ virtual KMFolderMgr* manager() const;
+
+protected:
+ QString mPath;
+ KMFolderMgr *mManager;
+ QCString mBaseURL;
+};
+
+#endif /*kmfolderdir_h*/
+