Mailcommon

filteractionwithaddress.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 "filteractionwithaddress.h"
9
10#include <Akonadi/EmailAddressRequester>
11
12using namespace MailCommon;
13
15 : FilterActionWithString(name, label, parent)
16{
17}
18
20{
21 auto requester = new Akonadi::EmailAddressRequester(parent);
22 requester->setText(mParameter);
23 requester->setObjectName(QLatin1StringView("emailaddressrequester"));
24 requester->setText(mParameter);
25
27
28 return requester;
29}
30
32{
33 mParameter = qobject_cast<Akonadi::EmailAddressRequester *>(paramWidget)->text();
34}
35
37{
38 qobject_cast<Akonadi::EmailAddressRequester *>(paramWidget)->setText(mParameter);
39}
40
45
46#include "moc_filteractionwithaddress.cpp"
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.
void filterActionModified()
Called to notify that the current FilterAction has had some value modification.
The filter dialog.
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QObject * parent() const const
T qobject_cast(QObject *object)
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.