kmail

subscriptiondialog.h
1/*
2 subscriptiondialog.h
3
4 This file is part of KMail, the KDE mail client.
5 Copyright (C) 2002 Carsten Burghardt <burghardt@kde.org>
6
7 KMail is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License, version 2, as
9 published by the Free Software Foundation.
10
11 KMail is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
20 In addition, as a special exception, the copyright holders give
21 permission to link the code of this program with any edition of
22 the TQt library by Trolltech AS, Norway (or with modified versions
23 of TQt that use the same license as TQt), and distribute linked
24 combinations including the two. You must obey the GNU General
25 Public License in all respects for all of the code used other than
26 TQt. If you modify this file, you may extend this exception to
27 your version of the file, but you are not obligated to do so. If
28 you do not wish to do so, delete this exception statement from
29 your version.
30*/
31
32#ifndef __SUBSCRIPTIONDIALOG
33#define __SUBSCRIPTIONDIALOG
34
35#include <tqdict.h>
36#include <ksubscription.h>
37#include "imapaccountbase.h"
38
39class KMMessage;
40class FolderStorage;
41
42namespace KMail {
43
44 // Abstract base class for the server side and client side subscription dialogs.
45 // Scott Meyers says: "Make non-leaf classes abstract" and he is right, I think.
46 // (More Effective C++, Item 33)
47 class SubscriptionDialogBase : public KSubscription
48 {
49 TQ_OBJECT
50
51
52 public:
53 SubscriptionDialogBase( TQWidget *parent,
54 const TQString &caption,
55 KAccount* acct,
56 TQString startPath = TQString() );
57 virtual ~SubscriptionDialogBase() {}
58
59 void show();
60
61 protected:
65 void findParentItem ( TQString &name, TQString &path, TQString &compare,
66 GroupItem **parent, GroupItem **oldItem );
67
71 void processNext();
72
76 void initPrefixList();
77
78 virtual void loadingComplete();
79
80 public slots:
84 void slotListDirectory(const TQStringList&, const TQStringList&,
85 const TQStringList&, const TQStringList&, const ImapAccountBase::jobData &);
86
90 void slotSave();
91
95 void slotConnectionResult( int errorCode, const TQString& errorMsg );
96
97 protected slots:
101 void slotLoadFolders();
102
103 protected:
104 virtual void listAllAvailableAndCreateItems() = 0;
105 virtual void processFolderListing() = 0;
106 virtual void doSave() = 0;
107
108 // helpers
110 void moveChildrenToNewParent( GroupItem *oldItem, GroupItem *item );
111
114 void createListViewItem( int i );
115
116 TQString mDelimiter;
117 TQStringList mFolderNames, mFolderPaths,
118 mFolderMimeTypes, mFolderAttributes;
119 ImapAccountBase::jobData mJobData;
120 uint mCount;
121 TQDict<GroupItem> mItemDict;
122 TQString mStartPath;
123 bool mSubscribed, mForceSubscriptionEnable;
124 TQStringList mPrefixList;
125 TQString mCurrentNamespace;
126 };
127
128 class SubscriptionDialog : public SubscriptionDialogBase
129 {
130 TQ_OBJECT
131
132 public:
133
134 SubscriptionDialog( TQWidget *parent,
135 const TQString &caption,
136 KAccount* acct,
137 TQString startPath = TQString() );
138 virtual ~SubscriptionDialog();
139 protected:
141 virtual void listAllAvailableAndCreateItems();
143 virtual void processFolderListing();
145 virtual void doSave();
146
147 private:
152 void processItems();
153
154 };
155
156} // namespace KMail
157
158#endif
The FolderStorage class is the bass class for the storage related aspects of a collection of mail (a ...
Definition: folderstorage.h:80
This is a Mime Message.
Definition: kmmessage.h:68
folderdiaquotatab.h
Definition: aboutdata.cpp:40