Poppler Qt6 24.04.0
Public Types | Public Member Functions | List of all members
Poppler::FormFieldChoice Class Reference

#include <poppler-form.h>

Inheritance diagram for Poppler::FormFieldChoice:
Inheritance graph
[legend]
Collaboration diagram for Poppler::FormFieldChoice:
Collaboration graph
[legend]

Public Types

enum  ChoiceType { ComboBox , ListBox }
 
- Public Types inherited from Poppler::FormField
enum  AdditionalActionType { FieldModified , FormatField , ValidateField , CalculateField }
 
enum  FormType { FormButton , FormText , FormChoice , FormSignature }
 

Public Member Functions

bool canBeSpellChecked () const
 
QStringList choices () const
 
QVector< QPair< QString, QString > > choicesWithExportValues () const
 
ChoiceType choiceType () const
 
QList< int > currentChoices () const
 
QString editChoice () const
 
bool isEditable () const
 
bool multiSelect () const
 
void setCurrentChoices (const QList< int > &choice)
 
void setEditChoice (const QString &text)
 
Qt::Alignment textAlignment () const
 
FormType type () const override
 
 ~FormFieldChoice () override
 
- Public Member Functions inherited from Poppler::FormField
std::unique_ptr< LinkactivationAction () const
 
std::unique_ptr< LinkadditionalAction (AdditionalActionType type) const
 
std::unique_ptr< LinkadditionalAction (Annotation::AdditionalActionType type) const
 
QString fullyQualifiedName () const
 
int id () const
 
bool isPrintable () const
 
bool isReadOnly () const
 
bool isVisible () const
 
QString name () const
 
QRectF rect () const
 
void setName (const QString &name) const
 
void setPrintable (bool value)
 
void setReadOnly (bool value)
 
void setVisible (bool value)
 
QString uiName () const
 

Detailed Description

A form field that represents a choice field.

Member Enumeration Documentation

◆ ChoiceType

The particular type of this choice field.

Enumerator
ComboBox 

A simple singleline text field.

ListBox 

A multiline text field.

Member Function Documentation

◆ canBeSpellChecked()

bool Poppler::FormFieldChoice::canBeSpellChecked ( ) const

Whether the text inserted manually in the field (where possible) can be spell-checked.

Returns false if the field is not an editable text field.

◆ choicesWithExportValues()

QVector< QPair< QString, QString > > Poppler::FormFieldChoice::choicesWithExportValues ( ) const

The possible choices of the choice field.

The first value of the pair is the display name of the choice, The second value is the export value (i.e. for use in javascript, etc) of the choice

◆ editChoice()

QString Poppler::FormFieldChoice::editChoice ( ) const

The text entered into an editable combo box choice field.

Otherwise a null string.

◆ isEditable()

bool Poppler::FormFieldChoice::isEditable ( ) const

Whether this FormFieldChoice::ComboBox is editable, i.e.

the user can type in a custom value.

Always false for the other types of choices.

◆ multiSelect()

bool Poppler::FormFieldChoice::multiSelect ( ) const

Whether more than one choice of this FormFieldChoice::ListBox can be selected at the same time.

Always false for the other types of choices.

◆ setEditChoice()

void Poppler::FormFieldChoice::setEditChoice ( const QString &  text)

Sets the text entered into an editable combo box choice field.

Otherwise does nothing.

◆ type()

FormType Poppler::FormFieldChoice::type ( ) const
overridevirtual

The type of the field.

Implements Poppler::FormField.


The documentation for this class was generated from the following file: