Mailcommon

filteractionaddtag.h
1 /*
2  * SPDX-FileCopyrightText: 1996-1998 Stefan Taferner <[email protected]>
3  *
4  * SPDX-License-Identifier: GPL-2.0-or-later
5  *
6  */
7 
8 #pragma once
9 
10 #include "filteractionwithstringlist.h"
11 
12 #include <QPointer>
13 
14 class QComboBox;
15 
16 namespace MailCommon
17 {
18 //=============================================================================
19 // FilterActionAddTag - append tag to message
20 // Appends a tag to messages
21 //=============================================================================
22 class FilterActionAddTag : public FilterAction
23 {
24  Q_OBJECT
25 public:
26  explicit FilterActionAddTag(QObject *parent = nullptr);
27  ReturnCode process(ItemContext &context, bool applyOnOutbound) const override;
28  SearchRule::RequiredPart requiredPart() const override;
29 
30  static FilterAction *newAction();
31 
32  Q_REQUIRED_RESULT bool isEmpty() const override;
33 
34  void argsFromString(const QString &argsStr) override;
35  Q_REQUIRED_RESULT QString argsAsString() const override;
36  Q_REQUIRED_RESULT QString displayString() const override;
37  Q_REQUIRED_RESULT bool argsFromStringInteractive(const QString &argsStr, const QString &filterName) override;
38 
39  Q_REQUIRED_RESULT QWidget *createParamWidget(QWidget *parent) const override;
40  void applyParamWidgetValue(QWidget *paramWidget) override;
41  void setParamWidgetValue(QWidget *paramWidget) const override;
42  void clearParamWidget(QWidget *paramWidget) const override;
43 
44  Q_REQUIRED_RESULT QString informationAboutNotValidAction() const override;
45 
46 private:
47  void slotTagListingFinished();
48 
49 private:
50  void fillComboBox();
51  mutable QMap<QUrl, QString> mList;
52  QString mParameter;
53  mutable QPointer<QComboBox> mComboBox;
54 };
55 }
Q_OBJECTQ_OBJECT
RequiredPart
Possible required parts.
Definition: searchrule.h:68
ReturnCode
Describes the possible return codes of filter processing:
Definition: filteraction.h:45
FilterAction(const QString &name, const QString &label, QObject *parent=nullptr)
Creates a new filter action.
The filter dialog.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Sep 24 2022 03:58:14 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.