Skip to content
Permalink
Browse files
add advanced selection tools from Jeremy Palmer. Thanks. (apply #2938)
git-svn-id: http://svn.osgeo.org/qgis/trunk@14071 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Aug 12, 2010
1 parent 2843a93 commit 29fa6f29ea95bc74d1b12358ab9d4e0c5501c68f
@@ -194,6 +194,10 @@
<file>themes/default/mActionSaveMapAsImage.png</file>
<file>themes/default/mActionScaleBar.png</file>
<file>themes/default/mActionSelect.png</file>
<file>themes/default/mActionSelectRectangle.png</file>
<file>themes/default/mActionSelectFreehand.png</file>
<file>themes/default/mActionSelectPolygon.png</file>
<file>themes/default/mActionSelectRadius.png</file>
<file>themes/default/mActionSelectedToTop.png</file>
<file>themes/default/mActionSelectPan.png</file>
<file>themes/default/mActionShowAllLayers.png</file>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,220 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->

<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="128"
height="128"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.47 r22583"
sodipodi:docname="selectTools.svg"
inkscape:export-filename="C:\Dev\SPI\QGIS\qgis_linz\images\themes\default\mActionDeselectAll.png"
inkscape:export-xdpi="22.5"
inkscape:export-ydpi="22.5"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.0"
style="display:inline">
<defs
id="defs4">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 64 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="128 : 64 : 1"
inkscape:persp3d-origin="64 : 42.666667 : 1"
id="perspective3673" />
<inkscape:perspective
id="perspective3683"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3632"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective2849"
inkscape:persp3d-origin="200 : 133.33333 : 1"
inkscape:vp_z="400 : 200 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 200 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective2862"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.0689466"
inkscape:cx="87.337091"
inkscape:cy="28.491338"
inkscape:document-units="px"
inkscape:current-layer="layer3"
inkscape:window-width="1920"
inkscape:window-height="1181"
inkscape:window-x="1916"
inkscape:window-y="-4"
showgrid="false"
showguides="false"
inkscape:guide-bbox="true"
inkscape:window-maximized="1"
inkscape:snap-bbox="false">
<sodipodi:guide
orientation="0,1"
position="72.98243,80.487715"
id="guide3475" />
<sodipodi:guide
orientation="1,0"
position="8.7993001,105.5916"
id="guide3477" />
<sodipodi:guide
orientation="1,0"
position="119.04935,94.721877"
id="guide3479" />
<sodipodi:guide
orientation="0,1"
position="62.889115,99.121527"
id="guide3481" />
<sodipodi:guide
orientation="0,1"
position="16.045782,34.161988"
id="guide3483" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer18"
inkscape:label="geometry"
style="display:inline">
<path
sodipodi:nodetypes="cccccccccccccc"
id="path3651"
d="m 19.779996,17.509313 c -3.532055,4.322031 -7.342958,7.665491 -10.5961677,12.966093 -2.2307708,7.828585 3.0673117,23.241111 2.5096197,27.889335 1.022437,9.867278 -7.9935995,28.786358 -4.461544,35.473271 5.298083,6.442268 19.519255,13.373828 32.625039,14.189308 14.592967,-0.0815 26.676315,-0.89702 37.086584,-3.91428 12.362197,-6.279184 26.397473,-10.356568 37.086593,-18.837539 5.76282,-8.480967 0.92948,-16.961934 1.39422,-25.442901 1.20834,-9.622635 8.27245,-19.245272 3.62501,-28.867907 C 112.26408,22.483725 104.92113,16.204548 96.183935,12.127161 87.632642,9.7622757 80.75443,5.9295309 70.530057,5.0325056 59.469147,5.6848874 53.148627,6.5819127 49.61657,11.148587 c -5.018489,4.879529 -13.661982,2.909048 -20.632396,4.608214 -3.068059,0.584171 -1.953421,-0.788805 -9.204178,1.752512 z"
style="fill:#f9f5aa;fill-opacity:1;fill-rule:evenodd;stroke:#f7ff0e;stroke-width:9.08285809;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0" />
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="polygon"
style="display:none">
<path
style="fill:none;stroke:#000000;stroke-width:4.5527215;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:9.10544312, 4.55272156;stroke-dashoffset:0.91054431;marker-start:none"
d="m 17.47589,31.218672 0,56.625225 82.65304,0 0,-34.88518 L 58.279291,7.9618805 17.47589,31.218672 z"
id="path3739"
sodipodi:nodetypes="cccccc" />
</g>
<g
style="display:none"
inkscape:label="rectangle"
id="g3353"
inkscape:groupmode="layer">
<rect
ry="4.2915325"
rx="3.7192686"
y="18.580549"
x="20.102806"
height="66.669243"
width="70.849724"
id="rect3357"
style="fill:none;stroke:#000000;stroke-width:4.85300016;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:14.559, 4.853;stroke-dashoffset:0" />
</g>
<g
inkscape:groupmode="layer"
id="layer4"
inkscape:label="freehand"
style="display:none">
<path
style="fill:none;stroke:#000000;stroke-width:4.85300016;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:14.55900049, 4.85300016;stroke-dashoffset:0"
d="m 65.631777,19.622757 c 3.372249,2.334854 6.798968,4.534261 9.6239,7.493861 3.548394,1.422469 6.188971,4.211435 9.151571,6.404982 2.26531,2.776805 4.907746,5.034247 6.784489,7.925865 3.159939,2.920266 2.011006,6.867562 -0.715179,9.631059 -2.126962,2.305245 -4.955287,3.74761 -8.125686,4.296975 -3.456502,0.706393 -6.916555,1.400855 -10.371803,2.108626 -2.053947,3.955867 -6.051049,7.653779 -5.629434,12.251329 0.467619,3.008031 1.223448,6.242605 0.136154,9.094395 0.407152,1.920461 -1.049349,5.429071 -3.496388,7.483144 -1.754341,0.327918 -7.289292,1.888569 -4.324372,1.828724 -3.127392,1.409414 -6.690985,1.603867 -10.026642,2.438953 -2.480112,0.479602 -4.947038,1.045241 -7.425489,1.509628 -3.607438,-0.677375 -7.892266,-0.579686 -9.408378,-4.843976 -2.134562,-2.261195 -3.150972,-5.044904 -4.003804,-7.910423 -1.013951,-3.096434 -0.04344,-6.390682 1.873569,-8.917917 2.811686,-2.178519 4.140031,-4.626929 5.476315,-8.14662 0.913521,-3.585631 -0.937579,-7.955511 -5.086237,-8.416383 -3.61114,-1.462893 -7.894018,-2.302632 -11.360052,-4.460891 -3.650399,-0.479435 -4.921101,-5.047635 -6.712353,-8.065664 -0.433468,-3.055139 -1.705333,-6.09 -1.535071,-9.142397 -0.4963948,-4.45055 2.458202,-6.675362 4.551653,-9.909291 3.013664,-3.080159 6.001773,-6.96011 10.451694,-7.848464 2.041769,-3.03077 5.891971,-3.511097 9.383844,-4.07197 2.365637,-0.298342 4.728099,-1.3569002 7.079018,-1.11044 3.713249,0.1535691 7.338273,2.214335 11.000028,3.581469 3.286492,2.625264 7.499402,2.579901 10.852758,5.636778 0.619669,0.384552 1.238165,0.770994 1.855895,1.158648 z"
id="path2835" />
</g>
<g
inkscape:groupmode="layer"
id="layer1"
inkscape:label="circle"
style="display:none">
<path
sodipodi:type="arc"
style="fill:none;stroke:#000000;stroke-width:4.3162117;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:12.9486357, 4.3162119;stroke-dashoffset:0;display:inline"
id="path3711"
sodipodi:cx="12.41272"
sodipodi:cy="10.343482"
sodipodi:rx="37.168804"
sodipodi:ry="37.168804"
d="m 49.581524,10.343482 a 37.168804,37.168804 0 1 1 -74.337608,0 37.168804,37.168804 0 1 1 74.337608,0 z"
transform="matrix(0.98001475,0,0,0.98001475,41.225852,38.703496)" />
</g>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="deselect"
style="display:inline">
<path
style="fill:#ff0000;fill-opacity:1;stroke:#000000;stroke-width:1.49048018;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="M 29.698339,52.423481 C 16.051712,52.698413 3.7408429,65.048573 4.6081639,78.953941 4.8817259,94.332694 20.485443,106.38102 35.480351,103.75189 49.274567,102.24135 60.320488,88.247365 57.669083,74.382603 55.631983,61.225586 42.881728,51.610763 29.698339,52.423481 z m 1.440284,7.723266 c 4.459556,-0.06984 8.968478,1.410814 12.419846,4.237359 -9.818417,7.003216 -19.85089,14.970704 -29.536271,21.374658 -4.7651221,-9.524832 1.348854,-21.773355 11.292666,-24.651827 1.880027,-0.607635 3.849567,-0.917354 5.823759,-0.96019 z m 17.408658,10.645582 c 5.037209,10.044615 -2.047165,22.890788 -12.83732,24.985806 -5.71851,1.360445 -11.98502,0.0904 -16.552835,-3.611148 9.772879,-7.044573 19.727298,-14.730417 29.390155,-21.374658 z"
id="path2834" />
</g>
<g
inkscape:groupmode="layer"
id="layer5"
inkscape:label="single"
style="display:none">
<path
id="path1875"
style="fill:none;stroke:#414141;stroke-width:5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
d="m 54.856583,17.189923 4.11214,11.11022 10.36977,-5.8817 -3.99191,11.15397 11.72465,2.15947 -10.2281,5.97866 7.59343,9.1902 -11.67845,-1.99414 -0.0908,11.920741 -7.66432,-9.033851 -7.7326,9.073431 -0.064,-11.846531 -11.7562,1.98056 7.5663,-9.11608 -10.27893,-6.03903 11.65623,-2.12013 -3.99205,-11.23289 10.29207,5.86787 4.16277,-11.17077 z" />
</g>
<g
style="display:inline"
inkscape:label="cursor"
id="g3343"
inkscape:groupmode="layer">
<path
inkscape:export-filename="/Users/tim/dev/cpp/qgis/images/themes/default/mActionSelect.png"
inkscape:export-ydpi="21.652922"
inkscape:export-xdpi="21.652922"
sodipodi:nodetypes="cccccccc"
id="path3349"
d="M 65.601843,106.16511 53.904423,35.587576 118.53385,75.098555 94.614817,82.168858 120.52875,117.31634 108.41356,126.20813 83.079984,89.636153 65.601843,106.16511 z"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:3.87363958;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
<path
inkscape:export-ydpi="21.652922"
inkscape:export-xdpi="21.652922"
sodipodi:nodetypes="cccccccc"
id="path3351"
d="M 65.469806,103.68103 54.660978,36.602094 114.38086,74.154478 92.278819,80.874298 116.22422,114.27949 105.02935,122.73052 81.620226,87.971433 65.469806,103.68103 z"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#414141;stroke-width:3.63013959;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
</g>
</svg>
@@ -193,6 +193,10 @@ class QgisInterface : QObject
virtual QAction *actionZoomIn() = 0;
virtual QAction *actionZoomOut() = 0;
virtual QAction *actionSelect() = 0;
virtual QAction *actionSelectRectangle() = 0;
virtual QAction *actionSelectPolygon() = 0;
virtual QAction *actionSelectFreehand() = 0;
virtual QAction *actionSelectRadius() = 0;
virtual QAction *actionIdentify() = 0;
virtual QAction *actionMeasure() = 0;
virtual QAction *actionMeasureArea() = 0;
@@ -57,6 +57,10 @@ class QgsRubberBand: QgsMapCanvasItem

/**Return vertex*/
const QgsPoint *getPoint(int i, int j=0) const;

/**Returns the rubberband as a Geometry.
* added in 1.6 */
QgsGeometry* asGeometry();

protected:
virtual void paint(QPainter* p);
@@ -49,6 +49,11 @@ SET(QGIS_APP_SRCS
qgsmaptoolreshape.cpp
qgsmaptoolrotatepointsymbols.cpp
qgsmaptoolselect.cpp
qgsmaptoolselectrectangle.cpp
qgsmaptoolselectfreehand.cpp
qgsmaptoolselectpolygon.cpp
qgsmaptoolselectradius.cpp
qgsmaptoolselectutils.cpp
qgsmaptoolsimplify.cpp
qgsmaptoolsplitfeatures.cpp
qgsmaptooltextannotation.cpp
@@ -163,6 +168,10 @@ SET (QGIS_APP_MOC_HDRS
qgsmaptoolreshape.h
qgsmaptoolrotatepointsymbols.h
qgsmaptoolselect.h
qgsmaptoolselectrectangle.h
qgsmaptoolselectfreehand.h
qgsmaptoolselectpolygon.h
qgsmaptoolselectradius.h
qgsmaptooladdvertex.h
qgsmaptooldeletering.h
qgsmaptooldeletepart.h

0 comments on commit 29fa6f2

Please sign in to comment.