Okular::FormFieldChoice

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
 
QList< Action * > additionalActions () 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
 
Pagepage () const
 
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 347 of file form.h.

Member Enumeration Documentation

◆ ChoiceType

The types of choice field.

Enumerator
ComboBox 

A combo box choice field.

ListBox 

A list box choice field.

Definition at line 353 of file form.h.

Member Function Documentation

◆ canBeSpellChecked()

bool FormFieldChoice::canBeSpellChecked ( ) const
virtual

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

Note
meaningful only if the field is editable.

Definition at line 311 of file form.cpp.

◆ choices()

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

The possible choices of the choice field.

◆ choiceType()

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

The particular type of the choice field.

◆ currentChoices()

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.

◆ editChoice()

QString FormFieldChoice::editChoice ( ) const
virtual

The text entered into an editable combo box choice field.

Since
0.16 (KDE 4.10)

Definition at line 297 of file form.cpp.

◆ exportValueForChoice()

QString FormFieldChoice::exportValueForChoice ( const QString choice) const

Returns the export value for a given choice.

Since
1.11

Definition at line 322 of file form.cpp.

◆ isEditable()

bool FormFieldChoice::isEditable ( ) const
virtual

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 283 of file form.cpp.

◆ multiSelect()

bool FormFieldChoice::multiSelect ( ) const
virtual

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 288 of file form.cpp.

◆ setCurrentChoices()

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

Sets the selected choices to choices .

Definition at line 293 of file form.cpp.

◆ setEditChoice()

void FormFieldChoice::setEditChoice ( const QString text)
virtual

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

Since
0.16 (KDE 4.10)

Definition at line 302 of file form.cpp.

◆ setExportValues()

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

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

Since
1.11

Definition at line 316 of file form.cpp.

◆ textAlignment()

Qt::Alignment FormFieldChoice::textAlignment ( ) const
virtual

The alignment of the text within the field.

Definition at line 306 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-2022 The KDE developers.
Generated on Fri Aug 19 2022 04:10:35 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.