kmail
treebase.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KMAIL_TREEBASE_H
00021 #define KMAIL_TREEBASE_H
00022
00023 #include "kmfolder.h"
00024 #include "kmfoldertree.h"
00025
00026 #include <kdebug.h>
00027 #include <tdelistview.h>
00028
00029 namespace KMail {
00030
00031 class TreeItemBase;
00032
00033 class TreeBase : public TDEListView
00034 {
00035 Q_OBJECT
00036
00037 public:
00038 TreeBase( TQWidget * parent, KMFolderTree *folderTree,
00039 const TQString &preSelection, bool mustBeReadWrite );
00040
00041 virtual ~TreeBase() {}
00042
00043 const KMFolder * folder() const;
00045 void setFolder( KMFolder *folder );
00046
00047 inline void setFolder( const TQString& idString )
00048 {
00049 setFolder( kmkernel->findFolderById( idString ) );
00050 }
00051
00052 void reload( bool mustBeReadWrite, bool showOutbox, bool showImapFolders,
00053 const TQString& preSelection = TQString() );
00054
00055 int folderColumn() const { return mFolderColumn; }
00056 void setFolderColumn( const int folderCol ) { mFolderColumn = folderCol; }
00057 int pathColumn() const { return mPathColumn; }
00058 void setPathColumn( const int pathCol ) { mPathColumn = pathCol; }
00059
00060 public slots:
00061 void addChildFolder();
00062 protected slots:
00063 void slotContextMenuRequested( TQListViewItem *lvi,
00064 const TQPoint &p );
00065 void recolorRows();
00066 protected:
00067 virtual TQListViewItem* createItem( TQListView* ) = 0;
00068 virtual TQListViewItem* createItem( TQListView*, TQListViewItem* ) = 0;
00069 virtual TQListViewItem* createItem( TQListViewItem* ) = 0;
00070 virtual TQListViewItem* createItem( TQListViewItem*, TQListViewItem* ) = 0;
00071
00072 protected:
00073 KMFolderTree* mFolderTree;
00074 TQString mFilter;
00075 bool mLastMustBeReadWrite;
00076 bool mLastShowOutbox;
00077 bool mLastShowImapFolders;
00079 int mFolderColumn;
00080 int mPathColumn;
00081
00082 };
00083 }
00084 #endif
|