Mailcommon

filteractionwithaddress.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 "filteractionwithaddress.h"
9 
10 #include <Akonadi/EmailAddressRequester>
11 
12 using 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(QStringLiteral("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 
42 {
43  qobject_cast<Akonadi::EmailAddressRequester *>(paramWidget)->clear();
44 }
void applyParamWidgetValue(QWidget *paramWidget) override
The filter action shall set it's parameter from the widget's contents.
FilterActionWithAddress(const QString &name, const QString &label, QObject *parent=nullptr)
Creates a new filter action.
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void setParamWidgetValue(QWidget *paramWidget) const override
The filter action shall set it's widget's contents from it's parameter.
void filterActionModified()
Called to notify that the current FilterAction has had some value modification.
void clearParamWidget(QWidget *paramWidget) const override
The filter action shall clear it's parameter widget's contents.
QObject * parent() const const
QWidget * createParamWidget(QWidget *parent) const override
Creates a widget for setting the filter action parameter.
Abstract base class for filter actions with a free-form string as parameter.
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:52 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.