|
23 | 23 | #include "core/signatureutils.h"
|
24 | 24 |
|
25 | 25 | struct SignatureItem {
|
26 |
| - enum DataType { Root, RevisionInfo, ValidityStatus, CertificateStatus, SigningTime, Reason, Location, FieldInfo }; |
| 26 | + enum DataType { Root, RevisionInfo, ValidityStatus, CertificateStatus, SigningTime, Reason, Location, FieldInfo, SignatureType }; |
27 | 27 |
|
28 | 28 | SignatureItem();
|
29 | 29 | SignatureItem(SignatureItem *parent, const Okular::FormFieldSignature *form, DataType type, int page);
|
@@ -179,6 +179,26 @@ void SignatureModelPrivate::notifySetup(const QVector<Okular::Page *> &pages, in
|
179 | 179 |
|
180 | 180 | auto childItem4 = new SignatureItem(parentItem, sf, SignatureItem::FieldInfo, pageNumber);
|
181 | 181 | childItem4->displayString = i18n("Field: %1 on page %2", sf->name(), pageNumber + 1);
|
| 182 | + auto signatureType = [sf] { |
| 183 | + switch (sf->signatureType()) { |
| 184 | + case Okular::FormFieldSignature::G10cPgpSignatureDetached: |
| 185 | + return i18nc("Signature type", "PGP Signature"); |
| 186 | + case Okular::FormFieldSignature::AdbePkcs7detached: |
| 187 | + return i18nc("Signature type", "Adobe PKCS7"); |
| 188 | + case Okular::FormFieldSignature::AdbePkcs7sha1: |
| 189 | + return i18nc("Signature type", "Adobe PKCS7 Sha1"); |
| 190 | + case Okular::FormFieldSignature::EtsiCAdESdetached: |
| 191 | + return i18nc("Signature type", "ETSI CAdES"); |
| 192 | + case Okular::FormFieldSignature::UnknownType: |
| 193 | + return i18nc("Signature type", "Unknown"); |
| 194 | + case Okular::FormFieldSignature::UnsignedSignature: |
| 195 | + return i18nc("Signature type", "Unsigned signature"); |
| 196 | + } |
| 197 | + return QString {}; |
| 198 | + }(); |
| 199 | + |
| 200 | + auto childItem5 = new SignatureItem(parentItem, nullptr, SignatureItem::SignatureType, pageNumber); |
| 201 | + childItem5->displayString = i18n("Signature Type: %1", signatureType); |
182 | 202 |
|
183 | 203 | ++revNumber;
|
184 | 204 | }
|
|
0 commit comments