[QGIS Commit] r14837 - in trunk/qgis/src: core/symbology-ng gui/symbology-ng

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sat Dec 4 10:46:28 EST 2010


Author: wonder
Date: 2010-12-04 07:46:28 -0800 (Sat, 04 Dec 2010)
New Revision: 14837

Modified:
   trunk/qgis/src/core/symbology-ng/qgsmarkersymbollayerv2.cpp
   trunk/qgis/src/gui/symbology-ng/qgssymbollayerv2widget.cpp
Log:
Added arrowheads (filled and unfilled) to simple markers


Modified: trunk/qgis/src/core/symbology-ng/qgsmarkersymbollayerv2.cpp
===================================================================
--- trunk/qgis/src/core/symbology-ng/qgsmarkersymbollayerv2.cpp	2010-12-04 15:21:32 UTC (rev 14836)
+++ trunk/qgis/src/core/symbology-ng/qgsmarkersymbollayerv2.cpp	2010-12-04 15:46:28 UTC (rev 14837)
@@ -281,6 +281,11 @@
     << QPointF( -0.5,  -0.5 );
     return true;
   }
+  else if ( mName == "filled_arrowhead" )
+  {
+    mPolygon << QPointF( 0, 0 ) << QPointF( -1, 1 ) << QPointF( -1, -1 );
+    return true;
+  }
 
   return false;
 }
@@ -316,6 +321,14 @@
     mPath.lineTo( 0, 1 ); // vertical line
     return true;
   }
+  else if ( mName == "arrowhead" )
+  {
+    mPath.moveTo( 0, 0 );
+    mPath.lineTo( -1, -1 );
+    mPath.moveTo( 0, 0 );
+    mPath.lineTo( -1, 1 );
+    return true;
+  }
 
   return false;
 }

Modified: trunk/qgis/src/gui/symbology-ng/qgssymbollayerv2widget.cpp
===================================================================
--- trunk/qgis/src/gui/symbology-ng/qgssymbollayerv2widget.cpp	2010-12-04 15:21:32 UTC (rev 14836)
+++ trunk/qgis/src/gui/symbology-ng/qgssymbollayerv2widget.cpp	2010-12-04 15:46:28 UTC (rev 14837)
@@ -155,7 +155,7 @@
   QSize size = lstNames->iconSize();
   QStringList names;
   names << "circle" << "rectangle" << "diamond" << "pentagon" << "cross" << "cross2" << "triangle"
-  << "equilateral_triangle" << "star" << "regular_star" << "arrow" << "line";
+  << "equilateral_triangle" << "star" << "regular_star" << "arrow" << "line" << "arrowhead" << "filled_arrowhead";
   double markerSize = DEFAULT_POINT_SIZE * 2;
   for ( int i = 0; i < names.count(); ++i )
   {



More information about the QGIS-commit mailing list