void KoPABackgroundToolWidget::slotActivePageChanged() { KoPAPageBase * page = m_tool->view()->activePage(); KoPAPage * normalPage = dynamic_cast<KoPAPage *>( page ); widget.useMasterBackground->setEnabled( normalPage ); widget.displayMasterShapes->setEnabled( normalPage ); if ( normalPage ) { widget.useMasterBackground->setChecked( normalPage->displayMasterBackground() ); widget.displayMasterShapes->setChecked( normalPage->displayMasterShapes() ); } else { widget.useMasterBackground->setChecked( false ); widget.displayMasterShapes->setChecked( false ); } }
void KoPABackgroundToolWidget::slotActivePageChanged() { KoPAPageBase * page = m_tool->view()->activePage(); KoPAPage * normalPage = dynamic_cast<KoPAPage *>( page ); widget.useMasterBackground->setEnabled( normalPage ); widget.displayMasterShapes->setEnabled( normalPage ); if ( normalPage ) { widget.useMasterBackground->setChecked( normalPage->displayMasterBackground() ); widget.displayMasterShapes->setChecked( normalPage->displayMasterShapes() ); const bool enableBackgroundEditing = (! normalPage->displayMasterBackground()); widget.backgroundImage->setEnabled(enableBackgroundEditing); widget.useStrokeAndFillDockerLabel->setEnabled(enableBackgroundEditing); } else { widget.useMasterBackground->setChecked( false ); widget.displayMasterShapes->setChecked( false ); widget.backgroundImage->setEnabled(true); widget.useStrokeAndFillDockerLabel->setEnabled(true); } }