[QGIS Commit] r9000 - trunk/qgis/src/plugins/coordinate_capture

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue Aug 5 20:53:39 EDT 2008


Author: timlinux
Date: 2008-08-05 20:53:38 -0400 (Tue, 05 Aug 2008)
New Revision: 9000

Modified:
   trunk/qgis/src/plugins/coordinate_capture/coordinate_capture.svg
   trunk/qgis/src/plugins/coordinate_capture/coordinatecapturemaptool.cpp
Log:
use a better cursor

Modified: trunk/qgis/src/plugins/coordinate_capture/coordinate_capture.svg
===================================================================
--- trunk/qgis/src/plugins/coordinate_capture/coordinate_capture.svg	2008-08-06 00:25:38 UTC (rev 8999)
+++ trunk/qgis/src/plugins/coordinate_capture/coordinate_capture.svg	2008-08-06 00:53:38 UTC (rev 9000)
@@ -15,7 +15,10 @@
    inkscape:version="0.46"
    version="1.0"
    sodipodi:docname="coordinate_capture.svg"
-   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   inkscape:export-filename="/home/timlinux/dev/cpp/qgis/src/plugins/coordinate_capture/coordinatecapture.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
   <defs
      id="defs4">
     <marker

Modified: trunk/qgis/src/plugins/coordinate_capture/coordinatecapturemaptool.cpp
===================================================================
--- trunk/qgis/src/plugins/coordinate_capture/coordinatecapturemaptool.cpp	2008-08-06 00:25:38 UTC (rev 8999)
+++ trunk/qgis/src/plugins/coordinate_capture/coordinatecapturemaptool.cpp	2008-08-06 00:53:38 UTC (rev 9000)
@@ -31,10 +31,12 @@
   : QgsMapTool(thepCanvas)
 {
   // set cursor
-  QPixmap myIdentifyCursor = QPixmap((const char **) identify_cursor);
+  QPixmap myIdentifyCursor = QPixmap((const char **) capture_point_cursor);
   mCursor = QCursor(myIdentifyCursor, 1, 1);
   mpMapCanvas = thepCanvas;
   mpRubberBand = new QgsRubberBand(mpMapCanvas,false); //false - not a polygon
+  mpRubberBand->setColor(Qt::red);
+  mpRubberBand->setWidth(3);
 }
 
 CoordinateCaptureMapTool::~CoordinateCaptureMapTool()
@@ -58,13 +60,15 @@
     return;
   }
 
-  mpRubberBand->reset(false);
-
-  // convert screen coordinates to map coordinates
   QgsPoint myPoint = 
     mCanvas->getCoordinateTransform()->toMapCoordinates(thepEvent->x(), thepEvent->y());
-  mpRubberBand->addPoint(myPoint,true); //true - update canvas
   emit pointCaptured(myPoint);
+  mpRubberBand->reset(false);
+  // convert screen coordinates to map coordinates
+  mpRubberBand->addPoint(myPoint,false); //true - update canvas
+  mpRubberBand->addPoint(myPoint,false); //true - update canvas
+  mpRubberBand->addPoint(myPoint,false); //true - update canvas
+  mpRubberBand->show();
 }
 
 



More information about the QGIS-commit mailing list