Libkleo

keyapprovaldialog.h
1 /* -*- c++ -*-
2  keyapprovaldialog.h
3 
4  This file is part of libkleopatra, the KDE keymanagement library
5  SPDX-FileCopyrightText: 2004 Klarälvdalens Datakonsult AB
6 
7  Based on kpgpui.h
8  SPDX-FileCopyrightText: 2001, 2002 the KPGP authors
9  See file libkdenetwork/AUTHORS.kpgp for details
10 
11  SPDX-License-Identifier: GPL-2.0-or-later
12 */
13 
14 #pragma once
15 
16 #include "kleo_export.h"
17 
18 #include <Libkleo/Enum>
19 
20 #include <QDialog>
21 
22 #include <gpgme++/key.h>
23 
24 #include <vector>
25 
26 namespace GpgME
27 {
28 class Key;
29 }
30 
31 namespace Kleo
32 {
33 
34 class KLEO_EXPORT KeyApprovalDialog : public QDialog
35 {
36  Q_OBJECT
37 public:
38  struct Item {
39  Item()
40  : pref(UnknownPreference)
41  {
42  }
43  Item(const QString &a, const std::vector<GpgME::Key> &k, EncryptionPreference p = UnknownPreference)
44  : address(a)
45  , keys(k)
46  , pref(p)
47  {
48  }
50  std::vector<GpgME::Key> keys;
51  EncryptionPreference pref;
52  };
53 
54  KeyApprovalDialog(const std::vector<Item> &recipients, const std::vector<GpgME::Key> &sender, QWidget *parent = nullptr);
55  ~KeyApprovalDialog() override;
56 
57  std::vector<Item> items() const;
58  std::vector<GpgME::Key> senderKeys() const;
59 
60  bool preferencesChanged() const;
61 
62 private Q_SLOTS:
63  void slotPrefsChanged();
64 
65 private:
66  class KeyApprovalDialogPrivate;
67  std::unique_ptr<KeyApprovalDialogPrivate> const d;
68 };
69 
70 } // namespace Kleo
PostalAddress address(const QVariant &location)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Thu Feb 15 2024 03:56:14 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.