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

mailcommon

  • MailCommon
  • FilterActionDict
Public Member Functions | Protected Member Functions | List of all members
MailCommon::FilterActionDict Class Reference

#include <filteractiondict.h>

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

Public Member Functions

MAILCOMMON_EXPORT FilterActionDict ()
 
virtual MAILCOMMON_EXPORT ~FilterActionDict ()
 
MAILCOMMON_EXPORT void insert (FilterActionNewFunc aNewFunc)
 
MAILCOMMON_EXPORT const QList
< FilterActionDesc * > & 
list () const
 

Protected Member Functions

virtual void init ()
 

Detailed Description

List of known FilterAction-types.

Dictionary that contains a list of all registered filter actions with their creation functions. They are hard-coded into the constructor. If you want to add a new FilterAction, make sure you add the details of it in init, too.

You will be able to find a description of a FilterAction by looking up either it's (english) name or it's (i18n) label:

FilterActionDict dict;
// get name of the action with label "move into folder":
dict[i18n("move into folder")]->name; // == "transfer"
// create one such action:
FilterAction *action = dict["transfer"]->create();

You can iterate over all known filter actions by using list.

Author
Marc Mutz mutz@.nosp@m.kde..nosp@m.org, based on work by Stefan Taferner tafer.nosp@m.ner@.nosp@m.kde.o.nosp@m.rg
See also
FilterAction FilterActionDesc Filter

Definition at line 65 of file filteractiondict.h.

Constructor & Destructor Documentation

FilterActionDict::FilterActionDict ( )

Creates the filter action dictionary.

Definition at line 87 of file filteractiondict.cpp.

FilterActionDict::~FilterActionDict ( )
virtual

Destroys the filter action dictionary.

Definition at line 52 of file filteractiondict.cpp.

Member Function Documentation

void FilterActionDict::init ( )
protectedvirtual

Populate the dictionary with all known FilterAction types.

Called automatically from the constructor.

Definition at line 57 of file filteractiondict.cpp.

void FilterActionDict::insert ( FilterActionNewFunc  aNewFunc)

Overloaded member function, provided for convenience.

Thin wrapper around QDict::insert and QPtrList::insert. Inserts the resulting FilterActionDesc thrice: First with the name, then with the label as key into the QDict, then into the QPtrList. For that, it creates an instance of the action internally and deletes it again after querying it for name and label.

Definition at line 93 of file filteractiondict.cpp.

const QList< FilterActionDesc * > & FilterActionDict::list ( ) const

Provides read-only access to a list of all known filter actions.

Definition at line 108 of file filteractiondict.cpp.


The documentation for this class was generated from the following files:
  • filteractiondict.h
  • filteractiondict.cpp
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

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