libkdepim
foldertreewidget.h
Go to the documentation of this file.00001 #ifndef KDEPIM_FOLDERTREEWIDGET_H
00002 #define KDEPIM_FOLDERTREEWIDGET_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00031 #include "kdepim_export.h"
00032 #include "treewidget.h"
00033
00034 namespace KPIM
00035 {
00036
00051 class KDEPIM_EXPORT FolderTreeWidget : public KPIM::TreeWidget
00052 {
00053 Q_OBJECT
00054 public:
00058 explicit FolderTreeWidget( QWidget *parent , const char *name = 0 );
00059
00060 };
00061
00062
00068 class KDEPIM_EXPORT FolderTreeWidgetItem : public QTreeWidgetItem
00069 {
00070 public:
00074 enum Protocol {
00075 Imap,
00076 Local,
00077 News,
00078 CachedImap,
00079 Search,
00080 NONE
00081 };
00082
00086 enum FolderType {
00087 Inbox,
00088 Outbox,
00089 SentMail,
00090 Trash,
00091 Drafts,
00092 Templates,
00093 Root,
00094 Calendar,
00095 Tasks,
00096 Journals,
00097 Contacts,
00098 Notes,
00099 Other
00100 };
00101
00102 private:
00103 Protocol mProtocol;
00104 FolderType mFolderType;
00105
00106 public:
00110 explicit FolderTreeWidgetItem(
00111 FolderTreeWidget *parent,
00112 const QString &label = QString(),
00113 Protocol protocol = NONE,
00114 FolderType folderType = Root
00115 );
00116
00120 explicit FolderTreeWidgetItem(
00121 FolderTreeWidgetItem *parent,
00122 const QString &label = QString(),
00123 Protocol protocol = NONE,
00124 FolderType folderType = Other,
00125 int unread = 0,
00126 int total = 0
00127 );
00128
00129 public:
00133 Protocol protocol() const
00134 { return mProtocol; };
00135
00139 void setProtocol( Protocol protocol )
00140 { mProtocol = protocol; };
00141
00145 FolderType folderType() const
00146 { return mFolderType; };
00147
00151 void setFolderType( FolderType folderType )
00152 { mFolderType = folderType; };
00153
00157 virtual bool operator < ( const QTreeWidgetItem &other ) const;
00158
00159 };
00160
00161 }
00162
00163 #endif