00001 #ifndef __KMAIL__MANAGESIEVESCRIPTSDIALOG_H__
00002 #define __KMAIL__MANAGESIEVESCRIPTSDIALOG_H__
00003
00004 #include <kdialogbase.h>
00005 #include <kurl.h>
00006 #include <tqmap.h>
00007
00008 class TQListView;
00009 class TQCheckListItem;
00010
00011 namespace KMail {
00012
00013 class SieveJob;
00014 class SieveEditor;
00015
00016 class ManageSieveScriptsDialog : public KDialogBase {
00017 Q_OBJECT
00018 TQ_OBJECT
00019 public:
00020 ManageSieveScriptsDialog( TQWidget * parent=0, const char * name=0 );
00021 ~ManageSieveScriptsDialog();
00022
00023 private slots:
00024 void slotRefresh();
00025 void slotItem( KMail::SieveJob *, const TQString &, bool );
00026 void slotResult( KMail::SieveJob *, bool, const TQString &, bool );
00027 void slotContextMenuRequested( TQListViewItem *, const TQPoint & );
00028 void slotDoubleClicked( TQListViewItem * );
00029 void slotSelectionChanged( TQListViewItem * );
00030 void slotNewScript();
00031 void slotEditScript();
00032 void slotDeactivateScript();
00033 void slotDeleteScript();
00034 void slotGetResult( KMail::SieveJob *, bool, const TQString &, bool );
00035 void slotPutResult( KMail::SieveJob *, bool );
00036 void slotSieveEditorOkClicked();
00037 void slotSieveEditorCancelClicked();
00038
00039 private:
00040 void killAllJobs();
00041 void changeActiveScript( TQCheckListItem *, bool activate = true );
00042
00043 private:
00044 TQListView * mListView;
00045 SieveEditor * mSieveEditor;
00046 TQMap<KMail::SieveJob*,TQCheckListItem*> mJobs;
00047 TQMap<TQCheckListItem*,KURL> mUrls;
00048 TQMap<TQCheckListItem*,TQCheckListItem*> mSelectedItems;
00049 TQCheckListItem * mContextMenuItem;
00050 KURL mCurrentURL;
00051 bool mWasActive : 1;
00052 };
00053
00054 }
00055
00056 #endif
00057