kmail

managesievescriptsdialog.h

Go to the documentation of this file.
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 slotDeleteScript();
00032   void slotGetResult( KMail::SieveJob *, bool, const QString &, bool );
00033   void slotPutResult( KMail::SieveJob *, bool );
00034   void slotSieveEditorOkClicked();
00035   void slotSieveEditorCancelClicked();
00036 
00037 private:
00038   void killAllJobs();
00039   void changeActiveScript( QCheckListItem * );
00040 
00041 private:
00042   QListView * mListView;
00043   SieveEditor * mSieveEditor;
00044   QMap<KMail::SieveJob*,QCheckListItem*> mJobs;
00045   QMap<QCheckListItem*,KURL> mUrls;
00046   QMap<QCheckListItem*,QCheckListItem*> mSelectedItems;
00047   QCheckListItem * mContextMenuItem;
00048   KURL mCurrentURL;
00049   bool mWasActive : 1;
00050 };
00051 
00052 }
00053 
00054 #endif /* __KMAIL__MANAGESIEVESCRIPTSDIALOG_H__ */
00055