kmail
filterimporterexporter.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 #ifndef __FILTERIMPORTEREXPORTER_H__
00031 #define __FILTERIMPORTEREXPORTER_H__
00032
00033 #include <qvaluelist.h>
00034 #include <kdialogbase.h>
00035 class KMFilter;
00036 class KConfig;
00037 class QWidget;
00038 class KPushButton;
00039
00040 namespace KMail
00041 {
00042
00047 class FilterImporterExporter
00048 {
00049 public:
00050 FilterImporterExporter( QWidget* parent, bool popFilter = false );
00051 virtual ~FilterImporterExporter();
00052
00056 void exportFilters( const QValueList<KMFilter*> & );
00057
00060 QValueList<KMFilter*> importFilters();
00061
00062 static void writeFiltersToConfig( const QValueList<KMFilter*>& filters, KConfig* config, bool bPopFilter );
00063 static QValueList<KMFilter*> readFiltersFromConfig( KConfig* config, bool bPopFilter );
00064 private:
00065 QWidget* mParent;
00066 bool mPopFilter;
00067 };
00068 class FilterSelectionDialog : public KDialogBase
00069 {
00070 Q_OBJECT
00071 public:
00072 FilterSelectionDialog( QWidget * parent = 0 );
00073
00074 virtual ~FilterSelectionDialog();
00075 virtual void slotCancel();
00076 bool cancelled();
00077 void setFilters( const QValueList<KMFilter*>& filters );
00078
00079 QValueList<KMFilter*> selectedFilters() const;
00080 public slots:
00081 void slotUnselectAllButton();
00082 void slotSelectAllButton();
00083 private:
00084 KListView *filtersListView;
00085 QValueList<KMFilter*> originalFilters;
00086 bool wasCancelled;
00087 KPushButton *selectAllButton;
00088 KPushButton *unselectAllButton;
00089 };
00090
00091 }
00092
00093 #endif
|