Okular::FormField

Search for usage in LXR

#include <form.h>

Inheritance diagram for Okular::FormField:

Public Types

enum  AdditionalActionType { FieldModified , FormatField , ValidateField , CalculateField }
 
enum  FieldType { FormButton , FormText , FormChoice , FormSignature }
 

Public Member Functions

ActionactivationAction () const
 
ActionadditionalAction (AdditionalActionType type) const
 
ActionadditionalAction (Annotation::AdditionalActionType type) const
 
QList< Action * > additionalActions () const
 
void commitFormattedValue (const QString &value)
 
QString committedFormattedValue () const
 
QString committedValue () const
 
void commitValue (const QString &value)
 
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 setAppearanceValue (const QVariant &value)
 
virtual void setPrintable (bool value)
 
virtual void setReadOnly (bool value)
 
virtual void setValue (const QVariant &value)
 
virtual void setVisible (bool value)
 
FieldType type () const
 
virtual QString uiName () const =0
 
virtual QVariant value () const
 

Protected Member Functions

void setActivationAction (Action *action)
 
void setAdditionalAction (AdditionalActionType type, Action *action)
 
void setAdditionalAction (Annotation::AdditionalActionType type, Action *action)
 

Detailed Description

The base interface of a form field.

This is the very basic interface to represent a field in a form.

This is not meant to be used as a direct base for the form fields in a document, but its abstract subclasses are.

Definition at line 39 of file form.h.

Member Enumeration Documentation

◆ AdditionalActionType

Describes the type of form additional action.

Since
1.1
Enumerator
FieldModified 

An action to be performed when the user modifies the field.

FormatField 

An action to be performed before the field is formatted to display its value.

ValidateField 

An action to be performed when the field value changes.

CalculateField 

An action to be performed when the field needs to be recalculated.

Definition at line 160 of file form.h.

◆ FieldType

The types of form field.

Enumerator
FormButton 

A "button". See FormFieldButton::ButtonType.

FormText 

A field of variable text. See FormFieldText::TextType.

FormChoice 

A choice field. See FormFieldChoice::ChoiceType.

FormSignature 

A signature.

Definition at line 50 of file form.h.

Constructor & Destructor Documentation

◆ ~FormField()

FormField::~FormField ( )
virtual

Definition at line 42 of file form.cpp.

Member Function Documentation

◆ activationAction()

Action * FormField::activationAction ( ) const

Definition at line 93 of file form.cpp.

◆ additionalAction() [1/2]

Action * FormField::additionalAction ( AdditionalActionType type) const

Returns the additional action of the given type or nullptr if no action has been defined.

Since
1.1

Definition at line 106 of file form.cpp.

◆ additionalAction() [2/2]

Action * FormField::additionalAction ( Annotation::AdditionalActionType type) const

Returns the additional action of the given type or nullptr if no action has been defined.

This is for actions of annotation widgets associated with the FormField

Since
1.5

Definition at line 119 of file form.cpp.

◆ additionalActions()

QList< Action * > FormField::additionalActions ( ) const

Returns all the additional actions for this form.

Since
22.04

Definition at line 132 of file form.cpp.

◆ commitFormattedValue()

void FormField::commitFormattedValue ( const QString & value)

Updates the value that was last committed in this form field.

Since
24.08

Definition at line 163 of file form.cpp.

◆ committedFormattedValue()

QString FormField::committedFormattedValue ( ) const

Returns the formatted value that was last committed in this form field.

Since
24.08

Definition at line 157 of file form.cpp.

◆ committedValue()

QString FormField::committedValue ( ) const

Returns the value that was last committed in this form field.

Since
24.08

Definition at line 145 of file form.cpp.

◆ commitValue()

void FormField::commitValue ( const QString & value)

Updates the value that was last committed in this form field.

Since
24.08

Definition at line 151 of file form.cpp.

◆ fullyQualifiedName()

virtual QString Okular::FormField::fullyQualifiedName ( ) const
pure virtual

The fully qualified name of the field, is used in the JavaScript scripts.

Since
1.9

◆ id()

virtual int Okular::FormField::id ( ) const
pure virtual

The ID of the field.

◆ isPrintable()

bool FormField::isPrintable ( ) const
virtual

Whether this field is printable.

Since
1.9

Definition at line 71 of file form.cpp.

◆ isReadOnly()

bool FormField::isReadOnly ( ) const
virtual

Whether the field is read-only.

Definition at line 53 of file form.cpp.

◆ isVisible()

bool FormField::isVisible ( ) const
virtual

Whether this form field is visible.

Definition at line 62 of file form.cpp.

◆ name()

virtual QString Okular::FormField::name ( ) const
pure virtual

The internal name of the field, to be used when referring to the field in eg scripts.

◆ page()

Page * FormField::page ( ) const

Returns the page of this form field.

Since
21.12.2

Definition at line 139 of file form.cpp.

◆ rect()

virtual NormalizedRect Okular::FormField::rect ( ) const
pure virtual

The bounding rect of the field, in normalized coordinates.

◆ setActivationAction()

void FormField::setActivationAction ( Action * action)
protected

Definition at line 99 of file form.cpp.

◆ setAdditionalAction() [1/2]

void FormField::setAdditionalAction ( AdditionalActionType type,
Action * action )
protected

Definition at line 112 of file form.cpp.

◆ setAdditionalAction() [2/2]

void FormField::setAdditionalAction ( Annotation::AdditionalActionType type,
Action * action )
protected

Definition at line 125 of file form.cpp.

◆ setAppearanceValue()

void FormField::setAppearanceValue ( const QVariant & value)
virtual

Sets the appearance value associated with the form field.

Since
24.08

Reimplemented in Okular::FormFieldText.

Definition at line 84 of file form.cpp.

◆ setPrintable()

void FormField::setPrintable ( bool value)
virtual

Set this field printable.

Since
1.9

Definition at line 76 of file form.cpp.

◆ setReadOnly()

void FormField::setReadOnly ( bool value)
virtual

Whether the field is read-only.

Since
1.4

Definition at line 58 of file form.cpp.

◆ setValue()

void FormField::setValue ( const QVariant & value)
virtual

Sets the value associated with the form field.

Since
24.08

Reimplemented in Okular::FormFieldText.

Definition at line 80 of file form.cpp.

◆ setVisible()

void FormField::setVisible ( bool value)
virtual

Whether the field is visible.

Since
1.5

Definition at line 67 of file form.cpp.

◆ type()

FormField::FieldType FormField::type ( ) const

The type of the field.

Definition at line 47 of file form.cpp.

◆ uiName()

virtual QString Okular::FormField::uiName ( ) const
pure virtual

The visible name of the field, to be used in the user interface (eg in error messages, etc).

◆ value()

QVariant FormField::value ( ) const
virtual

Returns the value associated wit the form field.

Since
24.08

Reimplemented in Okular::FormFieldText.

Definition at line 88 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 Jul 19 2024 11:58:25 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.