Skip to content

Commit

Permalink
Add transformation name in georef pdf report
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13523 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed May 18, 2010
1 parent d9fc70d commit 9a21aac
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/plugins/georeferencer/qgsgeorefplugingui.cpp
Expand Up @@ -1237,9 +1237,18 @@ bool QgsGeorefPluginGui::writePDFReportFile( const QString& fileName, const QgsG

if ( wldTransform )
{
QString parameterTitle = tr( "Transformation parameters" );
if ( transform.transformParametrisation() == QgsGeorefTransform::Helmert )
{
parameterTitle += " (Helmert)";
}
else if ( transform.transformParametrisation() == QgsGeorefTransform::Linear )
{
parameterTitle += " (Linear)";
}
parameterLabel = new QgsComposerLabel( composition );
parameterLabel->setFont( titleFont );
parameterLabel->setText( tr( "Transformation parameters" ) );
parameterLabel->setText( parameterTitle );
parameterLabel->adjustSizeToText();
composition->addItem( parameterLabel );
parameterLabel->setSceneRect( QRectF( 2, composerMap->rect().bottom() + composerMap->transform().dy() + 5, composition->paperWidth(), 8 ) );
Expand Down Expand Up @@ -1366,8 +1375,8 @@ bool QgsGeorefPluginGui::writePDFReportFile( const QString& fileName, const QgsG
{
currentGCPStrings << tr( "no" );
}
currentGCPStrings << QString::number(( *gcpIt )->pixelCoords().x() ) << QString::number(( *gcpIt )->pixelCoords().y() ) << QString::number(( *gcpIt )->mapCoords().x() )\
<< QString::number(( *gcpIt )->mapCoords().y() ) << QString::number( residualX ) << QString::number( residualY ) << QString::number( residualTot );
currentGCPStrings << QString::number(( *gcpIt )->pixelCoords().x(), 'f', 2 ) << QString::number(( *gcpIt )->pixelCoords().y(), 'f', 2 ) << QString::number(( *gcpIt )->mapCoords().x(), 'f', 2 )\
<< QString::number(( *gcpIt )->mapCoords().y(), 'f', 2 ) << QString::number( residualX ) << QString::number( residualY ) << QString::number( residualTot );
gcpTable->addRow( currentGCPStrings );
}

Expand Down
2 changes: 2 additions & 0 deletions src/plugins/georeferencer/qgstransformsettingsdialog.cpp
Expand Up @@ -58,6 +58,7 @@ QgsTransformSettingsDialog::QgsTransformSettingsDialog( const QString &raster, c
if ( !ok ) dsbHorizRes->setValue( 1.0 );
dsbVerticalRes->setValue( s.value( "/Plugin-GeoReferencer/user_specified_resy", -1.0 ).toDouble( &ok ) );
if ( !ok ) dsbHorizRes->setValue( -1.0 );

// Activate spin boxes for vertical/horizontal resolution, if the option is checked
dsbHorizRes->setEnabled( cbxUserResolution->isChecked() );
dsbVerticalRes->setEnabled( cbxUserResolution->isChecked() );
Expand Down Expand Up @@ -112,6 +113,7 @@ void QgsTransformSettingsDialog::resetSettings()
s.setValue( "/Plugin-GeoReferencer/user_specified_resolution", false );
s.setValue( "/Plugin-GeoReferencer/user_specified_resx", 1.0 );
s.setValue( "/Plugin-GeoReferencer/user_specified_resy", -1.0 );
s.setValue( "/Plugin-GeoReferencer/lastPDFReportDir", "" );
}

void QgsTransformSettingsDialog::changeEvent( QEvent *e )
Expand Down

0 comments on commit 9a21aac

Please sign in to comment.