MailCommon::FilterImporterExporter

Search for usage in LXR

MailCommon::FilterImporterExporter Class Reference

#include <filterimporterexporter.h>

Public Types

enum  FilterType {
  KMailFilter = 0, ThunderBirdFilter = 1, EvolutionFilter = 2, SylpheedFilter = 3,
  ProcmailFilter = 4, BalsaFilter = 5, ClawsMailFilter = 6, IcedoveFilter = 7,
  GmailFilter = 8, SeaMonkeyFilter = 9
}
 

Public Member Functions

 FilterImporterExporter (QWidget *parent=nullptr)
 
virtual ~FilterImporterExporter ()
 
void exportFilters (const QVector< MailFilter * > &filters, const QUrl &fileName=QUrl(), bool saveAll=false)
 
QVector< MailFilter * > importFilters (bool &canceled, FilterImporterExporter::FilterType type=FilterImporterExporter::KMailFilter, const QString &filename=QString())
 

Static Public Member Functions

static QVector< MailFilter * > readFiltersFromConfig (const KSharedConfig::Ptr &config, QStringList &emptyFilter)
 
static void writeFiltersToConfig (const QVector< MailFilter * > &filters, KSharedConfig::Ptr config, bool exportFilter=false)
 

Detailed Description

Utility class that provides persisting of filters to/from KConfig.

Author
Till Adam [email protected][email protected]kdab[email protected].net

Definition at line 29 of file filterimporterexporter.h.

Constructor & Destructor Documentation

◆ FilterImporterExporter()

FilterImporterExporter::FilterImporterExporter ( QWidget parent = nullptr)
explicit

Creates a new filter importer/exporter.

Parameters
parentThe parent widget.

Definition at line 122 of file filterimporterexporter.cpp.

◆ ~FilterImporterExporter()

FilterImporterExporter::~FilterImporterExporter ( )
virtualdefault

Destroys the filter importer/exporter.

Member Function Documentation

◆ exportFilters()

void FilterImporterExporter::exportFilters ( const QVector< MailFilter * > &  filters,
const QUrl fileName = QUrl(),
bool  saveAll = false 
)

Exports the given filters to a file which is asked from the user.

The list to export is also presented for confirmation/selection.

Definition at line 313 of file filterimporterexporter.cpp.

◆ importFilters()

QVector< MailFilter * > FilterImporterExporter::importFilters ( bool &  canceled,
FilterImporterExporter::FilterType  type = FilterImporterExporter::KMailFilter,
const QString filename = QString() 
)

Imports filters.

Ask the user where to import them from and which filters to import.

Definition at line 129 of file filterimporterexporter.cpp.

◆ readFiltersFromConfig()

QVector< MailFilter * > FilterImporterExporter::readFiltersFromConfig ( const KSharedConfig::Ptr &  config,
QStringList emptyFilter 
)
static

Reads a list of filters from the given config file.

Return list of empty filter

Definition at line 35 of file filterimporterexporter.cpp.

◆ writeFiltersToConfig()

void FilterImporterExporter::writeFiltersToConfig ( const QVector< MailFilter * > &  filters,
KSharedConfig::Ptr  config,
bool  exportFilter = false 
)
static

Writes the given list of filters to the given config file.

Definition at line 72 of file filterimporterexporter.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Wed Sep 28 2022 03:59:03 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.