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

mailcommon

  • MailCommon
  • FilterManager
Public Types | Signals | Public Member Functions | Static Public Member Functions | List of all members
MailCommon::FilterManager Class Reference

#include <filtermanager.h>

Inheritance diagram for MailCommon::FilterManager:
Inheritance graph
[legend]

Public Types

enum  FilterSet {
  NoSet = 0x0, Inbound = 0x1, Outbound = 0x2, Explicit = 0x4,
  BeforeOutbound = 0x8, All = Inbound|BeforeOutbound|Outbound|Explicit
}
 

Signals

void filtersChanged ()
 
void loadingFiltersDone ()
 
void tagListingFinished ()
 

Public Member Functions

void appendFilters (const QList< MailCommon::MailFilter * > &filters, bool replaceIfNameExists=false)
 
void beginUpdate ()
 
QString createUniqueFilterName (const QString &name) const
 
void endUpdate ()
 
void filter (const Akonadi::Item &item, const QString &identifier, const QString &resourceId) const
 
void filter (const Akonadi::Item &item, FilterSet set=Inbound, bool account=false, const QString &resourceId=QString()) const
 
void filter (const Akonadi::Item::List &messages, FilterSet set=Explicit) const
 
void filter (const Akonadi::Item::List &messages, SearchRule::RequiredPart requiredPart, const QStringList &listFilters) const
 
QList< MailCommon::MailFilter * > filters () const
 
bool initialized () const
 
bool isValid () const
 
void removeFilter (MailCommon::MailFilter *filter)
 
void setFilters (const QList< MailCommon::MailFilter * > &filters)
 
void showFilterLogDialog (qlonglong windowId)
 
QMap< QUrl, QString > tagList () const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
 QObject (QObject *parent, const char *name)
 
virtual  ~QObject ()
 
bool blockSignals (bool block)
 
QObject * child (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
const char * className () const
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const QObject *receiver, const char *method)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QByteArray > dynamicPropertyNames () const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
T findChild (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QList< T > findChildren (const QString &name) const
 
bool inherits (const char *className) const
 
void insertChild (QObject *object)
 
void installEventFilter (QObject *filterObj)
 
bool isA (const char *className) const
 
bool isWidgetType () const
 
void killTimer (int id)
 
virtual const QMetaObject * metaObject () const
 
void moveToThread (QThread *targetThread)
 
const char * name () const
 
const char * name (const char *defaultName) const
 
QString objectName () const
 
QObject * parent () const
 
QVariant property (const char *name) const
 
void removeChild (QObject *object)
 
void removeEventFilter (QObject *obj)
 
void setName (const char *name)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval)
 
QThread * thread () const
 

Static Public Member Functions

static FilterActionDict * filterActionDict ()
 
static FilterManager * instance ()
 
- Static Public Member Functions inherited from QObject
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 

Additional Inherited Members

- Protected Member Functions inherited from QObject
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const char *signal)
 
int receivers (const char *signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Properties inherited from QObject
 objectName
 

Detailed Description

A wrapper class that allows easy access to the mail filters.

This class communicates with the mailfilter agent via DBus.

Definition at line 40 of file filtermanager.h.

Member Enumeration Documentation

enum MailCommon::FilterManager::FilterSet

Describes the list of filters.

Enumerator
NoSet 
Inbound 
Outbound 
Explicit 
BeforeOutbound 
All 

Definition at line 48 of file filtermanager.h.

Member Function Documentation

void FilterManager::appendFilters ( const QList< MailCommon::MailFilter * > &  filters,
bool  replaceIfNameExists = false 
)

Manage filters interface.

Appends the list of filters to the current list of filters and write everything back into the configuration. The filter manager takes ownership of the filters in the list.

Definition at line 261 of file filtermanager.cpp.

void FilterManager::beginUpdate ( )

Should be called at the beginning of an filter list update.

Definition at line 289 of file filtermanager.cpp.

QString FilterManager::createUniqueFilterName ( const QString &  name) const

Checks for existing filters with the name and extend the "name" to "name (i)" until no match is found for i=1..n.

Definition at line 208 of file filtermanager.cpp.

void FilterManager::endUpdate ( )

Should be called at the end of an filter list update.

Definition at line 293 of file filtermanager.cpp.

void FilterManager::filter ( const Akonadi::Item &  item,
const QString &  identifier,
const QString &  resourceId 
) const

Apply filters interface.

Applies filter with the given identifier on the message item.

Returns
true on success, false otherwise.

Definition at line 218 of file filtermanager.cpp.

void FilterManager::filter ( const Akonadi::Item &  item,
FilterSet  set = Inbound,
bool  account = false,
const QString &  resourceId = QString() 
) const

Process given message item by applying the filter rules one by one.

You can select which set of filters (incoming or outgoing) should be used.

Parameters
itemThe message item to process.
setSelect the filter set to use.
accounttrue if an account id is specified else false
accountIdThe id of the resource that the message was retrieved from

Definition at line 223 of file filtermanager.cpp.

void FilterManager::filter ( const Akonadi::Item::List &  messages,
FilterManager::FilterSet  set = Explicit 
) const

Process given messages by applying the filter rules one by one.

You can select which set of filters (incoming or outgoing) should be used.

Parameters
itemThe message item to process.
setSelect the filter set to use.

Definition at line 228 of file filtermanager.cpp.

void FilterManager::filter ( const Akonadi::Item::List &  messages,
SearchRule::RequiredPart  requiredPart,
const QStringList &  listFilters 
) const

Definition at line 239 of file filtermanager.cpp.

FilterActionDict * FilterManager::filterActionDict ( )
static

Returns the global filter action dictionary.

Definition at line 106 of file filtermanager.cpp.

QList< MailCommon::MailFilter * > FilterManager::filters ( ) const

Returns the filter list of the manager.

Definition at line 256 of file filtermanager.cpp.

void MailCommon::FilterManager::filtersChanged ( )
signal

This signal is emitted whenever the filter list has been updated.

bool FilterManager::initialized ( ) const

Definition at line 151 of file filtermanager.cpp.

FilterManager * FilterManager::instance ( )
static

Returns the global filter manager object.

Definition at line 98 of file filtermanager.cpp.

bool FilterManager::isValid ( ) const

Returns whether the filter manager is in a usable state.

Definition at line 203 of file filtermanager.cpp.

void MailCommon::FilterManager::loadingFiltersDone ( )
signal
void FilterManager::removeFilter ( MailCommon::MailFilter *  filter)

Removes the given filter from the list.

The filter object is not deleted.

Definition at line 282 of file filtermanager.cpp.

void FilterManager::setFilters ( const QList< MailCommon::MailFilter * > &  filters)

Replace the list of filters of the filter manager with the given list of filters.

The manager takes ownership of the filters.

Definition at line 248 of file filtermanager.cpp.

void FilterManager::showFilterLogDialog ( qlonglong  windowId)

Shows the filter log dialog.

This is used to debug problems with filters.

Definition at line 213 of file filtermanager.cpp.

QMap< QUrl, QString > FilterManager::tagList ( ) const

Definition at line 198 of file filtermanager.cpp.

void MailCommon::FilterManager::tagListingFinished ( )
signal

The documentation for this class was generated from the following files:
  • filtermanager.h
  • filtermanager.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:31:41 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
  • pimprint

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