Mailcommon

filteractionwithaddress.h
1/*
2 * SPDX-FileCopyrightText: 1996-1998 Stefan Taferner <taferner@kde.org>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 *
6 */
7
8#pragma once
9
10#include "filteractionwithstring.h"
11
12namespace 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 <mutz@kde.org>, based upon work by Stefan Taferner <taferner@kde.org>
27 * @see FilterActionWithString FilterAction Filter
28 */
30{
32
33public:
34 /**
35 * @copydoc FilterAction::FilterAction
36 */
38
39 /**
40 * @copydoc FilterAction::createParamWidget
41 */
42 [[nodiscard]] 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}
Abstract base class for filter actions with a mail address as parameter.
QWidget * createParamWidget(QWidget *parent) const override
Creates a widget for setting the filter action parameter.
FilterActionWithAddress(const QString &name, const QString &label, QObject *parent=nullptr)
Creates a new filter action.
void applyParamWidgetValue(QWidget *paramWidget) override
The filter action shall set it's parameter from the widget's contents.
void setParamWidgetValue(QWidget *paramWidget) const override
The filter action shall set it's widget's contents from it's parameter.
void clearParamWidget(QWidget *paramWidget) const override
The filter action shall clear it's parameter widget's contents.
Abstract base class for filter actions with a free-form string as parameter.
QString name() const
Returns identifier name, ie.
QString label() const
Returns i18n'd label, ie.
The filter dialog.
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.