34#ifndef _POPPLER_QT5_FORM_H_
35#define _POPPLER_QT5_FORM_H_
41#include <QtCore/QDateTime>
42#include <QtCore/QVector>
43#include <QtCore/QList>
44#include <QtCore/QRectF>
45#include <QtCore/QStringList>
46#include <QtCore/QSharedPointer>
47#include "poppler-export.h"
48#include "poppler-annotation.h"
49#include "poppler-qt5.h"
54class FormWidgetButton;
56class FormWidgetChoice;
57class FormWidgetSignature;
65class FormFieldIconData;
76 friend class FormFieldIconData;
86 FormFieldIconData *d_ptr;
96 friend class FormFieldData;
220 explicit FormField(std::unique_ptr<FormFieldData> dd);
222 std::unique_ptr<FormFieldData> m_formData;
320 FormFieldText(DocumentData *doc, ::Page *p, ::FormWidgetText *w);
504class CertificateInfoPrivate;
524 KuDigitalSignature = 0x80,
525 KuNonRepudiation = 0x40,
526 KuKeyEncipherment = 0x20,
527 KuDataEncipherment = 0x10,
528 KuKeyAgreement = 0x08,
529 KuKeyCertSign = 0x04,
531 KuEncipherOnly = 0x01,
534 Q_DECLARE_FLAGS(KeyUsageExtensions, KeyUsageExtension)
661 QSharedPointer<CertificateInfoPrivate> d_ptr;
663Q_DECLARE_OPERATORS_FOR_FLAGS(CertificateInfo::KeyUsageExtensions)
670class SignatureValidationInfoPrivate;
700 CertificateVerificationInProgress
709 HashAlgorithmUnknown,
799 QSharedPointer<SignatureValidationInfoPrivate> d_ptr;
807class AsyncObjectPrivate;
821 std::unique_ptr<AsyncObjectPrivate> d;
850 ValidateVerifyCertificate = 1,
851 ValidateForceRevalidation = 2,
852 ValidateWithoutOCSPRevocationCheck = 4,
853 ValidateUseAIACertFetch = 8
AdditionalActionType
Describes the flags from an annotations 'AA' dictionary.
Definition poppler-annotation.h:481
Definition poppler-form.h:809
Definition poppler-form.h:506
PublicKeyType publicKeyType() const
The public key type.
bool isSelfSigned() const
Returns true if certificate is self-signed otherwise returns false.
QByteArray certificateData() const
The DER encoded certificate.
QString issuerInfo(EntityInfoKey key) const
Information about the issuer.
QString subjectInfo(EntityInfoKey key) const
Information about the subject.
KeyLocation keyLocation() const
The storage location for this key.
bool checkPassword(const QString &password) const
Checks if the given password is the correct one for this certificate.
int version() const
The certificate version string.
int publicKeyStrength() const
The strength of public key in bits.
bool isNull() const
Returns true if certificate has no contents; otherwise returns false.
QDateTime validityEnd() const
The date-time when certificate expires.
QByteArray serialNumber() const
The certificate serial number.
KeyUsageExtension
Certificate key usage extensions.
Definition poppler-form.h:523
PublicKeyType
The algorithm of public key.
Definition poppler-form.h:512
KeyUsageExtensions keyUsageExtensions() const
The uses allowed for the certificate.
QDateTime validityStart() const
The date-time when certificate becomes valid.
QByteArray publicKey() const
The public key value.
EntityInfoKey
Predefined keys for elements in an entity's distinguished name.
Definition poppler-form.h:540
KeyLocation
A signing key can be located in different places sometimes.
Definition poppler-form.h:558
QString nickName() const
The certificate internal database nickname.
A form field that represents a text input.
Definition poppler-form.h:307
void setAppearanceText(const QString &text)
Sets the text inside the Appearance Stream to the specified text.
TextType
The particular type of this text field.
Definition poppler-form.h:313
@ Multiline
A multiline text field.
Definition poppler-form.h:315
@ Normal
A simple singleline text field.
Definition poppler-form.h:314
void setText(const QString &text)
Sets the text associated with the text field to the specified text.
QString text() const
The text associated with the text field.
double getFontSize() const
The font size of the text in the form field.
void setFontSize(int fontSize)
Set the font size of the text in the form field (currently only as integer)
bool canBeSpellChecked() const
Whether the text inserted manually in the field (where possible) can be spell-checked.
bool isPassword() const
Whether this text field is a password input, eg its text must be replaced with asterisks.
TextType textType() const
The text type of the text field.
Qt::Alignment textAlignment() const
The horizontal alignment for the text of this text field.
FormType type() const override
The type of the field.
int maximumLength() const
The maximum length for the text of this field, or -1 if not set.
bool isRichText() const
Whether this text field should allow rich text.
Encapsulates data that describes a link.
Definition poppler-link.h:184
Holds data for a new signature.
Definition poppler-qt5.h:2240
Definition poppler-form.h:672
QString signerName() const
The signer name associated with the signature.
QList< qint64 > signedRangeBounds() const
Get the bounds of the ranges of the document which are signed.
QByteArray signature() const
Get the signature binary data.
HashAlgorithm hashAlgorithm() const
The hash algorithm used for the signature.
bool signsTotalDocument() const
Checks whether the signature authenticates the total document except for the signature itself.
CertificateInfo certificateInfo() const
The signer certificate info.
CertificateStatus
The verification result of the certificate.
Definition poppler-form.h:692
@ CertificateUntrustedIssuer
The issuer of this certificate has been marked as untrusted by the user.
Definition poppler-form.h:694
@ CertificateUnknownIssuer
The certificate trust chain has not finished in a trusted root certificate.
Definition poppler-form.h:695
@ CertificateGenericError
The certificate could not be verified.
Definition poppler-form.h:698
@ CertificateRevoked
The certificate was revoked by the issuing certificate authority.
Definition poppler-form.h:696
@ CertificateTrusted
The certificate is considered trusted.
Definition poppler-form.h:693
@ CertificateNotVerified
The certificate is not yet verified.
Definition poppler-form.h:699
@ CertificateExpired
The signing time is outside the validity bounds of this certificate.
Definition poppler-form.h:697
HashAlgorithm
The hash algorithm of the signature.
Definition poppler-form.h:708
time_t signingTime() const
The signing time associated with the signature.
SignatureStatus
The verification result of the signature.
Definition poppler-form.h:678
@ SignatureDigestMismatch
The document content was changed after the signature was applied.
Definition poppler-form.h:681
@ SignatureGenericError
The signature could not be verified.
Definition poppler-form.h:683
@ SignatureDecodingError
The signature CMS/PKCS7 structure is malformed.
Definition poppler-form.h:682
@ SignatureValid
The signature is cryptographically valid.
Definition poppler-form.h:679
@ SignatureNotFound
The requested signature is not present in the document.
Definition poppler-form.h:684
@ SignatureInvalid
The signature is cryptographically invalid.
Definition poppler-form.h:680
SignatureStatus signatureStatus() const
The signature status of the signature.
QString signerSubjectDN() const
The signer subject distinguished name associated with the signature.
QString reason() const
Get signing reason.
CertificateStatus certificateStatus() const
The certificate status of the signature.
QString location() const
Get signing location.
The Poppler Qt5 binding.
Definition poppler-annotation.h:50
QVector< CertificateInfo > getAvailableSigningCertificates()
Return vector of suitable signing certificates.
bool hasCryptoSignBackendFeature(CryptoSignBackend, CryptoSignBackendFeature)
Queries if a backend supports or not supports a given feature.
QString getNSSDir()
Gets the current NSS CertDB directory.
std::optional< CryptoSignBackend > activeCryptoSignBackend()
Returns current active backend or nullopt if none is active.
void setNSSPasswordCallback(const std::function< char *(const char *)> &f)
Sets the callback for NSS password requests.
bool setActiveCryptoSignBackend(CryptoSignBackend backend)
Sets active backend.
bool POPPLER_QT5_DEPRECATED hasNSSSupport()
Returns is poppler was compiled with NSS support.
void setNSSDir(const QString &pathURL)
Set a custom NSS CertDB directory.
CryptoSignBackend
Possible compiled in backends for signature handling.
Definition poppler-form.h:958
CryptoSignBackendFeature
Definition poppler-form.h:989
@ BackendAsksPassphrase
If the backend itself out of band requests passwords or if the host applicaion somehow must do it.
QVector< CryptoSignBackend > availableCryptoSignBackends()
The available compiled-in backends.