Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <cpdf_formfield.h>
Public Types | |
enum | Type { kUnknown , kPushButton , kRadioButton , kCheckBox , kText , kRichText , kFile , kListBox , kComboBox , kSign } |
Static Public Member Functions | |
static absl::optional< FormFieldType > | IntToFormFieldType (int value) |
static WideString | GetFullNameForDict (const CPDF_Dictionary *pFieldDict) |
static RetainPtr< const CPDF_Object > | GetFieldAttrForDict (const CPDF_Dictionary *pFieldDict, const ByteString &name) |
static RetainPtr< CPDF_Object > | GetMutableFieldAttrForDict (CPDF_Dictionary *pFieldDict, const ByteString &name) |
Definition at line 57 of file cpdf_formfield.h.
enum CPDF_FormField::Type |
Enumerator | |
---|---|
kUnknown | |
kPushButton | |
kRadioButton | |
kCheckBox | |
kText | |
kRichText | |
kFile | |
kListBox | |
kComboBox | |
kSign |
Definition at line 59 of file cpdf_formfield.h.
CPDF_FormField::CPDF_FormField | ( | CPDF_InteractiveForm * | pForm, |
RetainPtr< CPDF_Dictionary > | pDict ) |
Definition at line 123 of file cpdf_formfield.cpp.
References CPDF_FormField().
Referenced by CPDF_FormField().
|
default |
bool CPDF_FormField::CheckControl | ( | int | iControlIndex, |
bool | bChecked, | ||
NotificationOption | notify ) |
Definition at line 638 of file cpdf_formfield.cpp.
References CPDF_FormControl::CheckControl(), CountControls(), GetControl(), CPDF_FormControl::GetExportValue(), CPDF_FormControl::GetOnStateName(), CPDF_Object::GetString(), CPDF_FormControl::IsChecked(), fxcrt::ByteString::operator=(), fxcrt::ByteString::operator==(), and fxcrt::WideString::operator==().
Referenced by ResetField(), and CPDFSDK_Widget::SetCheck().
bool CPDF_FormField::ClearSelection | ( | NotificationOption | notify | ) |
Definition at line 507 of file cpdf_formfield.cpp.
References GetOptionLabel(), GetSelectedIndex(), kNotify, and fxcrt::WideString::operator=().
Referenced by CPDFSDK_Widget::ClearSelection(), and ResetField().
int CPDF_FormField::CountControls | ( | ) | const |
Definition at line 260 of file cpdf_formfield.cpp.
Referenced by CJS_PublicMethods::AFSimple_Calculate(), CheckControl(), FPDFAnnot_GetFormControlCount(), GetCheckValue(), CPDFSDK_InteractiveForm::GetWidgets(), ResetField(), CPDFSDK_InteractiveForm::ResetFieldAppearance(), and CPDFSDK_InteractiveForm::UpdateField().
int CPDF_FormField::CountOptions | ( | ) | const |
Definition at line 595 of file cpdf_formfield.cpp.
References GetType().
Referenced by CPDFSDK_Widget::CountOptions(), FindOption(), FPDFAnnot_GetOptionCount(), FPDFAnnot_GetOptionLabel(), FPDFAnnot_IsOptionSelected(), GetDefaultSelectedItem(), GetSelectedIndex(), IsItemSelected(), CPDFSDK_AppStream::SetAsListBox(), SetItemSelection(), and UseSelectedIndicesObject().
int CPDF_FormField::CountSelectedItems | ( | ) | const |
Definition at line 461 of file cpdf_formfield.cpp.
References CPDF_Object::AsArray(), CPDF_Object::GetString(), fxcrt::ByteString::IsEmpty(), CPDF_Object::IsNumber(), and CPDF_Object::IsString().
Referenced by CJS_PublicMethods::AFSimple_Calculate(), CPDFSDK_InteractiveForm::OnFormat(), and CPDFSDK_AppStream::SetAsListBox().
int CPDF_FormField::CountSelectedOptions | ( | ) | const |
Definition at line 734 of file cpdf_formfield.cpp.
Referenced by GetSelectedIndex().
int CPDF_FormField::FindOption | ( | const WideString & | csOptValue | ) | const |
Definition at line 630 of file cpdf_formfield.cpp.
References CountOptions(), GetOptionValue(), and fxcrt::WideString::operator==().
CPDF_AAction CPDF_FormField::GetAdditionalAction | ( | ) | const |
Definition at line 303 of file cpdf_formfield.cpp.
Referenced by FPDFAnnot_GetFormAdditionalActionJavaScript(), CPDFSDK_Widget::GetAAction(), CPDFSDK_InteractiveForm::OnCalculate(), CPDFSDK_InteractiveForm::OnFormat(), CPDFSDK_InteractiveForm::OnKeyStrokeCommit(), and CPDFSDK_InteractiveForm::OnValidate().
WideString CPDF_FormField::GetAlternateName | ( | ) | const |
Definition at line 309 of file cpdf_formfield.cpp.
References fxcrt::WideString::WideString().
Referenced by FPDFAnnot_GetFormFieldAlternateName().
WideString CPDF_FormField::GetCheckValue | ( | bool | bDefault | ) | const |
Definition at line 692 of file cpdf_formfield.cpp.
References CountControls(), GetControl(), CPDF_FormControl::GetExportValue(), CPDF_FormControl::IsChecked(), CPDF_FormControl::IsDefaultChecked(), and fxcrt::WideString::operator=().
Referenced by CPDF_InteractiveForm::ExportToFDF().
CPDF_FormControl * CPDF_FormField::GetControl | ( | int | index | ) | const |
Definition at line 264 of file cpdf_formfield.cpp.
Referenced by CJS_PublicMethods::AFSimple_Calculate(), CheckControl(), GetCheckValue(), CPDFSDK_InteractiveForm::GetWidgets(), ResetField(), CPDFSDK_InteractiveForm::ResetFieldAppearance(), and CPDFSDK_InteractiveForm::UpdateField().
int CPDF_FormField::GetControlIndex | ( | const CPDF_FormControl * | pControl | ) | const |
Definition at line 268 of file cpdf_formfield.cpp.
Referenced by FPDFAnnot_GetFormControlIndex(), and CPDFSDK_Widget::SetCheck().
int CPDF_FormField::GetDefaultSelectedItem | ( | ) | const |
Definition at line 580 of file cpdf_formfield.cpp.
References CountOptions(), GetOptionValue(), GetType(), fxcrt::WideString::IsEmpty(), and fxcrt::WideString::operator==().
Referenced by ResetField().
WideString CPDF_FormField::GetDefaultValue | ( | ) | const |
Definition at line 366 of file cpdf_formfield.cpp.
RetainPtr< const CPDF_Object > CPDF_FormField::GetFieldAttr | ( | const ByteString & | name | ) | const |
Definition at line 173 of file cpdf_formfield.cpp.
|
static |
Definition at line 87 of file cpdf_formfield.cpp.
RetainPtr< const CPDF_Dictionary > CPDF_FormField::GetFieldDict | ( | ) | const |
Definition at line 178 of file cpdf_formfield.cpp.
Referenced by CPDF_InteractiveForm::ExportToFDF().
uint32_t CPDF_FormField::GetFieldFlags | ( | ) | const |
Definition at line 321 of file cpdf_formfield.cpp.
Referenced by CPDF_InteractiveForm::ExportToFDF(), FPDFAnnot_GetFormFieldFlags(), and CPDFSDK_Widget::GetFieldFlags().
FormFieldType CPDF_FormField::GetFieldType | ( | ) | const |
Definition at line 280 of file cpdf_formfield.cpp.
References kCheckBox, kCheckBox, kComboBox, kComboBox, kFile, kListBox, kListBox, kPushButton, kPushButton, kRadioButton, kRadioButton, kRichText, kSign, kSignature, kText, kTextField, and kUnknown.
Referenced by CJS_PublicMethods::AFSimple_Calculate(), CPDFSDK_InteractiveForm::AfterCheckedStatusChange(), CPDFSDK_InteractiveForm::AfterSelectionChange(), CPDFSDK_InteractiveForm::AfterValueChange(), CPDFSDK_InteractiveForm::BeforeSelectionChange(), CPDFSDK_InteractiveForm::BeforeValueChange(), FPDFAnnot_GetFormFieldType(), FPDFAnnot_IsOptionSelected(), FPDFPage_HasFormFieldAtPoint(), CPDFSDK_Widget::GetFieldType(), CPDFSDK_InteractiveForm::OnCalculate(), and CPDFSDK_InteractiveForm::OnFormat().
WideString CPDF_FormField::GetFullName | ( | ) | const |
Definition at line 169 of file cpdf_formfield.cpp.
Referenced by FPDFAnnot_GetFormFieldName().
|
static |
Definition at line 102 of file cpdf_formfield.cpp.
References CPDF_Dictionary::GetDictFor(), CPDF_Dictionary::GetUnicodeTextFor(), fxcrt::WideString::IsEmpty(), pdfium::form_fields::kParent, pdfium::form_fields::kT, fxcrt::operator+(), fxcrt::operator+(), and fxcrt::WideString::operator=().
Referenced by CPDF_InteractiveForm::ExportToFDF(), CPDF_InteractiveForm::GetFieldByDict(), and TEST().
WideString CPDF_FormField::GetMappingName | ( | ) | const |
Definition at line 315 of file cpdf_formfield.cpp.
References fxcrt::WideString::WideString().
int CPDF_FormField::GetMaxLen | ( | ) | const |
Definition at line 445 of file cpdf_formfield.cpp.
Referenced by CPDFSDK_Widget::GetMaxLen().
|
static |
Definition at line 94 of file cpdf_formfield.cpp.
WideString CPDF_FormField::GetOptionLabel | ( | int | index | ) | const |
Definition at line 622 of file cpdf_formfield.cpp.
Referenced by ClearSelection(), FPDFAnnot_GetOptionLabel(), CPDFSDK_Widget::GetOptionLabel(), CPDFSDK_Widget::GetSelectExportText(), CPDFSDK_InteractiveForm::OnFormat(), ResetField(), and CPDFSDK_AppStream::SetAsListBox().
WideString CPDF_FormField::GetOptionValue | ( | int | index | ) | const |
Definition at line 626 of file cpdf_formfield.cpp.
Referenced by FindOption(), GetDefaultSelectedItem(), GetSelectedIndex(), CPDFSDK_Widget::GetSelectExportText(), IsItemSelected(), SetItemSelection(), and UseSelectedIndicesObject().
int CPDF_FormField::GetSelectedIndex | ( | int | index | ) | const |
Definition at line 472 of file cpdf_formfield.cpp.
References fxcrt::WideString::WideString(), CPDF_Object::AsArray(), CountOptions(), CountSelectedOptions(), CPDF_Object::GetInteger(), GetOptionValue(), GetSelectedOptionIndex(), CPDF_Object::GetUnicodeText(), CPDF_Object::IsNumber(), CPDF_Object::IsString(), fxcrt::WideString::operator=(), and fxcrt::WideString::operator==().
Referenced by ClearSelection(), CPDFSDK_Widget::GetSelectedIndex(), CPDFSDK_InteractiveForm::OnFormat(), and CPDFSDK_AppStream::SetAsListBox().
int CPDF_FormField::GetSelectedOptionIndex | ( | int | index | ) | const |
Definition at line 739 of file cpdf_formfield.cpp.
Referenced by GetSelectedIndex().
int CPDF_FormField::GetTopVisibleIndex | ( | ) | const |
Definition at line 729 of file cpdf_formfield.cpp.
Referenced by CPDFSDK_Widget::GetTopVisibleIndex(), and CPDFSDK_AppStream::SetAsListBox().
|
inline |
Definition at line 85 of file cpdf_formfield.h.
Referenced by CPDF_InteractiveForm::CheckRequiredFields(), CountOptions(), CPDF_InteractiveForm::ExportToFDF(), GetDefaultSelectedItem(), IsItemSelected(), SetItemSelection(), and UseSelectedIndicesObject().
WideString CPDF_FormField::GetValue | ( | ) | const |
Definition at line 362 of file cpdf_formfield.cpp.
Referenced by CJS_PublicMethods::AFSimple_Calculate(), FPDFAnnot_GetFormFieldValue(), CPDFSDK_Widget::GetValue(), CPDFSDK_InteractiveForm::OnCalculate(), and CPDFSDK_InteractiveForm::OnFormat().
|
static |
Definition at line 78 of file cpdf_formfield.cpp.
References kUnknown.
bool CPDF_FormField::IsItemSelected | ( | int | index | ) | const |
Definition at line 523 of file cpdf_formfield.cpp.
References CountOptions(), GetOptionValue(), GetType(), IsSelectedIndex(), and IsSelectedOption().
Referenced by FPDFAnnot_IsOptionSelected(), and CPDFSDK_Widget::IsOptionSelected().
|
inline |
Definition at line 105 of file cpdf_formfield.h.
Referenced by CPDF_InteractiveForm::CheckRequiredFields().
|
inline |
Definition at line 104 of file cpdf_formfield.h.
Referenced by CPDF_InteractiveForm::CheckRequiredFields().
bool CPDF_FormField::IsSelectedIndex | ( | int | iOptIndex | ) | const |
Definition at line 770 of file cpdf_formfield.cpp.
References CPDF_ArrayLocker::CPDF_ArrayLocker().
Referenced by IsItemSelected().
bool CPDF_FormField::IsSelectedOption | ( | const WideString & | wsOptValue | ) | const |
Definition at line 752 of file cpdf_formfield.cpp.
References CPDF_ArrayLocker::CPDF_ArrayLocker().
Referenced by IsItemSelected().
bool CPDF_FormField::ResetField | ( | ) |
Definition at line 182 of file cpdf_formfield.cpp.
References CheckControl(), ClearSelection(), CountControls(), GetControl(), GetDefaultSelectedItem(), GetOptionLabel(), CPDF_FormControl::IsDefaultChecked(), kCheckBox, kComboBox, kDoNotNotify, kFile, kListBox, kRadioButton, kRichText, pdfium::form_fields::kRV, kText, fxcrt::WideString::operator=(), fxcrt::WideString::operator==(), and SetItemSelection().
Referenced by CPDF_InteractiveForm::ResetForm().
void CPDF_FormField::SelectOption | ( | int | iOptIndex | ) |
Definition at line 789 of file cpdf_formfield.cpp.
void CPDF_FormField::SetFieldFlags | ( | uint32_t | dwFlags | ) |
Definition at line 327 of file cpdf_formfield.cpp.
bool CPDF_FormField::SetItemSelection | ( | int | index, |
NotificationOption | notify ) |
Definition at line 533 of file cpdf_formfield.cpp.
References CountOptions(), GetOptionValue(), GetType(), kNotify, and UseSelectedIndicesObject().
Referenced by ResetField(), and CPDFSDK_Widget::SetOptionSelection().
bool CPDF_FormField::SetValue | ( | const WideString & | value, |
NotificationOption | notify ) |
Definition at line 440 of file cpdf_formfield.cpp.
Referenced by CPDFSDK_InteractiveForm::OnCalculate(), and CPDFSDK_Widget::SetValue().
bool CPDF_FormField::UseSelectedIndicesObject | ( | ) | const |
Definition at line 804 of file cpdf_formfield.cpp.
References CPDF_ArrayLocker::CPDF_ArrayLocker(), CountOptions(), GetOptionValue(), and GetType().
Referenced by SetItemSelection().