kmail
subscriptiondialog.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef __SUBSCRIPTIONDIALOG
00033 #define __SUBSCRIPTIONDIALOG
00034
00035 #include <tqdict.h>
00036 #include <ksubscription.h>
00037 #include "imapaccountbase.h"
00038
00039 class KMMessage;
00040 class FolderStorage;
00041
00042 namespace KMail {
00043
00044
00045
00046
00047 class SubscriptionDialogBase : public KSubscription
00048 {
00049 Q_OBJECT
00050 TQ_OBJECT
00051
00052 public:
00053 SubscriptionDialogBase( TQWidget *parent,
00054 const TQString &caption,
00055 KAccount* acct,
00056 TQString startPath = TQString() );
00057 virtual ~SubscriptionDialogBase() {}
00058
00059 void show();
00060
00061 protected:
00065 void findParentItem ( TQString &name, TQString &path, TQString &compare,
00066 GroupItem **parent, GroupItem **oldItem );
00067
00071 void processNext();
00072
00076 void initPrefixList();
00077
00078 virtual void loadingComplete();
00079
00080 public slots:
00084 void slotListDirectory(const TQStringList&, const TQStringList&,
00085 const TQStringList&, const TQStringList&, const ImapAccountBase::jobData &);
00086
00090 void slotSave();
00091
00095 void slotConnectionResult( int errorCode, const TQString& errorMsg );
00096
00097 protected slots:
00101 void slotLoadFolders();
00102
00103 protected:
00104 virtual void listAllAvailableAndCreateItems() = 0;
00105 virtual void processFolderListing() = 0;
00106 virtual void doSave() = 0;
00107
00108
00110 void moveChildrenToNewParent( GroupItem *oldItem, GroupItem *item );
00111
00114 void createListViewItem( int i );
00115
00116 TQString mDelimiter;
00117 TQStringList mFolderNames, mFolderPaths,
00118 mFolderMimeTypes, mFolderAttributes;
00119 ImapAccountBase::jobData mJobData;
00120 uint mCount;
00121 TQDict<GroupItem> mItemDict;
00122 TQString mStartPath;
00123 bool mSubscribed, mForceSubscriptionEnable;
00124 TQStringList mPrefixList;
00125 TQString mCurrentNamespace;
00126 };
00127
00128 class SubscriptionDialog : public SubscriptionDialogBase
00129 {
00130 Q_OBJECT
00131 TQ_OBJECT
00132 public:
00133
00134 SubscriptionDialog( TQWidget *parent,
00135 const TQString &caption,
00136 KAccount* acct,
00137 TQString startPath = TQString() );
00138 virtual ~SubscriptionDialog();
00139 protected:
00141 virtual void listAllAvailableAndCreateItems();
00143 virtual void processFolderListing();
00145 virtual void doSave();
00146
00147 private:
00152 void processItems();
00153
00154 };
00155
00156 }
00157
00158 #endif
|