kmail

KMFilterActionWithUrl Class Reference

#include <kmfilteraction.h>

Inheritance diagram for KMFilterActionWithUrl:

KMFilterAction KMFilterActionWithCommand List of all members.

Detailed Description

Abstract base class for KMail's filter actions that need a command line as parameter, e.g.Abstract base class for filter actions with a command line as parameter.

'forward to'. Can create a QLineEdit (are there better widgets in the depths of the kdelibs?) as parameter widget. A subclass of this must provide at least implementations for the following methods:

The implementation of KMFilterAction::process should take the command line specified in mParameter, make all required modifications and stream the resulting command line into mProcess. Then you can start the command with mProcess.start().

Author:
Marc Mutz <Marc@Mutz.com>, based upon work by Stefan Taferner <taferner@kde.org>
See also:
KMFilterActionWithString KMFilterAction KMFilter KProcess

Definition at line 514 of file kmfilteraction.h.


Public Member Functions

 KMFilterActionWithUrl (const char *aName, const QString aLabel)
 ~KMFilterActionWithUrl ()
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)
virtual const QString argsAsString () const
virtual const QString displayString () const

Protected Attributes

QString mParameter

Constructor & Destructor Documentation

KMFilterActionWithUrl::KMFilterActionWithUrl ( const char *  aName,
const QString  aLabel 
)

Initialize filter action with (english) name aName.

This is the name under which this action is known in the config file.

Definition at line 1815 of file kmfilteraction.cpp.


Member Function Documentation

virtual bool KMFilterActionWithUrl::isEmpty (  )  const [inline, virtual]

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 from KMFilterAction.

Definition at line 525 of file kmfilteraction.h.

QWidget * KMFilterActionWithUrl::createParamWidget ( QWidget *  parent  )  const [virtual]

Creates a widget for setting the filter action parameter.

Also sets the value of the widget.

Reimplemented from KMFilterAction.

Reimplemented in KMFilterActionWithCommand.

Definition at line 1824 of file kmfilteraction.cpp.

void KMFilterActionWithUrl::applyParamWidgetValue ( QWidget *  paramWidget  )  [virtual]

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 from KMFilterAction.

Reimplemented in KMFilterActionWithCommand.

Definition at line 1832 of file kmfilteraction.cpp.

void KMFilterActionWithUrl::setParamWidgetValue ( QWidget *  paramWidget  )  const [virtual]

The filter action shall set it's widget's contents from it's parameter.

Reimplemented from KMFilterAction.

Reimplemented in KMFilterActionWithCommand.

Definition at line 1837 of file kmfilteraction.cpp.

void KMFilterActionWithUrl::clearParamWidget ( QWidget *  paramWidget  )  const [virtual]

The filter action shall clear it's parameter widget's contents.

Reimplemented from KMFilterAction.

Reimplemented in KMFilterActionWithCommand.

Definition at line 1842 of file kmfilteraction.cpp.

void KMFilterActionWithUrl::argsFromString ( const QString  argsStr  )  [virtual]

Read extra arguments from given string.

Implements KMFilterAction.

Definition at line 1847 of file kmfilteraction.cpp.

const QString KMFilterActionWithUrl::argsAsString (  )  const [virtual]

Return extra arguments as string.

Must not contain newlines.

Implements KMFilterAction.

Definition at line 1852 of file kmfilteraction.cpp.

const QString KMFilterActionWithUrl::displayString (  )  const [virtual]

Returns a translated string describing this filter for visualization purposes, e.g.

in the filter log.

Implements KMFilterAction.

Definition at line 1857 of file kmfilteraction.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys