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