Mailcommon

filteractionwithuoid.cpp
1 /*
2  * SPDX-FileCopyrightText: 1996-1998 Stefan Taferner <[email protected]>
3  *
4  * SPDX-License-Identifier: GPL-2.0-or-later
5  *
6  */
7 
8 #include "filteractionwithuoid.h"
9 
10 using namespace MailCommon;
11 
13  : FilterAction(name, label, parent)
14  , mParameter(0)
15 {
16 }
17 
19 {
20  return mParameter == 0;
21 }
22 
24 {
25  bool valid;
26  const uint val = argsStr.trimmed().toUInt(&valid);
27 
28  mParameter = valid ? val : 0;
29 }
30 
32 {
33  return QString::number(mParameter);
34 }
35 
37 {
38  return label() + QLatin1String(" \"") + argsAsString().toHtmlEscaped() + QLatin1String("\"");
39 }
QString number(int n, int base)
QString toHtmlEscaped() const const
QString trimmed() const const
FilterActionWithUOID(const QString &name, const QString &label, QObject *parent=nullptr)
Creates a new filter action.
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.
uint toUInt(bool *ok, int base) const const
bool isEmpty() const override
Determines whether this action is valid.
QString argsAsString() const override
Return extra arguments as string.
The filter dialog.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Oct 1 2022 04:00:53 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.