Mailcommon

filteractionwithuoid.cpp
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#include "filteractionwithuoid.h"
9
10using 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
40
41#include "moc_filteractionwithuoid.cpp"
QString argsAsString() const override
Return extra arguments as string.
FilterActionWithUOID(const QString &name, const QString &label, QObject *parent=nullptr)
Creates a new filter action.
void argsFromString(const QString &argsStr) override
Read extra arguments from given string.
bool isEmpty() const override
Determines whether this action is valid.
QString displayString() const override
Returns a translated string describing this filter for visualization purposes, e.g.
Abstract base class for mail filter actions.
QString label() const
Returns i18n'd label, ie.
The filter dialog.
QString number(double n, char format, int precision)
QString toHtmlEscaped() const const
uint toUInt(bool *ok, int base) const const
QString trimmed() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:01 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.