mailcommon
Go to the documentation of this file.
20 #ifndef MAILCOMMON_MAILFILTER_H
21 #define MAILCOMMON_MAILFILTER_H
23 #include "../mailcommon_export.h"
26 #include "../search/searchpattern.h"
28 #include <kshortcut.h>
29 #include <akonadi/collection.h>
31 #include <kmime/kmime_message.h>
33 #include <QtCore/QDataStream>
37 namespace MailCommon {
78 explicit MailFilter(
const KConfigGroup & aConfig,
bool internal,
bool & needUpdate );
86 void generateRandomIdentifier();
107 ReturnCode execActions(
ItemContext &
context,
bool& stopIt ,
bool applyOnOutbound)
const ;
115 void writeConfig( KConfigGroup& config,
bool exportFilter )
const;
118 bool readConfig(
const KConfigGroup& config,
bool interactive =
false );
121 QString purify(
bool removeAction =
true);
124 bool isEmpty()
const;
148 void setApplyOnOutbound(
bool aApply =
true );
154 void setApplyBeforeOutbound(
bool aApply =
true );
160 bool applyOnOutbound()
const;
166 bool applyBeforeOutbound()
const;
172 void setApplyOnInbound(
bool aApply =
true );
178 bool applyOnInbound()
const;
184 void setApplyOnExplicit(
bool aApply =
true );
190 bool applyOnExplicit()
const;
199 void setApplicability( AccountType aApply = All );
207 AccountType applicability()
const;
215 void setApplyOnAccount(
const QString&
id,
bool aApply =
true );
221 bool applyOnAccount(
const QString &
id )
const;
223 void setStopProcessingHere(
bool aStop );
224 bool stopProcessingHere()
const;
228 void setConfigureShortcut(
bool aShort );
234 bool configureShortcut()
const;
240 void setConfigureToolbar(
bool aTool );
246 bool configureToolbar()
const;
260 void setToolbarName(
const QString &toolbarName );
266 void setShortcut(
const KShortcut &shortcut );
271 const KShortcut & shortcut()
const;
277 void setIcon(
const QString &icon );
291 void folderRemoved(
const Akonadi::Collection& aFolder,
const Akonadi::Collection& aNewFolder );
296 const QString asString()
const;
302 void setAutoNaming(
bool useAutomaticNames );
306 bool isAutoNaming()
const;
310 bool isEnabled()
const;
311 void setEnabled(
bool );
323 bool bApplyOnInbound : 1;
324 bool bApplyBeforeOutbound : 1;
325 bool bApplyOnOutbound : 1;
326 bool bApplyOnExplicit : 1;
327 bool bStopProcessingHere : 1;
328 bool bConfigureShortcut : 1;
329 bool bConfigureToolbar : 1;
330 bool bAutoNaming : 1;
332 AccountType mApplicability;
ReturnCode
Result codes returned by process.
const int FILTER_MAX_ACTIONS
This class is an abstraction of a search over messages.
#define MAILCOMMON_EXPORT
AccountType
Account type codes used by setApplicability.
MAILCOMMON_EXPORT QDataStream & operator>>(QDataStream &stream, MailFilter &filter)
MAILCOMMON_EXPORT QDataStream & operator<<(QDataStream &stream, const MailFilter &filter)
A helper class for the filtering process.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:31:40 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.