Mailcommon

filteractionencrypt.h
1 /*
2  * SPDX-FileCopyrightText: 2017 Daniel Vr├ítil <[email protected]>
3  *
4  * SPDX-License-Identifier: GPL-2.0-or-later
5  *
6  */
7 
8 #pragma once
9 
10 #include "filteractionwithcrypto.h"
11 
12 #include <gpgme++/key.h>
13 
14 #include <Libkleo/KeyCache>
15 
16 namespace MailCommon
17 {
18 class FilterActionEncrypt : public FilterActionWithCrypto
19 {
20  Q_OBJECT
21 public:
22  explicit FilterActionEncrypt(QObject *parent = nullptr);
23  ~FilterActionEncrypt() override;
24 
25  static FilterAction *newAction();
26 
27  Q_REQUIRED_RESULT QString displayString() const override;
28 
29  Q_REQUIRED_RESULT QString argsAsString() const override;
30  void argsFromString(const QString &argsStr) override;
31 
32  Q_REQUIRED_RESULT SearchRule::RequiredPart requiredPart() const override;
33  Q_REQUIRED_RESULT FilterAction::ReturnCode process(ItemContext &context, bool applyOnOutbound) const override;
34 
35  Q_REQUIRED_RESULT bool isEmpty() const override;
36 
37  Q_REQUIRED_RESULT QString informationAboutNotValidAction() const override;
38 
39  Q_REQUIRED_RESULT QWidget *createParamWidget(QWidget *parent) const override;
40  void setParamWidgetValue(QWidget *paramWidget) const override;
41  void applyParamWidgetValue(QWidget *paramWidget) override;
42 
43  Q_REQUIRED_RESULT GpgME::Key key() const;
44 
45  Q_REQUIRED_RESULT bool reencrypt() const;
46 
47 private:
48  std::shared_ptr<const Kleo::KeyCache> mKeyCache;
49  GpgME::Key mKey;
50  bool mReencrypt = false;
51 };
52 } // namespace MailCommon
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 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.