• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

mailcommon

  • sources
  • kde-4.12
  • kdepim
  • mailcommon
  • filter
filterimporterexporter.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2007 Till Adam <adam@kde.org>
3  Copyright (c) 2012 Laurent Montel <montel@kde.org>
4 
5  This program is free software; you can redistribute it and/or modify it
6  under the terms of the GNU General Public License, version 2, as
7  published by the Free Software Foundation.
8 
9  This program is distributed in the hope that it will be useful, but
10  WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 
18  In addition, as a special exception, the copyright holders give
19  permission to link the code of this program with any edition of
20  the Qt library by Trolltech AS, Norway (or with modified versions
21  of Qt that use the same license as Qt), and distribute linked
22  combinations including the two. You must obey the GNU General
23  Public License in all respects for all of the code used other than
24  Qt. If you modify this file, you may extend this exception to
25  your version of the file, but you are not obligated to do so. If
26  you do not wish to do so, delete this exception statement from
27  your version.
28 */
29 
30 #ifndef MAILCOMMON_FILTERIMPORTEREXPORTER_H
31 #define MAILCOMMON_FILTERIMPORTEREXPORTER_H
32 
33 #include "../mailcommon_export.h"
34 
35 #include <KSharedConfig>
36 #include <KUrl>
37 
38 #include <QList>
39 #include <QStringList>
40 
41 class QWidget;
42 
43 namespace MailCommon
44 {
45 
46 class MailFilter;
47 
53 class MAILCOMMON_EXPORT FilterImporterExporter
54 {
55 public:
56  enum FilterType {
57  KMailFilter = 0,
58  ThunderBirdFilter = 1,
59  EvolutionFilter = 2,
60  SylpheedFilter = 3,
61  ProcmailFilter = 4,
62  BalsaFilter = 5,
63  ClawsMailFilter = 6
64  };
65 
71  explicit FilterImporterExporter( QWidget *parent = 0 );
72 
76  virtual ~FilterImporterExporter();
77 
83  void exportFilters(const QList<MailFilter*> &filters , const KUrl &fileName = KUrl(), bool saveAll = false);
84 
89  QList<MailFilter*> importFilters(
90  bool &canceled,
91  FilterImporterExporter::FilterType type = FilterImporterExporter::KMailFilter, const QString& filename = QString() );
92 
96  static void writeFiltersToConfig(
97  const QList<MailFilter*> &filters,
98  KSharedConfig::Ptr config,
99  bool exportFilter = false );
100 
105  static QList<MailFilter*> readFiltersFromConfig(
106  const KSharedConfig::Ptr config,
107  QStringList &emptyFilter );
108 
109 private:
110  //@cond PRIVATE
111  Q_DISABLE_COPY( FilterImporterExporter )
112 
113  class Private;
114  Private *const d;
115  //@endcond
116 };
117 
118 }
119 
120 #endif
QWidget
MailCommon::FilterImporterExporter
Utility class that provides persisting of filters to/from KConfig.
Definition: filterimporterexporter.h:53
MailCommon::FilterImporterExporter::FilterType
FilterType
Definition: filterimporterexporter.h:56
MAILCOMMON_EXPORT
#define MAILCOMMON_EXPORT
Definition: mailcommon_export.h:35
QList
MailCommon::FilterImporterExporter::KMailFilter
Definition: filterimporterexporter.h:57
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:14 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

mailcommon

Skip menu "mailcommon"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal