MCPcopy Create free account
hub / github.com/KDE/okular / getField

Method getField

core/script/js_document.cpp:155–167  ·  view source on GitHub ↗

Document.getField()

Source from the content-addressed store, hash-verified

153
154// Document.getField()
155QJSValue JSDocument::getField(const QString &cName) const
156{
157 QList<Page *>::const_iterator pIt = m_doc->m_pagesVector.constBegin(), pEnd = m_doc->m_pagesVector.constEnd();
158 for (; pIt != pEnd; ++pIt) {
159 const QList<Okular::FormField *> pageFields = (*pIt)->formFields();
160 for (FormField *form : pageFields) {
161 if (form->fullyQualifiedName() == cName) {
162 return JSField::wrapField(qjsEngine(this), form, *pIt);
163 }
164 }
165 }
166 return QJSValue(QJSValue::UndefinedValue);
167}
168
169// Document.getPageLabel()
170QString JSDocument::getPageLabel(int nPage) const

Callers 1

AFSimple_CalculateFunction · 0.80

Calls 2

formFieldsMethod · 0.80
fullyQualifiedNameMethod · 0.80

Tested by

no test coverage detected