32 #ifndef _POPPLER_QT5_FORM_H_
33 #define _POPPLER_QT5_FORM_H_
38 #include <QtCore/QDateTime>
39 #include <QtCore/QVector>
40 #include <QtCore/QList>
41 #include <QtCore/QRectF>
42 #include <QtCore/QStringList>
43 #include <QtCore/QSharedPointer>
44 #include "poppler-export.h"
45 #include "poppler-annotation.h"
46 #include "poppler-qt5.h"
51 class FormWidgetButton;
53 class FormWidgetChoice;
54 class FormWidgetSignature;
62 class FormFieldIconData;
73 friend class FormFieldIconData;
83 FormFieldIconData *d_ptr;
93 friend class FormFieldData;
217 explicit FormField(std::unique_ptr<FormFieldData> dd);
219 std::unique_ptr<FormFieldData> m_formData;
493 class CertificateInfoPrivate;
513 KuDigitalSignature = 0x80,
514 KuNonRepudiation = 0x40,
515 KuKeyEncipherment = 0x20,
516 KuDataEncipherment = 0x10,
517 KuKeyAgreement = 0x08,
518 KuKeyCertSign = 0x04,
520 KuEncipherOnly = 0x01,
523 Q_DECLARE_FLAGS(KeyUsageExtensions, KeyUsageExtension)
625 QSharedPointer<CertificateInfoPrivate> d_ptr;
627 Q_DECLARE_OPERATORS_FOR_FLAGS(CertificateInfo::KeyUsageExtensions)
634 class SignatureValidationInfoPrivate;
663 CertificateNotVerified
672 HashAlgorithmUnknown,
762 QSharedPointer<SignatureValidationInfoPrivate> d_ptr;
791 ValidateVerifyCertificate = 1,
792 ValidateForceRevalidation = 2,
793 ValidateWithoutOCSPRevocationCheck = 4,
794 ValidateUseAIACertFetch = 8
875 void POPPLER_QT5_EXPORT
setNSSDir(
const QString &pathURL);
AdditionalActionType
Describes the flags from an annotations 'AA' dictionary.
Definition: poppler-annotation.h:481
Definition: poppler-form.h:495
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.
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:512
PublicKeyType
The algorithm of public key.
Definition: poppler-form.h:501
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:529
QString nickName() const
The certificate internal database nickname.
A form field that represents a text input.
Definition: poppler-form.h:304
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:310
@ Multiline
A multiline text field.
Definition: poppler-form.h:312
@ Normal
A simple singleline text field.
Definition: poppler-form.h:311
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:180
Holds data for a new signature.
Definition: poppler-qt5.h:2195
A page in a document.
Definition: poppler-qt5.h:434
Definition: poppler-form.h:636
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:656
@ CertificateUntrustedIssuer
The issuer of this certificate has been marked as untrusted by the user.
Definition: poppler-form.h:658
@ CertificateUnknownIssuer
The certificate trust chain has not finished in a trusted root certificate.
Definition: poppler-form.h:659
@ CertificateGenericError
The certificate could not be verified.
Definition: poppler-form.h:662
@ CertificateRevoked
The certificate was revoked by the issuing certificate authority.
Definition: poppler-form.h:660
@ CertificateTrusted
The certificate is considered trusted.
Definition: poppler-form.h:657
@ CertificateExpired
The signing time is outside the validity bounds of this certificate.
Definition: poppler-form.h:661
HashAlgorithm
The hash algorithm of the signature.
Definition: poppler-form.h:671
time_t signingTime() const
The signing time associated with the signature.
SignatureStatus
The verification result of the signature.
Definition: poppler-form.h:642
@ SignatureDigestMismatch
The document content was changed after the signature was applied.
Definition: poppler-form.h:645
@ SignatureGenericError
The signature could not be verified.
Definition: poppler-form.h:647
@ SignatureDecodingError
The signature CMS/PKCS7 structure is malformed.
Definition: poppler-form.h:646
@ SignatureValid
The signature is cryptographically valid.
Definition: poppler-form.h:643
@ SignatureNotFound
The requested signature is not present in the document.
Definition: poppler-form.h:648
@ SignatureInvalid
The signature is cryptographically invalid.
Definition: poppler-form.h:644
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
QString getNSSDir()
Gets the current NSS CertDB directory.
void setNSSPasswordCallback(const std::function< char *(const char *)> &f)
Sets the callback for NSS password requests.
void setNSSDir(const QString &pathURL)
Set a custom NSS CertDB directory.
bool hasNSSSupport()
Returns is poppler was compiled with NSS support.
QVector< CertificateInfo > getAvailableSigningCertificates()
Return vector of suitable signing certificates.