void QgsAtlasCompositionWidget::updateGuiElements() { QgsAtlasComposition* atlasMap = &mComposition->atlasComposition(); if ( atlasMap->enabled() ) { mUseAtlasCheckBox->setCheckState( Qt::Checked ); } else { mUseAtlasCheckBox->setCheckState( Qt::Unchecked ); } mAtlasCoverageLayerComboBox->setLayer( atlasMap->coverageLayer() ); mAtlasSortFeatureKeyComboBox->setField( atlasMap->sortKeyAttributeName() ); mAtlasFilenamePatternEdit->setText( atlasMap->filenamePattern() ); mAtlasHideCoverageCheckBox->setCheckState( atlasMap->hideCoverage() ? Qt::Checked : Qt::Unchecked ); mAtlasSingleFileCheckBox->setCheckState( atlasMap->singleFile() ? Qt::Checked : Qt::Unchecked ); mAtlasSortFeatureCheckBox->setCheckState( atlasMap->sortFeatures() ? Qt::Checked : Qt::Unchecked ); mAtlasSortFeatureDirectionButton->setArrowType( atlasMap->sortAscending() ? Qt::UpArrow : Qt::DownArrow ); mAtlasFeatureFilterEdit->setText( atlasMap->featureFilter() ); mAtlasFeatureFilterCheckBox->setCheckState( atlasMap->filterFeatures() ? Qt::Checked : Qt::Unchecked ); }
void QgsAtlasCompositionWidget::updateGuiElements() { blockAllSignals( true ); QgsAtlasComposition *atlasMap = &mComposition->atlasComposition(); mUseAtlasCheckBox->setCheckState( atlasMap->enabled() ? Qt::Checked : Qt::Unchecked ); mConfigurationGroup->setEnabled( atlasMap->enabled() ); mOutputGroup->setEnabled( atlasMap->enabled() ); mAtlasCoverageLayerComboBox->setLayer( atlasMap->coverageLayer() ); mPageNameWidget->setLayer( atlasMap->coverageLayer() ); mPageNameWidget->setField( atlasMap->pageNameExpression() ); mAtlasSortFeatureKeyComboBox->setLayer( atlasMap->coverageLayer() ); mAtlasSortFeatureKeyComboBox->setField( atlasMap->sortKeyAttributeName() ); mAtlasFilenamePatternEdit->setText( atlasMap->filenamePattern() ); mAtlasHideCoverageCheckBox->setCheckState( atlasMap->hideCoverage() ? Qt::Checked : Qt::Unchecked ); mAtlasSingleFileCheckBox->setCheckState( atlasMap->singleFile() ? Qt::Checked : Qt::Unchecked ); mAtlasFilenamePatternEdit->setEnabled( !atlasMap->singleFile() ); mAtlasFilenameExpressionButton->setEnabled( !atlasMap->singleFile() ); mAtlasSortFeatureCheckBox->setCheckState( atlasMap->sortFeatures() ? Qt::Checked : Qt::Unchecked ); mAtlasSortFeatureDirectionButton->setEnabled( atlasMap->sortFeatures() ); mAtlasSortFeatureKeyComboBox->setEnabled( atlasMap->sortFeatures() ); mAtlasSortFeatureDirectionButton->setArrowType( atlasMap->sortAscending() ? Qt::UpArrow : Qt::DownArrow ); mAtlasFeatureFilterEdit->setText( atlasMap->featureFilter() ); mAtlasFeatureFilterCheckBox->setCheckState( atlasMap->filterFeatures() ? Qt::Checked : Qt::Unchecked ); mAtlasFeatureFilterEdit->setEnabled( atlasMap->filterFeatures() ); mAtlasFeatureFilterButton->setEnabled( atlasMap->filterFeatures() ); mAtlasFileFormat->setCurrentIndex( mAtlasFileFormat->findText( atlasMap->fileFormat() ) ); blockAllSignals( false ); }