Changeset View
Changeset View
Standalone View
Standalone View
ui/formwidgets.cpp
Show First 20 Lines • Show All 369 Lines • ▼ Show 20 Line(s) | |||||
370 | } | 370 | } | ||
371 | 371 | | |||
372 | void FormWidgetIface::slotRefresh( Okular::FormField * form ) | 372 | void FormWidgetIface::slotRefresh( Okular::FormField * form ) | ||
373 | { | 373 | { | ||
374 | if ( m_ff != form ) | 374 | if ( m_ff != form ) | ||
375 | { | 375 | { | ||
376 | return; | 376 | return; | ||
377 | } | 377 | } | ||
378 | setVisibility( form->isVisible() /*&& !form->isReadOnly()*/ ); | 378 | setVisibility( form->isVisible() && m_controller->shouldFormWidgetBeShown( form ) ); | ||
379 | 379 | | |||
380 | m_widget->setEnabled( !form->isReadOnly() ); | 380 | m_widget->setEnabled( !form->isReadOnly() ); | ||
381 | } | 381 | } | ||
382 | 382 | | |||
383 | 383 | | |||
384 | PushButtonEdit::PushButtonEdit( Okular::FormFieldButton * button, QWidget * parent ) | 384 | PushButtonEdit::PushButtonEdit( Okular::FormFieldButton * button, QWidget * parent ) | ||
385 | : QPushButton( parent ), FormWidgetIface( this, button ) | 385 | : QPushButton( parent ), FormWidgetIface( this, button ) | ||
386 | { | 386 | { | ||
387 | setText( button->caption() ); | 387 | setText( button->caption() ); | ||
388 | | ||||
389 | if( button->caption().isEmpty() ) | ||||
390 | { | ||||
391 | setFlat( true ); | ||||
392 | } | ||||
393 | | ||||
388 | setVisible( button->isVisible() ); | 394 | setVisible( button->isVisible() ); | ||
389 | setCursor( Qt::ArrowCursor ); | 395 | setCursor( Qt::ArrowCursor ); | ||
390 | } | 396 | } | ||
391 | 397 | | |||
392 | 398 | | |||
393 | CheckBoxEdit::CheckBoxEdit( Okular::FormFieldButton * button, QWidget * parent ) | 399 | CheckBoxEdit::CheckBoxEdit( Okular::FormFieldButton * button, QWidget * parent ) | ||
394 | : QCheckBox( parent ), FormWidgetIface( this, button ) | 400 | : QCheckBox( parent ), FormWidgetIface( this, button ) | ||
395 | { | 401 | { | ||
▲ Show 20 Lines • Show All 881 Lines • Show Last 20 Lines |