kmail

treebase.h
1/*
2 Copyright (c) 2008 Pradeepto K. Bhattacharya <pradeepto@kde.org>
3 ( adapted from tdepim/kmail/kmfolderseldlg.cpp and simplefoldertree.h )
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 KMAIL_TREEBASE_H
21#define KMAIL_TREEBASE_H
22
23#include "kmfolder.h"
24#include "kmfoldertree.h"
25
26#include <kdebug.h>
27#include <tdelistview.h>
28
29namespace KMail {
30
31class TreeItemBase;
32
33class TreeBase : public TDEListView
34{
35 TQ_OBJECT
36
37 public:
38 TreeBase( TQWidget * parent, KMFolderTree *folderTree,
39 const TQString &preSelection, bool mustBeReadWrite );
40
41 virtual ~TreeBase() {}
42
43 const KMFolder * folder() const;
45 void setFolder( KMFolder *folder );
46
47 inline void setFolder( const TQString& idString )
48 {
49 setFolder( kmkernel->findFolderById( idString ) );
50 }
51
52 void reload( bool mustBeReadWrite, bool showOutbox, bool showImapFolders,
53 const TQString& preSelection = TQString() );
54
55 int folderColumn() const { return mFolderColumn; }
56 void setFolderColumn( const int folderCol ) { mFolderColumn = folderCol; }
57 int pathColumn() const { return mPathColumn; }
58 void setPathColumn( const int pathCol ) { mPathColumn = pathCol; }
59
60 public slots:
61 void addChildFolder();
62 protected slots:
63 void slotContextMenuRequested( TQListViewItem *lvi,
64 const TQPoint &p );
65 void recolorRows();
66protected:
67 virtual TQListViewItem* createItem( TQListView* ) = 0;
68 virtual TQListViewItem* createItem( TQListView*, TQListViewItem* ) = 0;
69 virtual TQListViewItem* createItem( TQListViewItem* ) = 0;
70 virtual TQListViewItem* createItem( TQListViewItem*, TQListViewItem* ) = 0;
71
72 protected:
73 KMFolderTree* mFolderTree;
74 TQString mFilter;
75 bool mLastMustBeReadWrite;
76 bool mLastShowOutbox;
77 bool mLastShowImapFolders;
79 int mFolderColumn;
80 int mPathColumn;
81
82};
83}
84#endif
Mail folder.
Definition: kmfolder.h:69
folderdiaquotatab.h
Definition: aboutdata.cpp:40