[QGIS Commit] r9003 - in trunk/qgis/src/app: . composer legend

svn_qgis at osgeo.org svn_qgis at osgeo.org
Wed Aug 6 08:44:24 EDT 2008


Author: timlinux
Date: 2008-08-06 08:44:24 -0400 (Wed, 06 Aug 2008)
New Revision: 9003

Modified:
   trunk/qgis/src/app/composer/qgscomposermap.cpp
   trunk/qgis/src/app/legend/qgslegend.cpp
   trunk/qgis/src/app/qgisapp.cpp
   trunk/qgis/src/app/qgsmeasuredialog.cpp
   trunk/qgis/src/app/qgsmeasuretool.cpp
   trunk/qgis/src/app/qgsprojectproperties.cpp
Log:
Use mapRenderer() instead of mapRender() for the QgsMapCanvas map renderer accessor.

Modified: trunk/qgis/src/app/composer/qgscomposermap.cpp
===================================================================
--- trunk/qgis/src/app/composer/qgscomposermap.cpp	2008-08-06 12:42:23 UTC (rev 9002)
+++ trunk/qgis/src/app/composer/qgscomposermap.cpp	2008-08-06 12:44:24 UTC (rev 9003)
@@ -138,7 +138,7 @@
       return;
     }
 
-  QgsMapRenderer* canvasMapRenderer = mMapCanvas->mapRender();
+  QgsMapRenderer* canvasMapRenderer = mMapCanvas->mapRenderer();
   if(!canvasMapRenderer)
     {
       return;

Modified: trunk/qgis/src/app/legend/qgslegend.cpp
===================================================================
--- trunk/qgis/src/app/legend/qgslegend.cpp	2008-08-06 12:42:23 UTC (rev 9002)
+++ trunk/qgis/src/app/legend/qgslegend.cpp	2008-08-06 12:44:24 UTC (rev 9003)
@@ -1754,7 +1754,7 @@
     if (!theLayer)
       continue;
       
-    QgsRect lyrExtent = mMapCanvas->mapRender()->layerExtentToOutputExtent(theLayer, theLayer->extent());
+    QgsRect lyrExtent = mMapCanvas->mapRenderer()->layerExtentToOutputExtent(theLayer, theLayer->extent());
     
     if (!lyrExtent.isFinite())
       lyrExtent = theLayer->extent();

Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp	2008-08-06 12:42:23 UTC (rev 9002)
+++ trunk/qgis/src/app/qgisapp.cpp	2008-08-06 12:44:24 UTC (rev 9003)
@@ -1297,9 +1297,9 @@
   //signal when mouse moved over window (coords display in status bar)
   connect(mMapCanvas, SIGNAL(xyCoordinates(QgsPoint &)), this, SLOT(showMouseCoordinate(QgsPoint &)));
   //signal when mouse in capturePoint mode and mouse clicked on canvas
-  connect(mMapCanvas->mapRender(), SIGNAL(drawingProgress(int,int)), this, SLOT(showProgress(int,int)));
-  connect(mMapCanvas->mapRender(), SIGNAL(projectionsEnabled(bool)), this, SLOT(projectionsEnabled(bool)));
-  connect(mMapCanvas->mapRender(), SIGNAL(destinationSrsChanged()), this, SLOT(destinationSrsChanged()));
+  connect(mMapCanvas->mapRenderer(), SIGNAL(drawingProgress(int,int)), this, SLOT(showProgress(int,int)));
+  connect(mMapCanvas->mapRenderer(), SIGNAL(projectionsEnabled(bool)), this, SLOT(projectionsEnabled(bool)));
+  connect(mMapCanvas->mapRenderer(), SIGNAL(destinationSrsChanged()), this, SLOT(destinationSrsChanged()));
   connect(mMapCanvas, SIGNAL(extentsChanged()),this,SLOT(showExtents()));
   connect(mMapCanvas, SIGNAL(scaleChanged(double)), this, SLOT(showScale(double)));
   connect(mMapCanvas, SIGNAL(scaleChanged(double)), this, SLOT(updateMouseCoordinatePrecision()));
@@ -2541,7 +2541,7 @@
   mMapCanvas->freeze(false);
   mMapCanvas->refresh();
   
-  mMapCanvas->mapRender()->setProjectionsEnabled(FALSE);
+  mMapCanvas->mapRenderer()->setProjectionsEnabled(FALSE);
   
   // set the initial map tool
   mMapCanvas->setMapTool(mMapTools.mPan);
@@ -3025,7 +3025,7 @@
   //set the projections enabled icon in the status bar
   int myProjectionEnabledFlag =
     QgsProject::instance()->readNumEntry("SpatialRefSys","/ProjectionsEnabled",0);
-  mMapCanvas->mapRender()->setProjectionsEnabled(myProjectionEnabledFlag);
+  mMapCanvas->mapRenderer()->setProjectionsEnabled(myProjectionEnabledFlag);
 
 } // QgisApp::openProject
 
@@ -3286,7 +3286,7 @@
 {
   if(mMapCanvas)
   {
-    QgsMapRenderer* mypMapRenderer = mMapCanvas->mapRender();
+    QgsMapRenderer* mypMapRenderer = mMapCanvas->mapRenderer();
     if(mypMapRenderer)
     {
       QgsRenderContext* mypRenderContext = mypMapRenderer->renderContext();
@@ -4419,7 +4419,7 @@
 void QgisApp::destinationSrsChanged()
 {
   // save this information to project
-  long srsid = mMapCanvas->mapRender()->destinationSrs().srsid();
+  long srsid = mMapCanvas->mapRenderer()->destinationSrs().srsid();
   QgsProject::instance()->writeEntry("SpatialRefSys", "/ProjectSRSID", (int)srsid);
 
 }
@@ -4582,7 +4582,7 @@
   //pass any refresg signals off to canvases
   //connect (pp,SIGNAL(refresh()), mMapCanvas, SLOT(refresh()));
 
-  QgsMapRenderer* myRender = mMapCanvas->mapRender();
+  QgsMapRenderer* myRender = mMapCanvas->mapRenderer();
   bool wasProjected = myRender->projectionsEnabled();
   long oldSRSID = myRender->destinationSrs().srsid();
 

Modified: trunk/qgis/src/app/qgsmeasuredialog.cpp
===================================================================
--- trunk/qgis/src/app/qgsmeasuredialog.cpp	2008-08-06 12:42:23 UTC (rev 9002)
+++ trunk/qgis/src/app/qgsmeasuredialog.cpp	2008-08-06 12:44:24 UTC (rev 9003)
@@ -88,7 +88,7 @@
   tmpPoints.append(point);
   if (mMeasureArea && tmpPoints.size() > 2)
   {
-    double area = mTool->canvas()->mapRender()->distArea()->measurePolygon(tmpPoints);
+    double area = mTool->canvas()->mapRenderer()->distArea()->measurePolygon(tmpPoints);
     editTotal->setText(formatArea(area));
   }
   else if (!mMeasureArea && tmpPoints.size() > 1)
@@ -96,7 +96,7 @@
     int last = tmpPoints.size()-2;
     QgsPoint p1 = tmpPoints[last], p2 = tmpPoints[last+1];
 
-    double d = mTool->canvas()->mapRender()->distArea()->measureLine(p1,p2);
+    double d = mTool->canvas()->mapRenderer()->distArea()->measureLine(p1,p2);
     QTreeWidgetItem *item = mTable->topLevelItem(mTable->topLevelItemCount()-1);
     item->setText(0, QLocale::system().toString(d, 'f', 2));
     editTotal->setText(formatDistance(mTotal + d));
@@ -108,7 +108,7 @@
     int numPoints = mTool->points().size();
     if (mMeasureArea && numPoints > 2)
     {
-      double area = mTool->canvas()->mapRender()->distArea()->measurePolygon(mTool->points());
+      double area = mTool->canvas()->mapRenderer()->distArea()->measurePolygon(mTool->points());
       editTotal->setText(formatArea(area));
     }
     else if (!mMeasureArea && numPoints > 1)
@@ -117,7 +117,7 @@
         
       QgsPoint p1 = mTool->points()[last], p2 = mTool->points()[last+1];
       
-      double d = mTool->canvas()->mapRender()->distArea()->measureLine(p1,p2);
+      double d = mTool->canvas()->mapRenderer()->distArea()->measureLine(p1,p2);
             
       mTotal += d;
       editTotal->setText(formatDistance(mTotal));

Modified: trunk/qgis/src/app/qgsmeasuretool.cpp
===================================================================
--- trunk/qgis/src/app/qgsmeasuretool.cpp	2008-08-06 12:42:23 UTC (rev 9002)
+++ trunk/qgis/src/app/qgsmeasuretool.cpp	2008-08-06 12:44:24 UTC (rev 9003)
@@ -67,7 +67,7 @@
   
   // If we suspect that they have data that is projected, yet the
   // map SRS is set to a geographic one, warn them.
-  if (mCanvas->mapRender()->distArea()->geographic() &&
+  if (mCanvas->mapRenderer()->distArea()->geographic() &&
       (mCanvas->extent().height() > 360 || 
        mCanvas->extent().width() > 720))
   {
@@ -122,7 +122,7 @@
   // mCalc->setEllipsoid(ellipsoid);
 
   // set source SRS and projections enabled flag
-  // QgsMapRenderer* mapRender = mCanvas->mapRender();
+  // QgsMapRenderer* mapRender = mCanvas->mapRenderer();
   // mCalc->setProjectionsEnabled(mapRender->projectionsEnabled());
   // int srsid = mapRender->destinationSrs().srsid();
   // mCalc->setSourceSRS(srsid);

Modified: trunk/qgis/src/app/qgsprojectproperties.cpp
===================================================================
--- trunk/qgis/src/app/qgsprojectproperties.cpp	2008-08-06 12:42:23 UTC (rev 9002)
+++ trunk/qgis/src/app/qgsprojectproperties.cpp	2008-08-06 12:44:24 UTC (rev 9003)
@@ -51,7 +51,7 @@
   // Properties stored in map canvas's QgsMapRenderer
   // these ones are propagated to QgsProject by a signal
   
-  QgsMapRenderer* myRender = mMapCanvas->mapRender();
+  QgsMapRenderer* myRender = mMapCanvas->mapRenderer();
   QGis::units myUnit = myRender->mapUnits();
   setMapUnits(myUnit);
 
@@ -174,7 +174,7 @@
 // return the map units
 QGis::units QgsProjectProperties::mapUnits() const
 {
-  return mMapCanvas->mapRender()->mapUnits();
+  return mMapCanvas->mapRenderer()->mapUnits();
 }
 
 
@@ -197,7 +197,7 @@
   {
     radDecimalDegrees->setChecked(true);
   }
-  mMapCanvas->mapRender()->setMapUnits(unit);
+  mMapCanvas->mapRenderer()->setMapUnits(unit);
 }
 
 
@@ -235,7 +235,7 @@
     mapUnit=QGis::DEGREES;
   }
 
-  QgsMapRenderer* myRender = mMapCanvas->mapRender();
+  QgsMapRenderer* myRender = mMapCanvas->mapRenderer();
       
   myRender->setMapUnits(mapUnit);
 



More information about the QGIS-commit mailing list