16#include "kleo_export.h"
20#include <gpgme++/key.h>
39class KLEO_EXPORT IconProvider
42 inline explicit IconProvider(KeyUsage::Flags requiredUsages)
43 : usage{requiredUsages}
47 QIcon icon(
const GpgME::Key &key)
const;
48 QIcon icon(
const KeyGroup &group)
const;
49 QIcon icon(
const GpgME::UserID &userID)
const;
55KLEO_EXPORT
QIcon successIcon();
56KLEO_EXPORT
QIcon infoIcon();
57KLEO_EXPORT
QIcon questionIcon();
58KLEO_EXPORT
QIcon unavailableIcon();
59KLEO_EXPORT
QIcon warningIcon();
60KLEO_EXPORT
QIcon errorIcon();
62KLEO_EXPORT
QString prettyNameAndEMail(
int proto,
const char *
id,
const char *name,
const char *email,
const char *comment =
nullptr);
64KLEO_EXPORT
QString prettyNameAndEMail(
const GpgME::Key &key);
65KLEO_EXPORT
QString prettyNameAndEMail(
const GpgME::UserID &key);
67KLEO_EXPORT
QString prettyUserID(
const GpgME::UserID &uid);
68KLEO_EXPORT
QString prettyKeyID(
const char *
id);
70KLEO_EXPORT
QString prettyName(
int proto,
const char *
id,
const char *name,
const char *comment =
nullptr);
71KLEO_EXPORT
QString prettyName(
const GpgME::Key &key);
72KLEO_EXPORT
QString prettyName(
const GpgME::UserID &uid);
73KLEO_EXPORT
QString prettyName(
const GpgME::UserID::Signature &sig);
75KLEO_EXPORT
QString prettyEMail(
const char *email,
const char *
id);
76KLEO_EXPORT
QString prettyEMail(
const GpgME::Key &key);
77KLEO_EXPORT
QString prettyEMail(
const GpgME::UserID &uid);
78KLEO_EXPORT
QString prettyEMail(
const GpgME::UserID::Signature &sig);
81KLEO_EXPORT
QString prettyID(
const char *
id);
82KLEO_EXPORT
QString accessibleHexID(
const char *
id);
93KLEO_EXPORT
QString prettySignature(
const GpgME::Signature &signature,
const QString &sender);
99 StorageLocation = 0x004,
100 SerialNumber = 0x008,
105 CertificateUsage = 0x100,
115KLEO_EXPORT
QString toolTip(
const GpgME::Key &key,
int opts);
116KLEO_EXPORT
QString toolTip(
const Kleo::KeyGroup &group,
int opts);
117KLEO_EXPORT
QString toolTip(
const GpgME::UserID &userID,
int opts);
120KLEO_EXPORT
QString expirationDateString(
const GpgME::Key &key,
const QString &noExpiration = {});
122KLEO_EXPORT
QString expirationDateString(
const GpgME::Subkey &subkey,
const QString &noExpiration = {});
124KLEO_EXPORT
QString expirationDateString(
const GpgME::UserID::Signature &sig,
const QString &noExpiration = {});
125KLEO_EXPORT
QDate expirationDate(
const GpgME::Key &key);
126KLEO_EXPORT
QDate expirationDate(
const GpgME::Subkey &subkey);
127KLEO_EXPORT
QDate expirationDate(
const GpgME::UserID::Signature &sig);
133KLEO_EXPORT
QString accessibleExpirationDate(
const GpgME::Key &key,
const QString &noExpiration = {});
139KLEO_EXPORT
QString accessibleExpirationDate(
const GpgME::Subkey &subkey,
const QString &noExpiration = {});
145KLEO_EXPORT
QString accessibleExpirationDate(
const GpgME::UserID::Signature &sig,
const QString &noExpiration = {});
147KLEO_EXPORT
QString creationDateString(
const GpgME::Key &key);
148KLEO_EXPORT
QString creationDateString(
const GpgME::Subkey &subkey);
149KLEO_EXPORT
QString creationDateString(
const GpgME::UserID::Signature &sig);
150KLEO_EXPORT
QDate creationDate(
const GpgME::Key &key);
151KLEO_EXPORT
QDate creationDate(
const GpgME::Subkey &subkey);
152KLEO_EXPORT
QDate creationDate(
const GpgME::UserID::Signature &sig);
153KLEO_EXPORT
QString accessibleCreationDate(
const GpgME::Key &key);
154KLEO_EXPORT
QString accessibleCreationDate(
const GpgME::Subkey &subkey);
157KLEO_EXPORT
QString dateString(time_t t);
159KLEO_EXPORT
QString accessibleDate(time_t t);
162KLEO_EXPORT
QString displayName(GpgME::Protocol prot);
164KLEO_EXPORT
QString type(
const GpgME::Subkey &subkey);
165KLEO_EXPORT
QString type(
const Kleo::KeyGroup &group);
167KLEO_EXPORT
QString ownerTrustShort(
const GpgME::Key &key);
168KLEO_EXPORT
QString ownerTrustShort(GpgME::Key::OwnerTrust trust);
170KLEO_EXPORT
QString validityShort(
const GpgME::Subkey &subkey);
171KLEO_EXPORT
QString validityShort(
const GpgME::UserID &uid);
172KLEO_EXPORT
QString validityShort(
const GpgME::UserID::Signature &sig);
173KLEO_EXPORT
QIcon validityIcon(
const GpgME::UserID::Signature &sig);
175KLEO_EXPORT
QString validity(
const GpgME::UserID &uid);
176KLEO_EXPORT
QString validity(
const Kleo::KeyGroup &group);
177KLEO_EXPORT
QIcon validityIcon(
const Kleo::KeyGroup &group);
179KLEO_EXPORT
QString formatForComboBox(
const GpgME::Key &key);
181KLEO_EXPORT
QString formatKeyLink(
const GpgME::Key &key);
183KLEO_EXPORT
QString signatureToString(
const GpgME::Signature &sig,
const GpgME::Key &key);
185KLEO_EXPORT
const char *summaryToString(
const GpgME::Signature::Summary summary);
187KLEO_EXPORT
QString importMetaData(
const GpgME::Import &
import);
188KLEO_EXPORT
QString importMetaData(
const GpgME::Import &
import,
const QStringList &sources);
190KLEO_EXPORT
QString formatOverview(
const GpgME::Key &key);
191KLEO_EXPORT
QString usageString(
const GpgME::Subkey &subkey);
192KLEO_EXPORT
QString summaryLine(
const GpgME::UserID &
id);
193KLEO_EXPORT
QString summaryLine(
const GpgME::Key &key);
194KLEO_EXPORT
QString summaryLine(
const KeyGroup &group);
195KLEO_EXPORT
QString nameAndEmailForSummaryLine(
const GpgME::Key &key);
196KLEO_EXPORT
QString nameAndEmailForSummaryLine(
const GpgME::UserID &
id);
198KLEO_EXPORT
QIcon iconForUid(
const GpgME::UserID &uid);
204KLEO_DEPRECATED_EXPORT
QString complianceMode();
207KLEO_EXPORT
QString complianceStringForKey(
const GpgME::Key &key);
208KLEO_EXPORT
QString complianceStringForUserID(
const GpgME::UserID &userID);
213KLEO_EXPORT
QString complianceStringShort(
const GpgME::Key &key);
214KLEO_EXPORT
QString complianceStringShort(
const GpgME::UserID &
id);
215KLEO_EXPORT
QString complianceStringShort(
const Kleo::KeyGroup &group);
218KLEO_EXPORT
QString origin(
int o);
221KLEO_EXPORT
QString trustSignatureDomain(
const GpgME::UserID::Signature &sig);
223KLEO_EXPORT
QString trustSignature(
const GpgME::UserID::Signature &sig);
228KLEO_EXPORT
QString errorAsString(
const GpgME::Error &error);
233KLEO_EXPORT
QString prettyAlgorithmName(
const std::string &algorithm);
238KLEO_EXPORT
QString email(
const GpgME::UserID &uid);
Type type(const QSqlDatabase &db)