MailCommon::FilterActionDict
#include <filteractiondict.h>
Public Member Functions | |
MAILCOMMON_EXPORT | FilterActionDict () |
virtual MAILCOMMON_EXPORT | ~FilterActionDict () |
MAILCOMMON_EXPORT void | insert (FilterActionNewFunc aNewFunc) |
MAILCOMMON_EXPORT const QList< FilterActionDesc * > & | list () const |
Public Member Functions inherited from QMultiHash< QString, FilterActionDesc * > | |
QMultiHash (const QHash< Key, T > &other) | |
QMultiHash (InputIterator begin, InputIterator end) | |
QMultiHash (std::initializer_list< std::pair< Key, T > > list) | |
auto | asKeyValueRange () & |
auto | asKeyValueRange () && |
auto | asKeyValueRange () const &&const |
auto | asKeyValueRange () const &const |
iterator | begin () |
const_iterator | begin () const const |
const_iterator | cbegin () const const |
const_iterator | cend () const const |
void | clear () |
const_iterator | constBegin () const const |
const_iterator | constEnd () const const |
const_iterator | constFind (const Key &key, const T &value) const const |
const_key_value_iterator | constKeyValueBegin () const const |
const_key_value_iterator | constKeyValueEnd () const const |
bool | contains (const Key &key, const T &value) const const |
qsizetype | count (const Key &key, const T &value) const const |
iterator | emplace (const Key &key, Args &&... args) |
iterator | emplace (Key &&key, Args &&... args) |
iterator | emplaceReplace (const Key &key, Args &&... args) |
iterator | emplaceReplace (Key &&key, Args &&... args) |
iterator | end () |
const_iterator | end () const const |
QPair< iterator, iterator > | equal_range (const Key &key) |
QPair< const_iterator, const_iterator > | equal_range (const Key &key) const const |
qsizetype | erase_if (QMultiHash< Key, T > &hash, Predicate pred) |
iterator | find (const Key &key, const T &value) |
const_iterator | find (const Key &key, const T &value) const const |
iterator | insert (const Key &key, const T &value) |
Key | key (const T &value) const const |
Key | key (const T &value, const Key &defaultKey) const const |
key_iterator | keyBegin () const const |
key_iterator | keyEnd () const const |
QList< Key > | keys () const const |
key_value_iterator | keyValueBegin () |
const_key_value_iterator | keyValueBegin () const const |
key_value_iterator | keyValueEnd () |
const_key_value_iterator | keyValueEnd () const const |
QMultiHash< Key, T > | operator+ (const QMultiHash< Key, T > &other) const const |
QMultiHash< Key, T > & | operator+= (const QMultiHash< Key, T > &other) |
QDataStream & | operator<< (QDataStream &out, const QMultiHash< Key, T > &hash) |
QDataStream & | operator>> (QDataStream &in, QMultiHash< Key, T > &hash) |
T & | operator[] (const Key &key) |
size_t | qHash (const QMultiHash< Key, T > &key, size_t seed) |
qsizetype | remove (const Key &key) |
qsizetype | remove (const Key &key, const T &value) |
qsizetype | removeIf (Predicate pred) |
iterator | replace (const Key &key, const T &value) |
void | swap (QMultiHash< Key, T > &other) |
T | take (const Key &key) |
QList< Key > | uniqueKeys () const const |
QMultiHash< Key, T > & | unite (const QHash< Key, T > &other) |
QMultiHash< Key, T > & | unite (const QMultiHash< Key, T > &other) |
T | value (const Key &key) const const |
T | value (const Key &key, const T &defaultValue) const const |
QList< T > | values () const const |
QList< T > | values (const Key &key) const const |
Protected Member Functions | |
virtual void | init () |
Additional Inherited Members | |
Public Types inherited from QMultiHash< QString, FilterActionDesc * > | |
typedef | const_key_value_iterator |
typedef | key_value_iterator |
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.
- See also
- FilterAction FilterActionDesc Filter
Definition at line 52 of file filteractiondict.h.
Constructor & Destructor Documentation
◆ FilterActionDict()
FilterActionDict::FilterActionDict | ( | ) |
Creates the filter action dictionary.
Definition at line 74 of file filteractiondict.cpp.
◆ ~FilterActionDict()
|
virtual |
Destroys the filter action dictionary.
Definition at line 39 of file filteractiondict.cpp.
Member Function Documentation
◆ init()
|
protectedvirtual |
Populate the dictionary with all known FilterAction types.
Called automatically from the constructor.
Definition at line 44 of file filteractiondict.cpp.
◆ insert()
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 80 of file filteractiondict.cpp.
◆ list()
const QList< FilterActionDesc * > & FilterActionDict::list | ( | ) | const |
Provides read-only access to a list of all known filter actions.
Definition at line 95 of file filteractiondict.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:01 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.