Libkleo
18#include "kleo_export.h"
20#include <QGpgME/Protocol>
41class KLEO_EXPORT KeyRequester :
public QWidget
45 explicit KeyRequester(
unsigned int allowedKeys,
bool multipleKeys =
false,
QWidget *
parent =
nullptr);
48 ~KeyRequester()
override;
50 const GpgME::Key &key()
const;
55 void setKey(
const GpgME::Key &key);
57 const std::vector<GpgME::Key> &keys()
const;
61 void setKeys(
const std::vector<GpgME::Key> &keys);
78 void setDialogCaption(
const QString &caption);
79 void setDialogMessage(
const QString &message);
81 bool isMultipleKeysEnabled()
const;
82 void setMultipleKeysEnabled(
bool enable);
84 unsigned int allowedKeys()
const;
85 void setAllowedKeys(
unsigned int allowed);
87 void setInitialQuery(
const QString &s)
91 const QString &initialQuery()
const
101 void startKeyListJob(
const QStringList &fingerprints);
105 void slotNextKey(
const GpgME::Key &key);
106 void slotKeyListResult(
const GpgME::KeyListResult &result);
107 void slotDialogButtonClicked();
108 void slotEraseButtonClicked();
111 const QGpgME::Protocol *mOpenPGPBackend =
nullptr;
112 const QGpgME::Protocol *mSMIMEBackend =
nullptr;
113 QLabel *mComplianceIcon =
nullptr;
117 QString mDialogCaption, mDialogMessage, mInitialQuery;
119 unsigned int mKeyUsage;
121 std::vector<GpgME::Key> mKeys;
122 std::vector<GpgME::Key> mTmpKeys;
129 virtual void virtual_hook(
int,
void *);
132class KLEO_EXPORT EncryptionKeyRequester :
public KeyRequester
136 enum { OpenPGP = 1, SMIME = 2, AllProtocols = OpenPGP | SMIME };
141 explicit EncryptionKeyRequester(
bool multipleKeys =
false,
142 unsigned int proto = AllProtocols,
144 bool onlyTrusted =
true,
145 bool onlyValid =
true);
149 explicit EncryptionKeyRequester(
QWidget *parent);
150 ~EncryptionKeyRequester()
override;
152 void setAllowedKeys(
unsigned int proto,
bool onlyTrusted =
true,
bool onlyValid =
true);
159 void virtual_hook(
int,
void *)
override;
162class KLEO_EXPORT SigningKeyRequester :
public KeyRequester
166 enum { OpenPGP = 1, SMIME = 2, AllProtocols = OpenPGP | SMIME };
177 explicit SigningKeyRequester(
bool multipleKeys =
false,
178 unsigned int proto = AllProtocols,
179 QWidget *parent =
nullptr,
180 bool onlyTrusted =
true,
181 bool onlyValid =
true);
185 explicit SigningKeyRequester(QWidget *parent);
186 ~SigningKeyRequester()
override;
194 void setAllowedKeys(
unsigned int proto,
bool onlyTrusted =
true,
bool onlyValid =
true);
201 void virtual_hook(
int,
void *)
override;
Base class for SigningKeyRequester and EncryptionKeyRequester.
void setFingerprint(const QString &fingerprint)
Set the key by fingerprint.
void setFingerprints(const QStringList &fingerprints)
Set the keys by fingerprint.
void setKeys(const std::vector< GpgME::Key > &keys)
Preferred method to set a key for multi-KeyRequesters.
void setKey(const GpgME::Key &key)
Preferred method to set a key for non-multi-KeyRequesters.
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:50:12 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.