[QGIS Commit] r13523 - trunk/qgis/src/plugins/georeferencer

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue May 18 06:26:14 EDT 2010


Author: mhugent
Date: 2010-05-18 06:26:11 -0400 (Tue, 18 May 2010)
New Revision: 13523

Modified:
   trunk/qgis/src/plugins/georeferencer/qgsgeorefplugingui.cpp
   trunk/qgis/src/plugins/georeferencer/qgstransformsettingsdialog.cpp
Log:
Add transformation name in georef pdf report

Modified: trunk/qgis/src/plugins/georeferencer/qgsgeorefplugingui.cpp
===================================================================
--- trunk/qgis/src/plugins/georeferencer/qgsgeorefplugingui.cpp	2010-05-18 06:45:58 UTC (rev 13522)
+++ trunk/qgis/src/plugins/georeferencer/qgsgeorefplugingui.cpp	2010-05-18 10:26:11 UTC (rev 13523)
@@ -1237,9 +1237,18 @@
 
   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 ) );
@@ -1366,8 +1375,8 @@
     {
       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 );
   }
 

Modified: trunk/qgis/src/plugins/georeferencer/qgstransformsettingsdialog.cpp
===================================================================
--- trunk/qgis/src/plugins/georeferencer/qgstransformsettingsdialog.cpp	2010-05-18 06:45:58 UTC (rev 13522)
+++ trunk/qgis/src/plugins/georeferencer/qgstransformsettingsdialog.cpp	2010-05-18 10:26:11 UTC (rev 13523)
@@ -58,6 +58,7 @@
   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() );
@@ -112,6 +113,7 @@
   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 )



More information about the QGIS-commit mailing list