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.


A combo box choice field.


A list box choice field.

Definition at line 353 of file form.h.

Constructor & Destructor Documentation

◆ ~FormFieldChoice()

FormFieldChoice::~FormFieldChoice ( )

Definition at line 280 of file form.cpp.

◆ FormFieldChoice()

FormFieldChoice::FormFieldChoice ( )

Definition at line 275 of file form.cpp.

Member Function Documentation

◆ canBeSpellChecked()

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 312 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

The text entered into an editable combo box choice field.

0.16 (KDE 4.10)

Definition at line 298 of file form.cpp.

◆ exportValueForChoice()

QString FormFieldChoice::exportValueForChoice ( const QString & choice) const

Returns the export value for a given choice.


Definition at line 323 of file form.cpp.

◆ isEditable()

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

◆ multiSelect()

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

◆ setCurrentChoices()

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

Sets the selected choices to choices .

Definition at line 294 of file form.cpp.

◆ setEditChoice()

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

◆ setExportValues()

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

◆ textAlignment()

Qt::Alignment FormFieldChoice::textAlignment ( ) const

The alignment of the text within the field.

Definition at line 307 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-2024 The KDE developers.
Generated on Fri May 24 2024 11:57:54 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.