Mailcommon

filteractionaddtoaddressbook.h
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#pragma once
9
10#include "filteractionwithstringlist.h"
11
12namespace MailCommon
13{
14//=============================================================================
15// FilterActionAddToAddressBook
16// - add email address from header to address book
17//=============================================================================
18class FilterActionAddToAddressBook : public FilterActionWithStringList
19{
21public:
22 explicit FilterActionAddToAddressBook(QObject *parent = nullptr);
23 [[nodiscard]] ReturnCode process(ItemContext &context, bool applyOnOutbound) const override;
24 static FilterAction *newAction();
25
26 [[nodiscard]] SearchRule::RequiredPart requiredPart() const override;
27
28 [[nodiscard]] bool isEmpty() const override;
29
30 [[nodiscard]] QWidget *createParamWidget(QWidget *parent) const override;
31 void setParamWidgetValue(QWidget *paramWidget) const override;
32 void applyParamWidgetValue(QWidget *paramWidget) override;
33 void clearParamWidget(QWidget *paramWidget) const override;
34
35 [[nodiscard]] QString argsAsString() const override;
36 void argsFromString(const QString &argsStr) override;
37
38 [[nodiscard]] QString informationAboutNotValidAction() const override;
39
40private:
41 enum HeaderType {
42 FromHeader,
43 ToHeader,
44 CcHeader,
45 BccHeader,
46 UnknownHeader
47 };
48
49 const QString mFromStr, mToStr, mCCStr, mBCCStr;
50 HeaderType mHeaderType;
51 Akonadi::Collection::Id mCollectionId;
52 QString mCategory;
53};
54}
FilterAction(const QString &name, const QString &label, QObject *parent=nullptr)
Creates a new filter action.
ReturnCode
Describes the possible return codes of filter processing:
RequiredPart
Possible required parts.
Definition searchrule.h:68
The filter dialog.
Q_OBJECTQ_OBJECT
QObject * parent() 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.