kmail

managesievescriptsdialog.h

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