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 QList< MailFilter * > &filters, const QUrl &fileName=QUrl(), bool saveAll=false)
 
QList< MailFilter * > importFilters (bool &canceled, FilterImporterExporter::FilterType type=FilterImporterExporter::KMailFilter, const QString &filename=QString())
 

Static Public Member Functions

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

Detailed Description

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

Author
Till Adam till@.nosp@m.kdab.nosp@m..net

Definition at line 29 of file filterimporterexporter.h.

Member Enumeration Documentation

◆ FilterType

enum MailCommon::FilterImporterExporter::FilterType

Definition at line 32 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 120 of file filterimporterexporter.cpp.

◆ ~FilterImporterExporter()

FilterImporterExporter::~FilterImporterExporter ( )
virtualdefault

Destroys the filter importer/exporter.

Member Function Documentation

◆ exportFilters()

void FilterImporterExporter::exportFilters ( const QList< 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 311 of file filterimporterexporter.cpp.

◆ importFilters()

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

Imports filters.

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

Definition at line 127 of file filterimporterexporter.cpp.

◆ readFiltersFromConfig()

QList< 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 33 of file filterimporterexporter.cpp.

◆ writeFiltersToConfig()

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

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

Definition at line 70 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-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:01 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.