KMFilterAction Class Reference
Abstract base class for KMail's filter actions. Abstract base class for KMail's filter actions. More...
#include <kmfilteraction.h>
Inheritance diagram for KMFilterAction:

Public Types | |
enum | ReturnCode { ErrorNeedComplete = 0x1, GoOn = 0x2, ErrorButGoOn = 0x4, CriticalError = 0x8 } |
Public Member Functions | |
KMFilterAction (const char *aName, const QString aLabel) | |
const QString | label () const |
const QString | name () const |
virtual ReturnCode | process (KMMessage *msg) const =0 |
virtual void | processAsync (KMMessage *msg) const |
virtual bool | requiresBody (KMMsgBase *msgBase) const |
virtual bool | isEmpty () const |
virtual QWidget * | createParamWidget (QWidget *parent) const |
virtual void | applyParamWidgetValue (QWidget *paramWidget) |
virtual void | setParamWidgetValue (QWidget *paramWidget) const |
virtual void | clearParamWidget (QWidget *paramWidget) const |
virtual void | argsFromString (const QString argsStr)=0 |
virtual const QString | argsAsString () const =0 |
virtual bool | folderRemoved (KMFolder *aFolder, KMFolder *aNewFolder) |
Static Public Member Functions | |
KMFilterAction * | newAction () |
int | tempOpenFolder (KMFolder *aFolder) |
void | sendMDN (KMMessage *msg, KMime::MDN::DispositionType d, const QValueList< KMime::MDN::DispositionModifier > &m=QValueList< KMime::MDN::DispositionModifier >()) |
Detailed Description
Abstract base class for KMail's filter actions. Abstract base class for KMail's filter actions.All it can do is hold a name (ie. type-string). There are several sub-classes that inherit form this and are capable of providing parameter handling (import/export as string, a widget to allow editing, etc.)
- Author:
- Marc Mutz <Marc@Mutz.com>, based on work by Stefan Taferner <taferner@kde.org>.
- See also:
- KMFilter KMFilterMgr
Definition at line 42 of file kmfilteraction.h.
Member Enumeration Documentation
|
Possible return codes of process:.
Definition at line 60 of file kmfilteraction.h. Referenced by processAsync(). |
Constructor & Destructor Documentation
|
Initialize filter action with (english) name
Definition at line 53 of file kmfilteraction.cpp. References KMFilterAction(). Referenced by KMFilterAction(). |
Member Function Documentation
|
Returns nationalized label, ie. the one which is presented in the filter dialog. Definition at line 69 of file kmfilteraction.h. Referenced by KMFilterActionDict::insert(), and KMFilterActionWidget::setAction(). |
|
Returns english name, ie. the one under which it is known in the config. Definition at line 73 of file kmfilteraction.h. Referenced by KMFilterActionDict::insert(). |
|
Execute action on given message.
Returns Referenced by processAsync(). |
|
Execute an action on given message asynchronously. Emits a result signal on completion. Definition at line 63 of file kmfilteraction.cpp. References process(), processAsync(), and ReturnCode. Referenced by processAsync(). |
|
Determines if the action depends on the body of the message.
Definition at line 71 of file kmfilteraction.cpp. References requiresBody(). Referenced by requiresBody(). |
|
Determines whether this action is valid. But this is just a quick test. Eg., actions that have a mail address as parameter shouldn't try real address validation, but only check if the string representation is empty. Reimplemented in KMFilterActionWithString, KMFilterActionWithUOID, KMFilterActionWithFolder, and KMFilterActionWithUrl. Definition at line 97 of file kmfilteraction.h. |
|
Creates a widget for setting the filter action parameter. Also sets the value of the widget. Reimplemented in KMFilterActionWithString, KMFilterActionWithStringList, KMFilterActionWithFolder, KMFilterActionWithAddress, and KMFilterActionWithUrl. Definition at line 81 of file kmfilteraction.cpp. References createParamWidget(). Referenced by createParamWidget(), and KMFilterActionWidget::KMFilterActionWidget(). |
|
The filter action shall set it's parameter from the widget's contents. It is allowed that the value is read by the action before this function is called. Reimplemented in KMFilterActionWithString, KMFilterActionWithStringList, KMFilterActionWithFolder, KMFilterActionWithAddress, and KMFilterActionWithUrl. Definition at line 86 of file kmfilteraction.cpp. References applyParamWidgetValue(). Referenced by KMFilterActionWidget::action(), and applyParamWidgetValue(). |
|
The filter action shall set it's widget's contents from it's parameter.
Reimplemented in KMFilterActionWithString, KMFilterActionWithStringList, KMFilterActionWithFolder, KMFilterActionWithAddress, and KMFilterActionWithUrl. Definition at line 90 of file kmfilteraction.cpp. References setParamWidgetValue(). Referenced by KMFilterActionWidget::setAction(), and setParamWidgetValue(). |
|
The filter action shall clear it's parameter widget's contents.
Reimplemented in KMFilterActionWithString, KMFilterActionWithStringList, KMFilterActionWithFolder, KMFilterActionWithAddress, and KMFilterActionWithUrl. Definition at line 94 of file kmfilteraction.cpp. References clearParamWidget(). Referenced by clearParamWidget(). |
|
Read extra arguments from given string.
Implemented in KMFilterActionWithNone, KMFilterActionWithString, KMFilterActionWithUOID, KMFilterActionWithStringList, KMFilterActionWithFolder, and KMFilterActionWithUrl. Referenced by KMail::AntiSpamWizard::accept(). |
|
Return extra arguments as string. Must not contain newlines. Implemented in KMFilterActionWithNone, KMFilterActionWithString, KMFilterActionWithUOID, KMFilterActionWithFolder, and KMFilterActionWithUrl. |
|
Called from the filter when a folder is removed.
Tests if the folder Reimplemented in KMFilterActionWithFolder. Definition at line 98 of file kmfilteraction.cpp. References folderRemoved(). Referenced by folderRemoved(). |
|
Static function that creates a filter action of this type.
Definition at line 76 of file kmfilteraction.cpp. |
|
Temporarily open folder. Will be closed by the next KMFilterMgr::cleanup() call. Definition at line 103 of file kmfilteraction.cpp. References tempOpenFolder(). Referenced by tempOpenFolder(). |
|
Automates the sending of MDNs from filter actions.
Definition at line 108 of file kmfilteraction.cpp. References sendMDN(). Referenced by sendMDN(). |
The documentation for this class was generated from the following files: