Mailcommon

filteractionwithaddress.h
1 /*
2  * SPDX-FileCopyrightText: 1996-1998 Stefan Taferner <[email protected]>
3  *
4  * SPDX-License-Identifier: GPL-2.0-or-later
5  *
6  */
7 
8 #pragma once
9 
10 #include "filteractionwithstring.h"
11 
12 namespace MailCommon
13 {
14 /**
15  * @short Abstract base class for filter actions with a mail address as parameter.
16  *
17  * Abstract base class for mail filter actions that need a mail
18  * address as parameter, e.g. 'forward to'. Can create a
19  * KComboBox (capable of completion from the address book) as
20  * parameter widget. A subclass of this must provide at least
21  * implementations for the following methods:
22  *
23  * @li virtual FilterAction::ReturnCodes FilterAction::process
24  * @li static FilterAction::newAction
25  *
26  * @author Marc Mutz <[email protected]>, based upon work by Stefan Taferner <[email protected]>
27  * @see FilterActionWithString FilterAction Filter
28  */
30 {
31  Q_OBJECT
32 
33 public:
34  /**
35  * @copydoc FilterAction::FilterAction
36  */
37  FilterActionWithAddress(const QString &name, const QString &label, QObject *parent = nullptr);
38 
39  /**
40  * @copydoc FilterAction::createParamWidget
41  */
42  Q_REQUIRED_RESULT QWidget *createParamWidget(QWidget *parent) const override;
43 
44  /**
45  * @copydoc FilterAction::applyParamWidgetValue
46  */
47  void applyParamWidgetValue(QWidget *paramWidget) override;
48 
49  /**
50  * @copydoc FilterAction::setParamWidgetValue
51  */
52  void setParamWidgetValue(QWidget *paramWidget) const override;
53 
54  /**
55  * @copydoc FilterAction::clearParamWidget
56  */
57  void clearParamWidget(QWidget *paramWidget) const override;
58 };
59 }
Q_OBJECTQ_OBJECT
Abstract base class for filter actions with a mail address as parameter.
void applyParamWidgetValue(QWidget *paramWidget) override
The filter action shall set it's parameter from the widget's contents.
FilterActionWithAddress(const QString &name, const QString &label, QObject *parent=nullptr)
Creates a new filter action.
void setParamWidgetValue(QWidget *paramWidget) const override
The filter action shall set it's widget's contents from it's parameter.
QString name() const
Returns identifier name, ie.
QString label() const
Returns i18n'd label, ie.
void clearParamWidget(QWidget *paramWidget) const override
The filter action shall clear it's parameter widget's contents.
QObject * parent() const const
QWidget * createParamWidget(QWidget *parent) const override
Creates a widget for setting the filter action parameter.
Abstract base class for filter actions with a free-form string as parameter.
The filter dialog.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Sep 24 2022 03:58:15 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.