[QGIS Commit] r9576 - in trunk/qgis: python/gui src/gui src/plugins/georeferencer

svn_qgis at osgeo.org svn_qgis at osgeo.org
Fri Nov 7 13:41:36 EST 2008


Author: timlinux
Date: 2008-11-07 13:41:36 -0500 (Fri, 07 Nov 2008)
New Revision: 9576

Modified:
   trunk/qgis/python/gui/qgsmapcanvasmap.sip
   trunk/qgis/python/gui/qgsmapoverviewcanvas.sip
   trunk/qgis/python/gui/qgsmaptoolemitpoint.sip
   trunk/qgis/src/gui/qgsmapcanvas.cpp
   trunk/qgis/src/gui/qgsmapcanvas.h
   trunk/qgis/src/gui/qgsmapcanvasmap.h
   trunk/qgis/src/gui/qgsmapoverviewcanvas.cpp
   trunk/qgis/src/gui/qgsmapoverviewcanvas.h
   trunk/qgis/src/gui/qgsmaptoolemitpoint.cpp
   trunk/qgis/src/gui/qgsmaptoolemitpoint.h
   trunk/qgis/src/plugins/georeferencer/mapcoordsdialog.cpp
Log:
Final cleanups for gui API

Modified: trunk/qgis/python/gui/qgsmapcanvasmap.sip
===================================================================
--- trunk/qgis/python/gui/qgsmapcanvasmap.sip	2008-11-07 17:24:36 UTC (rev 9575)
+++ trunk/qgis/python/gui/qgsmapcanvasmap.sip	2008-11-07 18:41:36 UTC (rev 9576)
@@ -38,7 +38,7 @@
     //! renders map using QgsMapRender to mPixmap
     void render();
     
-    void setBgColor(const QColor& color);
+    void setBackgroundColor(const QColor& color);
     
     void setPanningOffset(const QPoint& point);
     

Modified: trunk/qgis/python/gui/qgsmapoverviewcanvas.sip
===================================================================
--- trunk/qgis/python/gui/qgsmapoverviewcanvas.sip	2008-11-07 17:24:36 UTC (rev 9575)
+++ trunk/qgis/python/gui/qgsmapoverviewcanvas.sip	2008-11-07 18:41:36 UTC (rev 9576)
@@ -11,7 +11,7 @@
     ~QgsMapOverviewCanvas();
   
     //! used for overview canvas to reflect changed extent in main map canvas
-    void reflectChangedExtent();
+    void drawExtentRect();
 
     //! renders overview and updates panning widget
     void refresh();

Modified: trunk/qgis/python/gui/qgsmaptoolemitpoint.sip
===================================================================
--- trunk/qgis/python/gui/qgsmaptoolemitpoint.sip	2008-11-07 17:24:36 UTC (rev 9575)
+++ trunk/qgis/python/gui/qgsmaptoolemitpoint.sip	2008-11-07 18:41:36 UTC (rev 9576)
@@ -21,5 +21,5 @@
   signals:
     
     //! signal emitted on canvas click
-    void gotPoint(QgsPoint& point, Qt::MouseButton button);
+    void canvasClicked(QgsPoint& point, Qt::MouseButton button);
 };

Modified: trunk/qgis/src/gui/qgsmapcanvas.cpp
===================================================================
--- trunk/qgis/src/gui/qgsmapcanvas.cpp	2008-11-07 17:24:36 UTC (rev 9575)
+++ trunk/qgis/src/gui/qgsmapcanvas.cpp	2008-11-07 18:41:36 UTC (rev 9576)
@@ -463,7 +463,7 @@
   emit extentsChanged();
   updateScale();
   if ( mMapOverview )
-    mMapOverview->reflectChangedExtent();
+    mMapOverview->drawExtentRect();
   mLastExtent = current;
 
   // notify canvas items of change
@@ -1000,7 +1000,7 @@
 void QgsMapCanvas::setCanvasColor( const QColor & theColor )
 {
   // background of map's pixmap
-  mMap->setBgColor( theColor );
+  mMap->setBackgroundColor( theColor );
 
   // background of the QGraphicsView
   QBrush bgBrush( theColor );

Modified: trunk/qgis/src/gui/qgsmapcanvas.h
===================================================================
--- trunk/qgis/src/gui/qgsmapcanvas.h	2008-11-07 17:24:36 UTC (rev 9575)
+++ trunk/qgis/src/gui/qgsmapcanvas.h	2008-11-07 18:41:36 UTC (rev 9576)
@@ -226,6 +226,7 @@
     // currently used by pan map tool
     //! Ends pan action and redraws the canvas.
     void panActionEnd( QPoint releasePoint );
+
     //! Called when mouse is moving and pan is activated
     void panAction( QMouseEvent * event );
 

Modified: trunk/qgis/src/gui/qgsmapcanvasmap.h
===================================================================
--- trunk/qgis/src/gui/qgsmapcanvasmap.h	2008-11-07 17:24:36 UTC (rev 9575)
+++ trunk/qgis/src/gui/qgsmapcanvasmap.h	2008-11-07 18:41:36 UTC (rev 9576)
@@ -44,7 +44,7 @@
     //! renders map using QgsMapRenderer to mPixmap
     void render();
 
-    void setBgColor( const QColor& color ) { mBgColor = color; }
+    void setBackgroundColor( const QColor& color ) { mBgColor = color; }
 
     void setPanningOffset( const QPoint& point );
 

Modified: trunk/qgis/src/gui/qgsmapoverviewcanvas.cpp
===================================================================
--- trunk/qgis/src/gui/qgsmapoverviewcanvas.cpp	2008-11-07 17:24:36 UTC (rev 9575)
+++ trunk/qgis/src/gui/qgsmapoverviewcanvas.cpp	2008-11-07 18:41:36 UTC (rev 9576)
@@ -90,7 +90,7 @@
 }
 
 
-void QgsMapOverviewCanvas::reflectChangedExtent()
+void QgsMapOverviewCanvas::drawExtentRect()
 {
   const QgsRect& extent = mMapCanvas->extent();
 
@@ -247,7 +247,7 @@
   update();
 
   // update panning widget
-  reflectChangedExtent();
+  drawExtentRect();
 }
 
 
@@ -269,7 +269,7 @@
 void QgsMapOverviewCanvas::updateFullExtent( const QgsRect& rect )
 {
   mMapRenderer->setExtent( rect );
-  reflectChangedExtent();
+  drawExtentRect();
 }
 
 void QgsMapOverviewCanvas::hasCrsTransformEnabled( bool flag )

Modified: trunk/qgis/src/gui/qgsmapoverviewcanvas.h
===================================================================
--- trunk/qgis/src/gui/qgsmapoverviewcanvas.h	2008-11-07 17:24:36 UTC (rev 9575)
+++ trunk/qgis/src/gui/qgsmapoverviewcanvas.h	2008-11-07 18:41:36 UTC (rev 9576)
@@ -45,7 +45,7 @@
     ~QgsMapOverviewCanvas();
 
     //! used for overview canvas to reflect changed extent in main map canvas
-    void reflectChangedExtent();
+    void drawExtentRect();
 
     //! renders overview and updates panning widget
     void refresh();

Modified: trunk/qgis/src/gui/qgsmaptoolemitpoint.cpp
===================================================================
--- trunk/qgis/src/gui/qgsmaptoolemitpoint.cpp	2008-11-07 17:24:36 UTC (rev 9575)
+++ trunk/qgis/src/gui/qgsmaptoolemitpoint.cpp	2008-11-07 18:41:36 UTC (rev 9576)
@@ -32,7 +32,7 @@
 void QgsMapToolEmitPoint::canvasPressEvent( QMouseEvent * e )
 {
   QgsPoint pnt = toMapCoordinates( e->pos() );
-  emit gotPoint( pnt, e->button() );
+  emit canvasClicked( pnt, e->button() );
 }
 
 void QgsMapToolEmitPoint::canvasReleaseEvent( QMouseEvent * e )

Modified: trunk/qgis/src/gui/qgsmaptoolemitpoint.h
===================================================================
--- trunk/qgis/src/gui/qgsmaptoolemitpoint.h	2008-11-07 17:24:36 UTC (rev 9575)
+++ trunk/qgis/src/gui/qgsmaptoolemitpoint.h	2008-11-07 18:41:36 UTC (rev 9576)
@@ -23,8 +23,8 @@
 
 
 /** \ingroup gui
- * A map tool that simple emits a point when clicking on the map.
- * Connecting a slot to its gotPoint() signal will
+ * A map tool that simply emits a point when clicking on the map.
+ * Connecting a slot to its canvasClicked() signal will
  * let you implement custom behaviour for the passed in point.
  */
 class GUI_EXPORT QgsMapToolEmitPoint : public QgsMapTool
@@ -47,7 +47,7 @@
   signals:
 
     //! signal emitted on canvas click
-    void gotPoint( QgsPoint& point, Qt::MouseButton button );
+    void canvasClicked( QgsPoint& point, Qt::MouseButton button );
 };
 
 #endif

Modified: trunk/qgis/src/plugins/georeferencer/mapcoordsdialog.cpp
===================================================================
--- trunk/qgis/src/plugins/georeferencer/mapcoordsdialog.cpp	2008-11-07 17:24:36 UTC (rev 9575)
+++ trunk/qgis/src/plugins/georeferencer/mapcoordsdialog.cpp	2008-11-07 18:41:36 UTC (rev 9576)
@@ -37,7 +37,7 @@
 
   mToolEmitPoint = new QgsMapToolEmitPoint( qgisCanvas );
   mToolEmitPoint->setButton( btnPointFromCanvas );
-  connect(( QgsMapToolEmitPoint* )mToolEmitPoint, SIGNAL( gotPoint( QgsPoint&, Qt::MouseButton ) ),
+  connect(( QgsMapToolEmitPoint* )mToolEmitPoint, SIGNAL( canvasClicked( QgsPoint&, Qt::MouseButton ) ),
           this, SLOT( maybeSetXY( QgsPoint&, Qt::MouseButton ) ) );
 
   connect( leXCoord, SIGNAL( textChanged( const QString& ) ), this, SLOT( updateOK() ) );



More information about the QGIS-commit mailing list