Mailcommon

filteractionwithuoid.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 "filteraction.h"
11 
12 namespace MailCommon
13 {
14 /**
15  * @short Abstract base class for filter actions with a free-form string as parameter.
16  *
17  * Abstract base class for mail filter actions that need a
18  * parameter that has a UOID, e.g. "set identity". A subclass of this
19  * must provide at least implementations for the following methods:
20  *
21  * @li virtual FilterAction::ReturnCodes FilterAction::process
22  * @li static FilterAction::newAction
23  * @li the *ParamWidget* methods.
24  *
25  * @author Marc Mutz <[email protected]>, based upon work by Stefan Taferner <[email protected]>
26  * @see FilterAction Filter
27  */
29 {
30  Q_OBJECT
31 
32 public:
33  /**
34  * @copydoc FilterAction::FilterAction
35  */
36  FilterActionWithUOID(const QString &name, const QString &label, QObject *parent = nullptr);
37 
38  /**
39  * @copydoc FilterAction::isEmpty
40  */
41  Q_REQUIRED_RESULT bool isEmpty() const override;
42 
43  /**
44  * @copydoc FilterAction::argsFromString
45  */
46  void argsFromString(const QString &argsStr) override;
47 
48  /**
49  * @copydoc FilterAction::argsAsString
50  */
51  Q_REQUIRED_RESULT QString argsAsString() const override;
52 
53  /**
54  * @copydoc FilterAction::displayString
55  */
56  Q_REQUIRED_RESULT QString displayString() const override;
57 
58 protected:
59  uint mParameter;
60 };
61 }
Q_OBJECTQ_OBJECT
FilterActionWithUOID(const QString &name, const QString &label, QObject *parent=nullptr)
Creates a new filter action.
Abstract base class for filter actions with a free-form string as parameter.
QString name() const
Returns identifier name, ie.
Abstract base class for mail filter actions.
Definition: filteraction.h:38
QString label() const
Returns i18n'd label, ie.
QString displayString() const override
Returns a translated string describing this filter for visualization purposes, e.g.
void argsFromString(const QString &argsStr) override
Read extra arguments from given string.
bool isEmpty() const override
Determines whether this action is valid.
QString argsAsString() const override
Return extra arguments as string.
QObject * parent() const const
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.