Search for usage in LXR

Okular::FormFieldChoice Class Referenceabstract

#include <form.h>

Inheritance diagram for Okular::FormFieldChoice:

Public Types

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

Public Member Functions

virtual bool canBeSpellChecked () const
virtual QStringList choices () const =0
virtual ChoiceType choiceType () const =0
virtual QList< int > currentChoices () const =0
virtual QString editChoice () const
QString exportValueForChoice (const QString &choice) const
virtual bool isEditable () const
virtual bool multiSelect () const
virtual void setCurrentChoices (const QList< int > &choices)
virtual void setEditChoice (const QString &text)
virtual Qt::Alignment textAlignment () const
- Public Member Functions inherited from Okular::FormField
ActionactivationAction () const
ActionadditionalAction (AdditionalActionType type) const
ActionadditionalAction (Annotation::AdditionalActionType type) const
virtual QString fullyQualifiedName () const =0
virtual int id () const =0
virtual bool isPrintable () const
virtual bool isReadOnly () const
virtual bool isVisible () const
virtual QString name () const =0
virtual NormalizedRect rect () const =0
virtual void setPrintable (bool value)
virtual void setReadOnly (bool value)
virtual void setVisible (bool value)
FieldType type () const
virtual QString uiName () const =0

Protected Member Functions

void setExportValues (const QMap< QString, QString > &values)
- Protected Member Functions inherited from Okular::FormField
void setActivationAction (Action *action)
void setAdditionalAction (AdditionalActionType type, Action *action)
void setAdditionalAction (Annotation::AdditionalActionType type, Action *action)

Detailed Description

Interface of a choice form field.

This is the base interface to reimplement to represent a choice field, ie a field where the user can select one (of more) element(s) among a set of choices.

Definition at line 336 of file form.h.

Member Enumeration Documentation

The types of choice field.


A combo box choice field.


A list box choice field.

Definition at line 342 of file form.h.

Member Function Documentation

bool FormFieldChoice::canBeSpellChecked ( ) const

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

meaningful only if the field is editable.

Definition at line 299 of file form.cpp.

virtual QStringList Okular::FormFieldChoice::choices ( ) const
pure virtual

The possible choices of the choice field.

virtual ChoiceType Okular::FormFieldChoice::choiceType ( ) const
pure virtual

The particular type of the choice field.

virtual QList<int> Okular::FormFieldChoice::currentChoices ( ) const
pure virtual

The currently selected choices.

Always one element in the list in case of single choice elements.

QString FormFieldChoice::editChoice ( ) const

The text entered into an editable combo box choice field.

0.16 (KDE 4.10)

Definition at line 285 of file form.cpp.

QString FormFieldChoice::exportValueForChoice ( const QString choice) const

Returns the export value for a given choice.


Definition at line 310 of file form.cpp.

bool FormFieldChoice::isEditable ( ) const

Whether this ComboBox is editable, ie the user can type in a custom value.

Always false for the other types of choices.

Definition at line 271 of file form.cpp.

bool FormFieldChoice::multiSelect ( ) const

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

Always false for the other types of choices.

Definition at line 276 of file form.cpp.

void FormFieldChoice::setCurrentChoices ( const QList< int > &  choices)

Sets the selected choices to choices .

Definition at line 281 of file form.cpp.

void FormFieldChoice::setEditChoice ( const QString text)

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

0.16 (KDE 4.10)

Definition at line 290 of file form.cpp.

void FormFieldChoice::setExportValues ( const QMap< QString, QString > &  values)

The possible choices of the choice field.

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


Definition at line 304 of file form.cpp.

Qt::Alignment FormFieldChoice::textAlignment ( ) const

The alignment of the text within the field.

Definition at line 294 of file form.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Apr 13 2021 22:35:32 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.