mailcommon
mailfilter.cpp
Go to the documentation of this file.
128 MailFilter::ReturnCode MailFilter::execActions( ItemContext &context, bool& stopIt, bool applyOnOutbound ) const
253 requiredPart = qMax( requiredPart, (int)pattern()->requiredPart() ) ; // no pattern means always matches?
268 bool MailFilter::folderRemoved( const Akonadi::Collection & aFolder, const Akonadi::Collection& aNewFolder )
418 KMessageBox::information( 0, i18n("<qt>Too many filter actions in filter rule <b>%1</b>.</qt>", mPattern.name() ) );
433 const bool ret = fa->argsFromStringInteractive( config.readEntry( argsName, QString() ), name() );
449 i18n("<qt>Unknown filter action <b>%1</b><br />in filter rule <b>%2</b>.<br />Ignoring it.</qt>",
457 FilterActionMissingAccountDialog *dlg = new FilterActionMissingAccountDialog(mAccounts, name());
550 if ( !Akonadi::AgentManager::self()->instances().isEmpty() ) { // safety test to ensure that Akonadi system is ready
585 result += QString("Filter is %1\n").arg(bEnabled ? QLatin1String("enabled") : QLatin1String("disabled"));
631 QDataStream& MailCommon::operator<<( QDataStream &stream, const MailCommon::MailFilter &filter )
void setConfigureShortcut(bool aShort)
Set whether this filter should be plugged into the filter menu.
Definition: mailfilter.cpp:317
void generateSieveScript(QStringList &requires, QString &code)
Definition: searchpattern.cpp:1894
static bool allAccountExist(const QStringList &lst)
Definition: filteractionmissingargumentdialog.cpp:396
Definition: mailfilter.h:59
QByteArray serialize() const
Writes the pattern into a byte array for persistance purposes.
Definition: searchpattern.cpp:1841
virtual SearchRule::RequiredPart requiredPart() const =0
Returns the required part from the item that is needed for the action to operate. ...
void readConfig(const KConfigGroup &config)
Reads a search pattern from a KConfigGroup.
Definition: searchpattern.cpp:1594
void setApplyOnOutbound(bool aApply=true)
Set whether this filter should be applied on outbound messages (aApply == true) or not...
Definition: mailfilter.cpp:192
void setShortcut(const KShortcut &shortcut)
Set the shortcut to be used if plugged into the filter menu or toolbar.
Definition: mailfilter.cpp:343
virtual QString argsAsString() const =0
Return extra arguments as string.
SearchRule::RequiredPart requiredPart(const QString &id) const
Returns the required part from the item that is needed for the filter to operate. ...
Definition: mailfilter.cpp:242
QList< FilterAction * > * actions()
Provides a reference to the internal action list.
Definition: mailfilter.cpp:172
const QString asString() const
Returns the filter in a human-readable form.
Definition: mailfilter.cpp:578
Definition: mailfilter.h:70
void generateSieveScript(QStringList &requires, QString &code)
Definition: mailfilter.cpp:468
static FilterLog * instance()
Returns the single global instance of the filter log.
Definition: filterlog.cpp:106
void setStopProcessingHere(bool aStop)
Definition: mailfilter.cpp:307
void setApplyBeforeOutbound(bool aApply=true)
Set whether this filter should be applied on outbound messages before sending (aApply == TRUE) or not...
Definition: mailfilter.cpp:197
void deserialize(const QByteArray &)
Constructs the pattern from a byte array serialization.
Definition: searchpattern.cpp:1849
bool isLogging() const
Returns whether the filter log is currently active.
Definition: filterlog.cpp:115
QString identifier() const
Returns the unique identifier of this filter.
Definition: mailfilter.cpp:118
void setToolbarName(const QString &toolbarName)
This sets the toolbar name for this filter.
Definition: mailfilter.cpp:338
virtual bool argsFromStringInteractive(const QString &argsStr, const QString &filterName)
Read extra arguments from given string.
Definition: filteraction.cpp:82
virtual bool isEmpty() const
Determines whether this action is valid.
Definition: filteraction.cpp:55
bool configureShortcut() const
Definition: mailfilter.cpp:323
bool configureToolbar() const
Definition: mailfilter.cpp:333
void writeConfig(KConfigGroup &config) const
Writes itself into config.
Definition: searchpattern.cpp:1674
This class is an abstraction of a search over messages.
Definition: searchpattern.h:595
bool applyOnAccount(const QString &id) const
Definition: mailfilter.cpp:289
void writeConfig(KConfigGroup &config, bool exportFilter) const
Write contents to given config group.
Definition: mailfilter.cpp:494
QStringList selectedAccount() const
Definition: filteractionmissingargumentdialog.cpp:391
bool stopProcessingHere() const
Definition: mailfilter.cpp:312
Auxiliary struct for FilterActionDict.
Definition: filteractiondict.h:36
static FilterActionDict * filterActionDict()
Returns the global filter action dictionary.
Definition: filtermanager.cpp:109
bool readConfig(const KConfigGroup &config, bool interactive=false)
Initialize from given config group.
Definition: mailfilter.cpp:374
bool folderRemoved(const Akonadi::Collection &aFolder, const Akonadi::Collection &aNewFolder)
Called from the filter manager when a folder is moved.
Definition: mailfilter.cpp:268
Definition: mailfilter.h:59
MAILCOMMON_EXPORT QDataStream & operator>>(QDataStream &stream, MailFilter &filter)
Definition: mailfilter.cpp:662
Definition: mailfilter.h:70
void setIcon(const QString &icon)
Set the icon to be used if plugged into the filter menu or toolbar.
Definition: mailfilter.cpp:353
AccountType applicability() const
Definition: mailfilter.cpp:237
void setApplicability(AccountType aApply=All)
Set whether this filter should be applied on inbound messages for all accounts (aApply == All) or inb...
Definition: mailfilter.cpp:232
MAILCOMMON_EXPORT QDataStream & operator<<(QDataStream &stream, const MailFilter &filter)
Definition: mailfilter.cpp:631
virtual void argsFromString(const QString &argsStr)=0
Read extra arguments from given string.
void setConfigureToolbar(bool aTool)
Set whether this filter should be plugged into the toolbar.
Definition: mailfilter.cpp:328
void setAutoNaming(bool useAutomaticNames)
Set the mode for using automatic naming for the filter.
Definition: mailfilter.cpp:363
ReturnCode execActions(ItemContext &context, bool &stopIt, bool applyOnOutbound) const
Execute the filter action(s) on the given message.
Definition: mailfilter.cpp:128
void setApplyOnExplicit(bool aApply=true)
Set whether this filter should be applied on explicit (CTRL-J) filtering (aApply == true) or not...
Definition: mailfilter.cpp:222
void setApplyOnInbound(bool aApply=true)
Set whether this filter should be applied on inbound messages (aApply == true) or not...
Definition: mailfilter.cpp:212
Definition: mailfilter.h:70
void add(const QString &entry, ContentType type)
Adds the given log entry under the given content type to the log.
Definition: filterlog.cpp:163
void setApplyOnAccount(const QString &id, bool aApply=true)
Set whether this filter should be applied on inbound messages for the account with id (id)...
Definition: mailfilter.cpp:280
bool applyBeforeOutbound() const
Definition: mailfilter.cpp:207
SearchPattern * pattern()
Provides a reference to the internal pattern.
Definition: mailfilter.cpp:182
Definition: mailfilter.h:42
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:15 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:15 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.