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

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Sep 5 10:11:56 EDT 2010


Author: mhugent
Date: 2010-09-05 14:11:56 +0000 (Sun, 05 Sep 2010)
New Revision: 14192

Modified:
   trunk/qgis/src/plugins/georeferencer/qgsgeorefconfigdialog.cpp
   trunk/qgis/src/plugins/georeferencer/qgsgeorefconfigdialogbase.ui
   trunk/qgis/src/plugins/georeferencer/qgsgeorefplugingui.cpp
   trunk/qgis/src/plugins/georeferencer/qgsgeorefplugingui.h
   trunk/qgis/src/plugins/georeferencer/qgsresidualplotitem.cpp
   trunk/qgis/src/plugins/georeferencer/qgstransformsettingsdialog.cpp
   trunk/qgis/src/plugins/georeferencer/qgstransformsettingsdialog.h
   trunk/qgis/src/plugins/georeferencer/qgstransformsettingsdialogbase.ui
Log:
Apply patch #2948 from Stefan Ziegler (PDF map for georeferencer)

Modified: trunk/qgis/src/plugins/georeferencer/qgsgeorefconfigdialog.cpp
===================================================================
--- trunk/qgis/src/plugins/georeferencer/qgsgeorefconfigdialog.cpp	2010-09-04 13:08:17 UTC (rev 14191)
+++ trunk/qgis/src/plugins/georeferencer/qgsgeorefconfigdialog.cpp	2010-09-05 14:11:56 UTC (rev 14192)
@@ -15,6 +15,7 @@
 /* $Id$ */
 #include <QCloseEvent>
 #include <QSettings>
+#include <QSizeF>
 
 #include "qgsgeorefconfigdialog.h"
 
@@ -24,6 +25,35 @@
   setupUi( this );
 
   readSettings();
+
+  mPaperSizeComboBox->addItem( tr( "A5 (148x210 mm)" ), QSizeF( 148, 210 ) );
+  mPaperSizeComboBox->addItem( tr( "A4 (210x297 mm)" ), QSizeF( 210, 297 ) );
+  mPaperSizeComboBox->addItem( tr( "A3 (297x420 mm)" ), QSizeF( 297, 420 ) );
+  mPaperSizeComboBox->addItem( tr( "A2 (420x594 mm)" ), QSizeF( 420, 594 ) );
+  mPaperSizeComboBox->addItem( tr( "A1 (594x841 mm)" ), QSizeF( 594, 841 ) );
+  mPaperSizeComboBox->addItem( tr( "A0 (841x1189 mm)" ), QSizeF( 841, 1189 ) );
+  mPaperSizeComboBox->addItem( tr( "B5 (176 x 250 mm)" ), QSizeF( 176, 250 ) );
+  mPaperSizeComboBox->addItem( tr( "B4 (250 x 353 mm)" ), QSizeF( 250, 353 ) );
+  mPaperSizeComboBox->addItem( tr( "B3 (353 x 500 mm)" ), QSizeF( 353, 500 ) );
+  mPaperSizeComboBox->addItem( tr( "B2 (500 x 707 mm)" ), QSizeF( 500, 707 ) );
+  mPaperSizeComboBox->addItem( tr( "B1 (707 x 1000 mm)" ), QSizeF( 707, 1000 ) );
+  mPaperSizeComboBox->addItem( tr( "B0 (1000 x 1414 mm)" ), QSizeF( 1000, 1414 ) );
+  // North american formats
+  mPaperSizeComboBox->addItem( tr( "Legal (8.5x14 inches)" ), QSizeF( 215.9, 355.6 ) );
+  mPaperSizeComboBox->addItem( tr( "ANSI A (Letter; 8.5x11 inches)" ), QSizeF( 215.9, 279.4 ) );
+  mPaperSizeComboBox->addItem( tr( "ANSI B (Tabloid; 11x17 inches)" ), QSizeF( 279.4, 431.8 ) );
+  mPaperSizeComboBox->addItem( tr( "ANSI C (17x22 inches)" ), QSizeF( 431.8, 558.8 ) );
+  mPaperSizeComboBox->addItem( tr( "ANSI D (22x34 inches)" ), QSizeF( 558.8, 863.6 ) );
+  mPaperSizeComboBox->addItem( tr( "ANSI E (34x44 inches)" ), QSizeF( 863.6, 1117.6 ) );
+  mPaperSizeComboBox->addItem( tr( "Arch A (9x12 inches)" ), QSizeF( 228.6, 304.8 ) );
+  mPaperSizeComboBox->addItem( tr( "Arch B (12x18 inches)" ), QSizeF( 304.8, 457.2 ) );
+  mPaperSizeComboBox->addItem( tr( "Arch C (18x24 inches)" ), QSizeF( 457.2, 609.6 ) );
+  mPaperSizeComboBox->addItem( tr( "Arch D (24x36 inches)" ), QSizeF( 609.6, 914.4 ) );
+  mPaperSizeComboBox->addItem( tr( "Arch E (36x48 inches)" ), QSizeF( 914.4, 1219.2 ) );
+  mPaperSizeComboBox->addItem( tr( "Arch E1 (30x42 inches)" ) , QSizeF( 762, 1066.8 ) );
+
+  mPaperSizeComboBox->setCurrentIndex( 2 ); //A3
+
 }
 
 void QgsGeorefConfigDialog::changeEvent( QEvent *e )
@@ -109,4 +139,9 @@
   }
   s.setValue( "/Plugin-GeoReferencer/Config/LeftMarginPDF", mLeftMarginSpinBox->value() );
   s.setValue( "/Plugin-GeoReferencer/Config/RightMarginPDF", mRightMarginSpinBox->value() );
+
+  s.setValue( "/Plugin-GeoReferencer/Config/WidthPDFMap", mPaperSizeComboBox->itemData( mPaperSizeComboBox->currentIndex() ).toSizeF().width() );
+  s.setValue( "/Plugin-GeoReferencer/Config/HeightPDFMap", mPaperSizeComboBox->itemData( mPaperSizeComboBox->currentIndex() ).toSizeF().height() );
+
 }
+

Modified: trunk/qgis/src/plugins/georeferencer/qgsgeorefconfigdialogbase.ui
===================================================================
--- trunk/qgis/src/plugins/georeferencer/qgsgeorefconfigdialogbase.ui	2010-09-04 13:08:17 UTC (rev 14191)
+++ trunk/qgis/src/plugins/georeferencer/qgsgeorefconfigdialogbase.ui	2010-09-05 14:11:56 UTC (rev 14192)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>249</width>
-    <height>344</height>
+    <width>309</width>
+    <height>468</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -108,14 +108,14 @@
      </layout>
     </widget>
    </item>
-   <item row="3" column="0">
+   <item row="4" column="0">
     <widget class="QCheckBox" name="mShowDockedCheckBox">
      <property name="text">
       <string>Show Georeferencer window docked</string>
      </property>
     </widget>
    </item>
-   <item row="4" column="0">
+   <item row="5" column="0">
     <widget class="QDialogButtonBox" name="buttonBox">
      <property name="orientation">
       <enum>Qt::Horizontal</enum>
@@ -125,6 +125,29 @@
      </property>
     </widget>
    </item>
+   <item row="3" column="0">
+    <widget class="QGroupBox" name="groupBox">
+     <property name="title">
+      <string>PDF map</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_5">
+      <item row="0" column="0">
+       <layout class="QHBoxLayout" name="horizontalLayout_3">
+        <item>
+         <widget class="QLabel" name="label_3">
+          <property name="text">
+           <string>Paper size</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QComboBox" name="mPaperSizeComboBox"/>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+   </item>
   </layout>
  </widget>
  <resources/>

Modified: trunk/qgis/src/plugins/georeferencer/qgsgeorefplugingui.cpp
===================================================================
--- trunk/qgis/src/plugins/georeferencer/qgsgeorefplugingui.cpp	2010-09-04 13:08:17 UTC (rev 14191)
+++ trunk/qgis/src/plugins/georeferencer/qgsgeorefplugingui.cpp	2010-09-05 14:11:56 UTC (rev 14192)
@@ -28,6 +28,9 @@
 #include <QPushButton>
 #include <QSettings>
 #include <QTextStream>
+#include <QPen>
+#include <QStringList>
+#include <QList>
 
 #include "qgisinterface.h"
 #include "qgslegendinterface.h"
@@ -62,7 +65,6 @@
 
 #include "qgsgeorefplugingui.h"
 
-
 QgsGeorefDockWidget::QgsGeorefDockWidget( const QString & title, QWidget * parent, Qt::WindowFlags flags )
     : QDockWidget( title, parent, flags )
 {
@@ -310,7 +312,7 @@
   }
 
   d.getTransformSettings( mTransformParam, mResamplingMethod, mCompressionMethod,
-                          mModifiedRasterFileName, mProjection, mPdfOutputFile, mUseZeroForTrans, mLoadInQgis, mUserResX, mUserResY );
+                          mModifiedRasterFileName, mProjection, mPdfOutputMapFile, mPdfOutputFile, mUseZeroForTrans, mLoadInQgis, mUserResX, mUserResY );
   mTransformParamLabel->setText( tr( "Transform: " ) + convertTransformEnumToString( mTransformParam ) );
   mGeorefTransform.selectTransformParametrisation( mTransformParam );
   mGCPListWidget->setGeorefTransform( &mGeorefTransform );
@@ -1219,6 +1221,12 @@
     {
       writePDFReportFile( mPdfOutputFile, mGeorefTransform );
     }
+    if ( success && !mPdfOutputMapFile.isEmpty() )
+    {
+      writePDFMapFile( mPdfOutputMapFile, mGeorefTransform );
+    }
+
+
   }
   else // Helmert, Polinom 1, Polinom 2, Polinom 3
   {
@@ -1243,6 +1251,10 @@
       {
         writePDFReportFile( mPdfOutputFile, mGeorefTransform );
       }
+      if ( !mPdfOutputMapFile.isEmpty() )
+      {
+        writePDFMapFile( mPdfOutputMapFile, mGeorefTransform );
+      }
       return true;
     }
   }
@@ -1328,6 +1340,112 @@
   return true;
 }
 
+bool QgsGeorefPluginGui::writePDFMapFile( const QString& fileName, const QgsGeorefTransform& transform )
+{
+  if ( !mCanvas )
+  {
+    return false;
+  }
+
+  QgsMapRenderer* canvasRenderer = mCanvas->mapRenderer();
+  if ( !canvasRenderer )
+  {
+    return false;
+  }
+
+  QgsRasterLayer *rlayer = ( QgsRasterLayer* ) mCanvas->layer( 0 );
+  if ( !rlayer )
+  {
+    return false;
+  }
+  double mapRatio =  rlayer->extent().width() / rlayer->extent().height();
+
+  QPrinter printer;
+  printer.setOutputFormat( QPrinter::PdfFormat );
+  printer.setOutputFileName( fileName );
+
+  QSettings s;
+  double paperWidth = s.value( "/Plugin-GeoReferencer/Config/WidthPDFMap" ).toDouble();
+  double paperHeight = s.value( "/Plugin-GeoReferencer/Config/HeightPDFMap" ).toDouble();
+
+  //create composition
+  QgsComposition* composition = new QgsComposition( mCanvas->mapRenderer() );
+  if ( mapRatio >= 1 )
+  {
+    composition->setPaperSize( paperHeight, paperWidth );
+  }
+  else
+  {
+    composition->setPaperSize( paperWidth, paperHeight );
+  }
+  composition->setPrintResolution( 300 );
+  printer.setPaperSize( QSizeF( composition->paperWidth(), composition->paperHeight() ), QPrinter::Millimeter );
+
+  double leftMargin = 8;
+  double topMargin = 8;
+  double contentWidth = composition->paperWidth() - 2 * leftMargin;
+  double contentHeight = composition->paperHeight() - 2 * topMargin;
+  double contentRatio = contentWidth / contentHeight;
+
+  //composer map
+  QgsComposerMap* composerMap = new QgsComposerMap( composition, leftMargin, topMargin, contentWidth, contentHeight );
+  composerMap->setKeepLayerSet( true );
+  QStringList list;
+  list.append( canvasRenderer->layerSet()[0] );
+  composerMap->setLayerSet( list );
+
+  double xcenter = rlayer->extent().center().x();
+  double ycenter = rlayer->extent().center().y();
+
+  QgsRectangle rect;
+  if ( mapRatio > contentRatio )
+  {
+    rect = QgsRectangle( 0, ycenter - ( rlayer->extent().width() / contentRatio ) / 2, rlayer->extent().width(), ycenter + ( rlayer->extent().width() / contentRatio ) / 2 );
+  }
+  if ( mapRatio <= contentRatio )
+  {
+    rect = QgsRectangle( xcenter - ( rlayer->extent().height() * contentRatio / 2 ), -1 * rlayer->extent().height(), xcenter + ( rlayer->extent().height() * contentRatio / 2 ), 0 );
+  }
+
+  composerMap->setNewExtent( rect );
+  composition->addItem( composerMap );
+  printer.setFullPage( true );
+  printer.setColorMode( QPrinter::Color );
+
+  QString residualUnits;
+  if ( s.value( "/Plugin-GeoReferencer/Config/ResidualUnits" ) == "mapUnits" && mGeorefTransform.providesAccurateInverseTransformation() )
+  {
+    residualUnits = tr( "map units" );
+  }
+  else
+  {
+    residualUnits = tr( "pixels" );
+  }
+
+  //residual plot
+  QgsResidualPlotItem* resPlotItem = new QgsResidualPlotItem( composition );
+  composition->addItem( resPlotItem );
+  resPlotItem->setSceneRect( QRectF( leftMargin, topMargin, contentWidth, contentHeight ) );
+  resPlotItem->setExtent( rect );
+  resPlotItem->setGCPList( mPoints );
+  resPlotItem->setConvertScaleToMapUnits( residualUnits == tr( "map units" ) );
+
+  printer.setResolution( composition->printResolution() );
+  QPainter p( &printer );
+  composition->setPlotStyle( QgsComposition::Print );
+  QRectF paperRectMM = printer.pageRect( QPrinter::Millimeter );
+  QRectF paperRectPixel = printer.pageRect( QPrinter::DevicePixel );
+  composition->render( &p, paperRectPixel, paperRectMM );
+
+  delete resPlotItem;
+  delete composerMap;
+  delete composition;
+
+  return true;
+}
+
+
+
 bool QgsGeorefPluginGui::writePDFReportFile( const QString& fileName, const QgsGeorefTransform& transform )
 {
   if ( !mCanvas )
@@ -1475,7 +1593,7 @@
   gcpTable->setHeaderFont( tableHeaderFont );
   gcpTable->setContentFont( tableContentFont );
   QStringList gcpHeader;
-  gcpHeader << "id" << "enabled" << "pixelX" << "pixelY" << "mapX" << "mapY" << "resX[" + residualUnits + "]" << "resY[" + residualUnits + "]" << "resTot[" + residualUnits + "]";
+  gcpHeader << "id" << "enabled" << "pixelX" << "pixelY" << "mapX" << "mapY" << "resX [" + residualUnits + "]" << "resY [" + residualUnits + "]" << "resTot [" + residualUnits + "]";
   gcpTable->setHeaderLabels( gcpHeader );
 
   QgsGCPList::const_iterator gcpIt = mPoints.constBegin();
@@ -1494,8 +1612,8 @@
     {
       currentGCPStrings << tr( "no" );
     }
-    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( residual.x() ) <<  QString::number( residual.y() ) << QString::number( residualTot );
+    currentGCPStrings << QString::number(( *gcpIt )->pixelCoords().x(), 'f', 0 ) << QString::number(( *gcpIt )->pixelCoords().y(), 'f', 0 ) << QString::number(( *gcpIt )->mapCoords().x(), 'f', 3 )\
+    <<  QString::number(( *gcpIt )->mapCoords().y(), 'f', 3 ) <<  QString::number( residual.x() ) <<  QString::number( residual.y() ) << QString::number( residualTot );
     gcpTable->addRow( currentGCPStrings );
   }
 

Modified: trunk/qgis/src/plugins/georeferencer/qgsgeorefplugingui.h
===================================================================
--- trunk/qgis/src/plugins/georeferencer/qgsgeorefplugingui.h	2010-09-04 13:08:17 UTC (rev 14191)
+++ trunk/qgis/src/plugins/georeferencer/qgsgeorefplugingui.h	2010-09-05 14:11:56 UTC (rev 14192)
@@ -103,7 +103,7 @@
     void updateMouseCoordinatePrecision();
 
     // when one Layer is removed
-    void layerWillBeRemoved ( QString theLayerId );
+    void layerWillBeRemoved( QString theLayerId );
     void extentsChanged(); // Use for need add again Raster (case above)
 
     bool updateGeorefTransform();
@@ -127,7 +127,7 @@
     void setupConnections();
 
     // Mapcanvas Plugin
-    void addRaster(QString file);
+    void addRaster( QString file );
 
     // settings
     void readSettings();
@@ -142,6 +142,7 @@
     bool georeference();
     bool writeWorldFile( QgsPoint origin, double pixelXSize, double pixelYSize, double rotation );
     bool writePDFReportFile( const QString& fileName, const QgsGeorefTransform& transform );
+    bool writePDFMapFile( const QString& fileName, const QgsGeorefTransform& transform );
     void updateTransformParamLabel();
 
     // gdal script
@@ -201,6 +202,7 @@
     QString mGCPpointsFileName;
     QString mProjection;
     QString mPdfOutputFile;
+    QString mPdfOutputMapFile;
     double  mUserResX, mUserResY;  // User specified target scale
 
     QgsGeorefTransform::TransformParametrisation mTransformParam;

Modified: trunk/qgis/src/plugins/georeferencer/qgsresidualplotitem.cpp
===================================================================
--- trunk/qgis/src/plugins/georeferencer/qgsresidualplotitem.cpp	2010-09-04 13:08:17 UTC (rev 14191)
+++ trunk/qgis/src/plugins/georeferencer/qgsresidualplotitem.cpp	2010-09-05 14:11:56 UTC (rev 14192)
@@ -44,12 +44,10 @@
   double widthMM = rect().width();
   double heightMM = rect().height();
 
-  QPen enabledPen( QColor( 0, 0, 255, 255 ) );
-  enabledPen.setWidthF( 0.4 );
-  QPen disabledPen( QColor( 0, 0, 255, 127 ) );
-  disabledPen.setWidthF( 0.3 );
-  QBrush enabledBrush( QColor( 255, 0, 0, 255 ) );
-  QBrush disabledBrush( QColor( 255, 0, 0, 127 ) );
+  QPen enabledPen( QColor( 255, 0, 0, 255 ), 0.3, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin );
+  QPen disabledPen( QColor( 255, 0, 0, 85 ), 0.2, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin );
+  QBrush enabledBrush( QColor( 255, 255, 255, 255 ) );
+  QBrush disabledBrush( QColor( 255, 255, 255, 127 ) );
 
   //draw all points and collect minimal mm/pixel ratio
   double minMMPixelRatio = DBL_MAX;
@@ -74,7 +72,7 @@
       painter->setPen( disabledPen );
       painter->setBrush( disabledBrush );
     }
-    painter->drawRect( QRectF( gcpItemMMX - 1, gcpItemMMY - 1, 2, 2 ) );
+    painter->drawRect( QRectF( gcpItemMMX - 0.5, gcpItemMMY - 0.5, 1, 1 ) );
     drawText( painter, gcpItemMMX + 2, gcpItemMMY + 2, QString::number(( *gcpIt )->id() ), QFont() );
 
     mmPixelRatio = maxMMToPixelRatioForGCP( *gcpIt, gcpItemMMX, gcpItemMMY );

Modified: trunk/qgis/src/plugins/georeferencer/qgstransformsettingsdialog.cpp
===================================================================
--- trunk/qgis/src/plugins/georeferencer/qgstransformsettingsdialog.cpp	2010-09-04 13:08:17 UTC (rev 14191)
+++ trunk/qgis/src/plugins/georeferencer/qgstransformsettingsdialog.cpp	2010-09-05 14:11:56 UTC (rev 14192)
@@ -48,16 +48,16 @@
   leTargetSRS->setValidator( mRegExpValidator );
 
   // Populate CompressionComboBox
-  mListCompression.append("NONE");
-  mListCompression.append("LZW");
-  mListCompression.append("PACKBITS");
-  mListCompression.append("DEFLATE");
+  mListCompression.append( "NONE" );
+  mListCompression.append( "LZW" );
+  mListCompression.append( "PACKBITS" );
+  mListCompression.append( "DEFLATE" );
   QStringList listCompressionTr;
-  foreach ( QString item, mListCompression)
+  foreach( QString item, mListCompression )
   {
-    listCompressionTr.append(tr(item.toAscii().data()));
+    listCompressionTr.append( tr( item.toAscii().data() ) );
   }
-  cmbCompressionComboBox->addItems(listCompressionTr);
+  cmbCompressionComboBox->addItems( listCompressionTr );
 
 
   QSettings s;
@@ -86,12 +86,13 @@
   tbnOutputRaster->setIcon( getThemeIcon( "/mPushButtonFileOpen.png" ) );
   tbnTargetSRS->setIcon( getThemeIcon( "/mPushButtonTargetSRSDisabled.png" ) );
   tbnReportFile->setIcon( getThemeIcon( "/mActionSaveAsPDF.png" ) );
+  tbnMapFile->setIcon( getThemeIcon( "/mActionSaveAsPDF.png" ) );
 }
 
 void QgsTransformSettingsDialog::getTransformSettings( QgsGeorefTransform::TransformParametrisation &tp,
     QgsImageWarper::ResamplingMethod &rm,
     QString &comprMethod, QString &raster,
-    QString &proj, QString& pdfReportFile, bool &zt, bool &loadInQgis,
+    QString &proj, QString& pdfMapFile, QString& pdfReportFile, bool &zt, bool &loadInQgis,
     double& resX, double& resY )
 {
   if ( cmbTransformType->currentIndex() == -1 )
@@ -110,6 +111,7 @@
     raster = leOutputRaster->text();
   }
   proj = leTargetSRS->text();
+  pdfMapFile = mMapFileLineEdit->text();
   pdfReportFile = mReportFileLineEdit->text();
   zt = cbxZeroAsTrans->isChecked();
   loadInQgis = cbxLoadInQgisWhenDone->isChecked();
@@ -244,6 +246,21 @@
   }
 }
 
+void QgsTransformSettingsDialog::on_tbnMapFile_clicked()
+{
+  QSettings s;
+  QString myLastUsedDir = s.value( "/Plugin-GeoReferencer/lastPDFReportDir", "" ).toString();
+  QString outputFileName = QFileDialog::getSaveFileName( 0, tr( "Select save PDF file" ), myLastUsedDir, tr( "PDF Format" ) + " (*.pdf *PDF)" );
+  if ( !outputFileName.isNull() )
+  {
+    if ( !outputFileName.endsWith( ".pdf", Qt::CaseInsensitive ) )
+    {
+      outputFileName.append( ".pdf" );
+    }
+    mMapFileLineEdit->setText( outputFileName );
+  }
+}
+
 void QgsTransformSettingsDialog::on_tbnReportFile_clicked()
 {
   QSettings s;

Modified: trunk/qgis/src/plugins/georeferencer/qgstransformsettingsdialog.h
===================================================================
--- trunk/qgis/src/plugins/georeferencer/qgstransformsettingsdialog.h	2010-09-04 13:08:17 UTC (rev 14191)
+++ trunk/qgis/src/plugins/georeferencer/qgstransformsettingsdialog.h	2010-09-05 14:11:56 UTC (rev 14192)
@@ -12,7 +12,7 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-/* $Id: qgstransformsettingsdialog.h 13764 2010-06-21 12:11:11Z mhugent $ */
+/* $Id$ */
 
 #ifndef QGSTRANSFORMSETTINGSDIALOG_H
 #define QGSTRANSFORMSETTINGSDIALOG_H
@@ -32,7 +32,7 @@
                                 int countGCPpoints, QWidget *parent = 0 );
     void getTransformSettings( QgsGeorefTransform::TransformParametrisation &tp,
                                QgsImageWarper::ResamplingMethod &rm, QString &comprMethod,
-                               QString &raster, QString &proj, QString& pdfReportFile, bool &zt, bool &loadInQgis,
+                               QString &raster, QString &proj, QString& pdfMapFile, QString& pdfReportFile, bool &zt, bool &loadInQgis,
                                double& resX, double& resY );
     static void resetSettings();
 
@@ -43,6 +43,7 @@
   private slots:
     void on_tbnOutputRaster_clicked();
     void on_tbnTargetSRS_clicked();
+    void on_tbnMapFile_clicked();
     void on_tbnReportFile_clicked();
     void on_leTargetSRS_textChanged( const QString &text );
     void on_cmbTransformType_currentIndexChanged( const QString& text );

Modified: trunk/qgis/src/plugins/georeferencer/qgstransformsettingsdialogbase.ui
===================================================================
--- trunk/qgis/src/plugins/georeferencer/qgstransformsettingsdialogbase.ui	2010-09-04 13:08:17 UTC (rev 14191)
+++ trunk/qgis/src/plugins/georeferencer/qgstransformsettingsdialogbase.ui	2010-09-05 14:11:56 UTC (rev 14192)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>356</width>
-    <height>429</height>
+    <width>438</width>
+    <height>478</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -137,14 +137,14 @@
        </item>
       </layout>
      </item>
-     <item row="6" column="0">
+     <item row="7" column="0">
       <widget class="QLabel" name="label_6">
        <property name="text">
         <string>Generate pdf report:</string>
        </property>
       </widget>
      </item>
-     <item row="6" column="1">
+     <item row="7" column="1">
       <layout class="QHBoxLayout" name="horizontalLayout_3">
        <item>
         <widget class="QLineEdit" name="mReportFileLineEdit"/>
@@ -158,21 +158,21 @@
        </item>
       </layout>
      </item>
-     <item row="7" column="0" colspan="2">
+     <item row="8" column="0" colspan="2">
       <widget class="QCheckBox" name="cbxUserResolution">
        <property name="text">
         <string>Set Target Resolution</string>
        </property>
       </widget>
      </item>
-     <item row="8" column="0">
+     <item row="9" column="0">
       <widget class="QLabel" name="label_4">
        <property name="text">
         <string>Horizontal</string>
        </property>
       </widget>
      </item>
-     <item row="8" column="1">
+     <item row="9" column="1">
       <widget class="QgsValidatedDoubleSpinBox" name="dsbHorizRes">
        <property name="decimals">
         <number>5</number>
@@ -185,14 +185,14 @@
        </property>
       </widget>
      </item>
-     <item row="9" column="0">
+     <item row="10" column="0">
       <widget class="QLabel" name="label_5">
        <property name="text">
         <string>Vertical</string>
        </property>
       </widget>
      </item>
-     <item row="9" column="1">
+     <item row="10" column="1">
       <widget class="QgsValidatedDoubleSpinBox" name="dsbVerticalRes">
        <property name="sizePolicy">
         <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
@@ -221,6 +221,27 @@
        </property>
       </widget>
      </item>
+     <item row="6" column="0">
+      <widget class="QLabel" name="label_7">
+       <property name="text">
+        <string>Generate pdf map:</string>
+       </property>
+      </widget>
+     </item>
+     <item row="6" column="1">
+      <layout class="QHBoxLayout" name="horizontalLayout_4">
+       <item>
+        <widget class="QLineEdit" name="mMapFileLineEdit"/>
+       </item>
+       <item>
+        <widget class="QToolButton" name="tbnMapFile">
+         <property name="text">
+          <string>...</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
     </layout>
    </item>
    <item row="1" column="0">



More information about the QGIS-commit mailing list