Changeset View
Changeset View
Standalone View
Standalone View
generators/poppler/formfields.cpp
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Line(s) | 71 | { | |||
---|---|---|---|---|---|
72 | return m_field->name(); | 72 | return m_field->name(); | ||
73 | } | 73 | } | ||
74 | 74 | | |||
75 | QString PopplerFormFieldButton::uiName() const | 75 | QString PopplerFormFieldButton::uiName() const | ||
76 | { | 76 | { | ||
77 | return m_field->uiName(); | 77 | return m_field->uiName(); | ||
78 | } | 78 | } | ||
79 | 79 | | |||
80 | QString PopplerFormFieldButton::fullyQualifiedName() const | ||||
81 | { | ||||
82 | return m_field->fullyQualifiedName(); | ||||
83 | } | ||||
84 | | ||||
80 | bool PopplerFormFieldButton::isReadOnly() const | 85 | bool PopplerFormFieldButton::isReadOnly() const | ||
81 | { | 86 | { | ||
82 | return m_field->isReadOnly(); | 87 | return m_field->isReadOnly(); | ||
83 | } | 88 | } | ||
84 | 89 | | |||
85 | void PopplerFormFieldButton::setReadOnly( bool value ) | 90 | void PopplerFormFieldButton::setReadOnly( bool value ) | ||
86 | { | 91 | { | ||
87 | #ifdef HAVE_POPPLER_0_64 | 92 | #ifdef HAVE_POPPLER_0_64 | ||
Show All 12 Lines | |||||
100 | { | 105 | { | ||
101 | #ifdef HAVE_POPPLER_0_64 | 106 | #ifdef HAVE_POPPLER_0_64 | ||
102 | m_field->setVisible( value ); | 107 | m_field->setVisible( value ); | ||
103 | #else | 108 | #else | ||
104 | Q_UNUSED( value ); | 109 | Q_UNUSED( value ); | ||
105 | #endif | 110 | #endif | ||
106 | } | 111 | } | ||
107 | 112 | | |||
113 | bool PopplerFormFieldButton::isPrintable() const | ||||
114 | { | ||||
115 | #ifdef HAVE_POPPLER_0_79 | ||||
116 | return m_field->isPrintable(); | ||||
117 | #else | ||||
118 | return true; | ||||
119 | #endif | ||||
120 | } | ||||
121 | | ||||
122 | void PopplerFormFieldButton::setPrintable( bool value ) | ||||
123 | { | ||||
124 | #ifdef HAVE_POPPLER_0_79 | ||||
125 | m_field->setPrintable( value ); | ||||
126 | #else | ||||
127 | Q_UNUSED( value ); | ||||
128 | #endif | ||||
129 | } | ||||
130 | | ||||
108 | Okular::FormFieldButton::ButtonType PopplerFormFieldButton::buttonType() const | 131 | Okular::FormFieldButton::ButtonType PopplerFormFieldButton::buttonType() const | ||
109 | { | 132 | { | ||
110 | switch ( m_field->buttonType() ) | 133 | switch ( m_field->buttonType() ) | ||
111 | { | 134 | { | ||
112 | case Poppler::FormFieldButton::Push: | 135 | case Poppler::FormFieldButton::Push: | ||
113 | return Okular::FormFieldButton::Push; | 136 | return Okular::FormFieldButton::Push; | ||
114 | case Poppler::FormFieldButton::CheckBox: | 137 | case Poppler::FormFieldButton::CheckBox: | ||
115 | return Okular::FormFieldButton::CheckBox; | 138 | return Okular::FormFieldButton::CheckBox; | ||
Show All 18 Lines | 156 | { | |||
134 | m_field->setState( state ); | 157 | m_field->setState( state ); | ||
135 | } | 158 | } | ||
136 | 159 | | |||
137 | QList< int > PopplerFormFieldButton::siblings() const | 160 | QList< int > PopplerFormFieldButton::siblings() const | ||
138 | { | 161 | { | ||
139 | return m_field->siblings(); | 162 | return m_field->siblings(); | ||
140 | } | 163 | } | ||
141 | 164 | | |||
165 | #ifdef HAVE_POPPLER_0_79 | ||||
166 | Poppler::FormFieldIcon PopplerFormFieldButton::icon() const | ||||
167 | { | ||||
168 | return m_field->icon(); | ||||
169 | } | ||||
170 | #endif | ||||
171 | | ||||
172 | void PopplerFormFieldButton::setIcon( Okular::FormField *field ) | ||||
173 | { | ||||
174 | #ifdef HAVE_POPPLER_0_79 | ||||
175 | if( field->type() == Okular::FormField::FormButton ) | ||||
176 | { | ||||
177 | PopplerFormFieldButton *button = static_cast< PopplerFormFieldButton * >( field ); | ||||
178 | m_field->setIcon( button->icon() ); | ||||
179 | } | ||||
180 | #else | ||||
181 | Q_UNUSED( field ); | ||||
182 | #endif | ||||
183 | } | ||||
184 | | ||||
142 | 185 | | |||
143 | PopplerFormFieldText::PopplerFormFieldText( Poppler::FormFieldText * field ) | 186 | PopplerFormFieldText::PopplerFormFieldText( Poppler::FormFieldText * field ) | ||
144 | : Okular::FormFieldText(), m_field( field ) | 187 | : Okular::FormFieldText(), m_field( field ) | ||
145 | { | 188 | { | ||
146 | m_rect = Okular::NormalizedRect::fromQRectF( m_field->rect() ); | 189 | m_rect = Okular::NormalizedRect::fromQRectF( m_field->rect() ); | ||
147 | m_id = m_field->id(); | 190 | m_id = m_field->id(); | ||
148 | SET_ACTIONS | 191 | SET_ACTIONS | ||
149 | } | 192 | } | ||
Show All 18 Lines | 210 | { | |||
168 | return m_field->name(); | 211 | return m_field->name(); | ||
169 | } | 212 | } | ||
170 | 213 | | |||
171 | QString PopplerFormFieldText::uiName() const | 214 | QString PopplerFormFieldText::uiName() const | ||
172 | { | 215 | { | ||
173 | return m_field->uiName(); | 216 | return m_field->uiName(); | ||
174 | } | 217 | } | ||
175 | 218 | | |||
219 | QString PopplerFormFieldText::fullyQualifiedName() const | ||||
220 | { | ||||
221 | return m_field->fullyQualifiedName(); | ||||
222 | } | ||||
223 | | ||||
176 | bool PopplerFormFieldText::isReadOnly() const | 224 | bool PopplerFormFieldText::isReadOnly() const | ||
177 | { | 225 | { | ||
178 | return m_field->isReadOnly(); | 226 | return m_field->isReadOnly(); | ||
179 | } | 227 | } | ||
180 | 228 | | |||
181 | void PopplerFormFieldText::setReadOnly( bool value ) | 229 | void PopplerFormFieldText::setReadOnly( bool value ) | ||
182 | { | 230 | { | ||
183 | #ifdef HAVE_POPPLER_0_64 | 231 | #ifdef HAVE_POPPLER_0_64 | ||
Show All 12 Lines | |||||
196 | { | 244 | { | ||
197 | #ifdef HAVE_POPPLER_0_64 | 245 | #ifdef HAVE_POPPLER_0_64 | ||
198 | m_field->setVisible( value ); | 246 | m_field->setVisible( value ); | ||
199 | #else | 247 | #else | ||
200 | Q_UNUSED( value ); | 248 | Q_UNUSED( value ); | ||
201 | #endif | 249 | #endif | ||
202 | } | 250 | } | ||
203 | 251 | | |||
252 | bool PopplerFormFieldText::isPrintable() const | ||||
253 | { | ||||
254 | #ifdef HAVE_POPPLER_0_79 | ||||
255 | return m_field->isPrintable(); | ||||
256 | #else | ||||
257 | return true; | ||||
258 | #endif | ||||
259 | } | ||||
260 | | ||||
261 | void PopplerFormFieldText::setPrintable( bool value ) | ||||
262 | { | ||||
263 | #ifdef HAVE_POPPLER_0_79 | ||||
264 | m_field->setPrintable( value ); | ||||
265 | #else | ||||
266 | Q_UNUSED( value ); | ||||
267 | #endif | ||||
268 | } | ||||
269 | | ||||
270 | | ||||
204 | Okular::FormFieldText::TextType PopplerFormFieldText::textType() const | 271 | Okular::FormFieldText::TextType PopplerFormFieldText::textType() const | ||
205 | { | 272 | { | ||
206 | switch ( m_field->textType() ) | 273 | switch ( m_field->textType() ) | ||
207 | { | 274 | { | ||
208 | case Poppler::FormFieldText::Normal: | 275 | case Poppler::FormFieldText::Normal: | ||
209 | return Okular::FormFieldText::Normal; | 276 | return Okular::FormFieldText::Normal; | ||
210 | case Poppler::FormFieldText::Multiline: | 277 | case Poppler::FormFieldText::Multiline: | ||
211 | return Okular::FormFieldText::Multiline; | 278 | return Okular::FormFieldText::Multiline; | ||
212 | case Poppler::FormFieldText::FileSelect: | 279 | case Poppler::FormFieldText::FileSelect: | ||
213 | return Okular::FormFieldText::FileSelect; | 280 | return Okular::FormFieldText::FileSelect; | ||
214 | } | 281 | } | ||
215 | return Okular::FormFieldText::Normal; | 282 | return Okular::FormFieldText::Normal; | ||
216 | } | 283 | } | ||
217 | 284 | | |||
218 | QString PopplerFormFieldText::text() const | 285 | QString PopplerFormFieldText::text() const | ||
219 | { | 286 | { | ||
220 | return m_field->text(); | 287 | return m_field->text(); | ||
221 | } | 288 | } | ||
222 | 289 | | |||
223 | void PopplerFormFieldText::setText( const QString& text ) | 290 | void PopplerFormFieldText::setText( const QString& text ) | ||
224 | { | 291 | { | ||
225 | m_field->setText( text ); | 292 | m_field->setText( text ); | ||
226 | } | 293 | } | ||
227 | 294 | | |||
295 | void PopplerFormFieldText::setAppearanceText( const QString& text ) | ||||
296 | { | ||||
297 | #ifdef HAVE_POPPLER_0_80 | ||||
298 | m_field->setAppearanceText( text ); | ||||
299 | #else | ||||
300 | Q_UNUSED( text ); | ||||
301 | #endif | ||||
302 | } | ||||
303 | | ||||
304 | | ||||
228 | bool PopplerFormFieldText::isPassword() const | 305 | bool PopplerFormFieldText::isPassword() const | ||
229 | { | 306 | { | ||
230 | return m_field->isPassword(); | 307 | return m_field->isPassword(); | ||
231 | } | 308 | } | ||
232 | 309 | | |||
233 | bool PopplerFormFieldText::isRichText() const | 310 | bool PopplerFormFieldText::isRichText() const | ||
234 | { | 311 | { | ||
235 | return m_field->isRichText(); | 312 | return m_field->isRichText(); | ||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | 355 | { | |||
279 | return m_field->name(); | 356 | return m_field->name(); | ||
280 | } | 357 | } | ||
281 | 358 | | |||
282 | QString PopplerFormFieldChoice::uiName() const | 359 | QString PopplerFormFieldChoice::uiName() const | ||
283 | { | 360 | { | ||
284 | return m_field->uiName(); | 361 | return m_field->uiName(); | ||
285 | } | 362 | } | ||
286 | 363 | | |||
364 | QString PopplerFormFieldChoice::fullyQualifiedName() const | ||||
365 | { | ||||
366 | return m_field->fullyQualifiedName(); | ||||
367 | } | ||||
368 | | ||||
287 | bool PopplerFormFieldChoice::isReadOnly() const | 369 | bool PopplerFormFieldChoice::isReadOnly() const | ||
288 | { | 370 | { | ||
289 | return m_field->isReadOnly(); | 371 | return m_field->isReadOnly(); | ||
290 | } | 372 | } | ||
291 | 373 | | |||
292 | void PopplerFormFieldChoice::setReadOnly( bool value ) | 374 | void PopplerFormFieldChoice::setReadOnly( bool value ) | ||
293 | { | 375 | { | ||
294 | #ifdef HAVE_POPPLER_0_64 | 376 | #ifdef HAVE_POPPLER_0_64 | ||
Show All 12 Lines | |||||
307 | { | 389 | { | ||
308 | #ifdef HAVE_POPPLER_0_64 | 390 | #ifdef HAVE_POPPLER_0_64 | ||
309 | m_field->setVisible( value ); | 391 | m_field->setVisible( value ); | ||
310 | #else | 392 | #else | ||
311 | Q_UNUSED( value ); | 393 | Q_UNUSED( value ); | ||
312 | #endif | 394 | #endif | ||
313 | } | 395 | } | ||
314 | 396 | | |||
397 | bool PopplerFormFieldChoice::isPrintable() const | ||||
398 | { | ||||
399 | #ifdef HAVE_POPPLER_0_79 | ||||
400 | return m_field->isPrintable(); | ||||
401 | #else | ||||
402 | return true; | ||||
403 | #endif | ||||
404 | } | ||||
405 | | ||||
406 | void PopplerFormFieldChoice::setPrintable( bool value ) | ||||
407 | { | ||||
408 | #ifdef HAVE_POPPLER_0_79 | ||||
409 | m_field->setPrintable( value ); | ||||
410 | #else | ||||
411 | Q_UNUSED( value ); | ||||
412 | #endif | ||||
413 | } | ||||
414 | | ||||
315 | Okular::FormFieldChoice::ChoiceType PopplerFormFieldChoice::choiceType() const | 415 | Okular::FormFieldChoice::ChoiceType PopplerFormFieldChoice::choiceType() const | ||
316 | { | 416 | { | ||
317 | switch ( m_field->choiceType() ) | 417 | switch ( m_field->choiceType() ) | ||
318 | { | 418 | { | ||
319 | case Poppler::FormFieldChoice::ComboBox: | 419 | case Poppler::FormFieldChoice::ComboBox: | ||
320 | return Okular::FormFieldChoice::ComboBox; | 420 | return Okular::FormFieldChoice::ComboBox; | ||
321 | case Poppler::FormFieldChoice::ListBox: | 421 | case Poppler::FormFieldChoice::ListBox: | ||
322 | return Okular::FormFieldChoice::ListBox; | 422 | return Okular::FormFieldChoice::ListBox; | ||
▲ Show 20 Lines • Show All 89 Lines • ▼ Show 20 Line(s) | 511 | { | |||
412 | return m_field->name(); | 512 | return m_field->name(); | ||
413 | } | 513 | } | ||
414 | 514 | | |||
415 | QString PopplerFormFieldSignature::uiName() const | 515 | QString PopplerFormFieldSignature::uiName() const | ||
416 | { | 516 | { | ||
417 | return m_field->uiName(); | 517 | return m_field->uiName(); | ||
418 | } | 518 | } | ||
419 | 519 | | |||
520 | QString PopplerFormFieldSignature::fullyQualifiedName() const | ||||
521 | { | ||||
522 | return m_field->fullyQualifiedName(); | ||||
523 | } | ||||
524 | | ||||
420 | bool PopplerFormFieldSignature::isReadOnly() const | 525 | bool PopplerFormFieldSignature::isReadOnly() const | ||
421 | { | 526 | { | ||
422 | return m_field->isReadOnly(); | 527 | return m_field->isReadOnly(); | ||
423 | } | 528 | } | ||
424 | 529 | | |||
425 | bool PopplerFormFieldSignature::isVisible() const | 530 | bool PopplerFormFieldSignature::isVisible() const | ||
426 | { | 531 | { | ||
427 | return m_field->isVisible(); | 532 | return m_field->isVisible(); | ||
Show All 25 Lines |