Commit cbdc5cd4 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #5041 from HorusAeronaves/windrose

Add wind rose in survey pattern editor
parents 5a77a96e 5a4ee779
......@@ -193,6 +193,10 @@
<file alias="takeoff.svg">resources/takeoff.svg</file>
<file alias="TrashDelete.svg">resources/TrashDelete.svg</file>
<file alias="waves.svg">resources/waves.svg</file>
<file alias="wind-guru.svg">resources/wind-guru.svg</file>
<file alias="wind-rose.svg">resources/wind-rose.svg</file>
<file alias="wind-roseBlack.svg">resources/wind-roseBlack.svg</file>
<file alias="wind-rose-arrow.svg">resources/wind-rose-arrow.svg</file>
<file alias="XDelete.svg">resources/XDelete.svg</file>
<file alias="XDeleteBlack.svg">resources/XDeleteBlack.svg</file>
<file>resources/icons/qgroundcontrol.ico</file>
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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"
id="svg8"
version="1.1"
viewBox="0 0 158.43947 67.648445"
height="67.648445mm"
width="158.43947mm">
<defs
id="defs2" />
<metadata
id="metadata5">
<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
transform="translate(0.09652586,0.15508566)"
id="layer1">
<path
id="path78"
d="m 114.84811,67.251388 c -2.71248,-0.83619 -4.7544,-3.60494 -4.7544,-6.446773 0,-1.769748 0.26045,-2.635012 1.20768,-4.012261 0.35692,-0.518945 4.92663,-4.448008 10.15491,-8.73125 l 9.50596,-7.787716 -62.755621,-0.132292 C 0.94854643,39.999314 4.8180651,40.082501 2.8051761,38.735071 1.2320842,37.682042 0.40019498,36.327625 0.00135558,34.170104 -0.50386682,31.437103 0.98609883,28.478453 3.5612081,27.101241 l 1.096051,-0.586187 63.4525079,-0.132292 63.452503,-0.132291 -10.0799,-7.246909 c -5.54395,-3.985799 -10.41707,-7.676737 -10.82916,-8.202083 -1.58663,-2.0226625 -1.87744,-4.9054775 -0.7312,-7.2483085 1.16241,-2.375873 3.23639,-3.66360901 5.96827,-3.70570501 1.47984,-0.0228 1.98655,0.09743 3.20605,0.76074404 1.35951,0.73946297 35.98582,25.51456047 37.19864,26.61559147 0.30835,0.279927 0.89141,1.116696 1.29568,1.859484 1.39722,2.567144 0.7956,6.166766 -1.36862,8.188783 -2.59621,2.425621 -35.60909,29.1965 -36.47102,29.57516 -1.54372,0.67819 -3.49279,0.83885 -4.9029,0.40416 z"
style="fill:#000000;stroke-width:0.26458332" />
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: IcoMoon.io -->
<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="352"
height="512"
viewBox="0 0 352 512"
version="1.1"
id="svg3740"
sodipodi:docname="wind-rose-arrow.svg"
style="fill:#000000"
inkscape:version="0.92.1 r">
<metadata
id="metadata3746">
<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>
<defs
id="defs3744" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1366"
inkscape:window-height="722"
id="namedview3742"
showgrid="false"
inkscape:pagecheckerboard="true"
inkscape:zoom="0.65186406"
inkscape:cx="-149.4937"
inkscape:cy="264.4641"
inkscape:window-x="1366"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg3740" />
<g
id="g3758">
<path
inkscape:connector-curvature="0"
id="path3738"
d="M 0,416 96,512 352,256 96,0 0,96 160,256 Z" />
</g>
</svg>
<?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"
inkscape:version="0.92.1 r"
sodipodi:docname="wind-roseBlack.svg"
viewBox="0 0 428.25278 428.25278"
height="428.25278"
width="428.25278"
id="svg2"
version="1.1">
<sodipodi:namedview
inkscape:pagecheckerboard="true"
inkscape:current-layer="svg2"
inkscape:window-maximized="1"
inkscape:window-y="0"
inkscape:window-x="0"
inkscape:cy="243.54455"
inkscape:cx="48.384571"
inkscape:zoom="1"
showgrid="false"
id="namedview4"
inkscape:window-height="742"
inkscape:window-width="1366"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10"
gridtolerance="10"
objecttolerance="10"
borderopacity="1"
bordercolor="#666666"
pagecolor="#ffffff" />
<metadata
id="metadata8">
<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>
<defs
id="defs6" />
<path
inkscape:connector-curvature="0"
id="path15"
d="m 213.59107,427.14472 c 0,-0.15449 -6.93819,-39.51323 -7.05005,-39.99332 -0.11658,-0.50027 -0.15889,-0.50769 -4.2808,-0.75026 -24.73554,-1.45561 -50.61982,-9.10981 -72.89219,-21.5548 -46.05167,-25.732 -78.09056,-70.84386 -86.97924,-122.46975 -1.05466,-6.12553 -1.8207,-12.67992 -2.22644,-19.04975 -0.0896,-1.40685 -0.18957,-2.58435 -0.22212,-2.61666 -0.0575,-0.0571 -39.54264,-7.04847 -39.80762,-7.04847 -0.0729,0 -0.13261,-0.2409 -0.13261,-0.53532 0,-0.29442 0.0597,-0.53532 0.13261,-0.53532 0.17977,0 39.74221,-6.98202 39.77211,-7.01902 0.013,-0.0161 0.11646,-1.5148 0.22984,-3.33042 1.14428,-18.32369 4.77559,-35.25316 11.11871,-51.83643 8.09487,-21.16296 20.20243,-40.52286 35.61905,-56.9546 24.96495,-26.60877 57.43828,-44.74014 92.7585,-51.79139 8.36935,-1.67083 16.98273,-2.77766 24.54376,-3.15388 2.02671,-0.10085 2.46417,-0.17137 2.53354,-0.40841 0.0857,-0.2929 6.88295,-38.79785 6.88295,-38.990634 0,-0.05846 0.2409,-0.106286 0.53532,-0.106286 0.29442,0 0.53532,0.04783 0.53532,0.106286 0,0.192155 6.79705,38.697224 6.88255,38.989414 0.0689,0.23559 0.51037,0.30632 2.53355,0.40593 7.67091,0.37767 17.08195,1.60659 25.46865,3.32577 30.34079,6.2195 58.82978,20.75741 81.99257,41.84072 2.50431,2.27949 8.79875,8.57539 11.24006,11.24266 21.17871,23.13901 35.9034,51.95263 42.10091,82.3841 1.71865,8.439 2.72276,16.07164 3.25254,24.7237 0.12168,1.98736 0.28078,3.61339 0.35354,3.61339 0.0728,0 8.78907,1.52442 19.36957,3.38762 10.58051,1.86318 19.49825,3.43262 19.8172,3.48764 0.49847,0.086 0.57993,0.17294 0.57993,0.61916 0,0.44622 -0.0815,0.53319 -0.57993,0.61916 -0.31895,0.055 -9.23669,1.62446 -19.8172,3.48764 -10.5805,1.8632 -19.30535,3.38762 -19.38855,3.38762 -0.0832,0 -0.20339,0.7829 -0.26709,1.73978 -0.28249,4.2432 -0.66875,8.43435 -1.08949,11.82156 -5.5253,44.48185 -28.00251,85.03047 -62.93864,113.54052 -21.89324,17.86626 -47.95109,30.16231 -75.69605,35.71908 -7.84058,1.57032 -17.03059,2.75556 -23.76583,3.06508 -1.3924,0.064 -2.62821,0.17603 -2.74625,0.24899 -0.12669,0.0783 -1.66518,8.34451 -3.75606,20.18097 -1.94778,11.02658 -3.54247,20.10856 -3.54372,20.18216 -0.002,0.0736 -0.24316,0.13383 -0.53758,0.13383 -0.29442,0 -0.53532,-0.0486 -0.53532,-0.10806 z m 0,-109.40854 V 215.00025 l -15.4482,15.4482 -15.4482,15.4482 15.4034,87.28773 c 8.47185,48.00826 15.42354,87.28773 15.4482,87.28773 0.0246,0 0.0448,-46.23117 0.0448,-102.73593 z m -18.81608,2.61776 c -3.29195,-18.68816 -6.04592,-34.19973 -6.11995,-34.47013 -0.12268,-0.44813 -0.54461,0.15194 -4.76765,6.78067 -2.54819,3.99977 -4.98144,7.81488 -5.40721,8.47801 -0.71553,1.11438 -0.80384,1.19024 -1.1662,1.00184 -0.21563,-0.11211 -0.41725,-0.22485 -0.44805,-0.25052 -0.0308,-0.0257 1.75582,-8.22688 3.97027,-18.22487 2.21444,-9.99799 4.02625,-18.45097 4.02625,-18.7844 0,-0.56039 -0.3451,-2.8894 -0.44551,-3.00667 -0.0243,-0.0283 -13.71327,9.5165 -30.42004,21.21073 l -30.37595,21.26222 -0.36187,-0.36188 -0.36187,-0.36187 21.27036,-30.3678 c 11.6987,-16.7023 21.2446,-30.38803 21.2131,-30.41274 -0.15787,-0.12393 -2.25936,-0.4562 -2.88519,-0.4562 -0.394,0 -8.89949,1.81272 -18.90107,4.02827 -10.00159,2.21557 -18.20662,4.00218 -18.23342,3.97026 -0.0268,-0.0319 -0.14044,-0.23443 -0.25255,-0.45006 -0.18839,-0.36235 -0.1125,-0.45073 1.00186,-1.16665 0.66312,-0.42602 4.4824,-2.85926 8.48727,-5.40721 6.69529,-4.25959 7.24126,-4.64365 6.78067,-4.76988 -0.7814,-0.21414 -69.34188,-12.27768 -69.46847,-12.22331 -0.32247,0.1385 1.22683,10.68566 2.33991,15.92936 4.75066,22.38037 14.86072,43.32996 29.48569,61.09884 5.90485,7.17422 13.65491,14.8304 20.90403,20.65082 21.07711,16.9231 46.51574,27.5334 73.24907,30.55176 2.55091,0.28802 2.76992,0.28966 2.81882,0.0211 0.0291,-0.16014 -2.64038,-15.58151 -5.9323,-34.26968 z m 37.01683,34.07884 c 40.82637,-4.8496 78.31671,-28.0151 101.33412,-62.61494 12.54266,-18.85419 20.09404,-39.17203 22.93991,-61.72247 0.2527,-2.00238 0.42656,-3.67359 0.38635,-3.71379 -0.0745,-0.0745 -68.67047,11.97047 -69.5702,12.21607 -0.45007,0.12284 0.18369,0.56624 7.20616,5.04175 4.2348,2.69889 8.04878,5.12717 8.4755,5.39616 0.73163,0.46123 0.76384,0.51551 0.56495,0.95201 -0.1685,0.36983 -0.3024,0.44404 -0.66604,0.36914 -0.25033,-0.0516 -8.43415,-1.8651 -18.18627,-4.03008 -9.75214,-2.16496 -18.01618,-3.9363 -18.36457,-3.9363 -0.59832,0 -2.91652,0.3441 -3.03952,0.45118 -0.0314,0.0274 9.51137,13.7184 21.20622,30.42454 21.13397,30.18993 21.26123,30.37692 20.91289,30.72527 -0.34835,0.34834 -0.53534,0.22108 -30.72527,-20.91289 -16.70614,-11.69485 -30.39718,-21.23766 -30.42454,-21.20622 -0.10487,0.12046 -0.45118,2.43515 -0.45118,3.01558 0,0.33523 1.81176,8.78826 4.02613,18.78454 2.21439,9.99626 4.001,18.19598 3.97026,18.2216 -0.0307,0.0256 -0.23229,0.13829 -0.44792,0.2504 -0.36233,0.1884 -0.45077,0.11249 -1.16695,-1.00184 -0.42618,-0.66313 -2.85943,-4.47785 -5.40721,-8.47714 -4.21977,-6.62387 -4.64429,-7.22773 -4.7669,-6.78067 -0.19653,0.71652 -12.08845,68.29047 -12.08845,68.69062 0,0.38832 -0.25886,0.39694 4.28253,-0.14252 z m 41.48699,-81.351 c -14.6228,-14.62305 -26.62716,-26.58725 -26.67635,-26.58711 -0.0492,1.4e-4 -0.64786,3.18461 -1.33037,7.07659 -1.2154,6.93084 -1.23374,7.08112 -0.89219,7.30945 0.1918,0.12821 12.71452,8.90085 27.82827,19.49473 15.11376,10.5939 27.5196,19.26884 27.56854,19.27766 0.049,0.009 -11.87511,-11.94827 -26.4979,-26.57132 z m -92.52088,-27.47932 c 0,-0.12127 -13.84211,-2.55435 -14.07055,-2.47334 -0.0996,0.0353 -8.94446,12.59058 -19.65533,27.90061 l -19.4743,27.83644 26.6003,-26.58713 c 14.63017,-14.62293 26.60011,-26.62739 26.59988,-26.67658 z m 67.01262,50.09642 c -0.13252,-0.31896 -1.7031,-4.11301 -3.49019,-8.43123 -1.78708,-4.31821 -3.30632,-7.95626 -3.37611,-8.08455 -0.0698,-0.1283 -0.31209,0.85359 -0.53844,2.18196 l -0.41157,2.41522 3.97908,6.24926 c 2.18848,3.43709 4.00136,6.24926 4.02863,6.24926 0.0273,0 -0.0589,-0.26096 -0.1914,-0.57992 z m -64.53476,-9.33746 c 2.07235,-5.01292 3.76792,-9.30487 3.76792,-9.53768 0,-0.57453 -1.47327,-8.9304 -1.55939,-8.84427 -0.0746,0.0746 -6.11124,27.21436 -6.11263,27.4815 0,0.09 0.03,0.1301 0.0677,0.0892 0.0377,-0.0409 1.76407,-4.17584 3.83644,-9.18877 z m 112.88177,-38.70458 c -3.93864,-1.73175 -17.93963,-7.40777 -18.27263,-7.40777 -0.57106,0 -8.95495,1.46992 -8.86976,1.55511 0.0938,0.0938 27.09486,6.09343 27.41144,6.09082 0.14721,-0.002 0.0261,-0.10838 -0.26905,-0.23816 z m -154.6157,-4.9966 c 3.48401,-1.44364 6.44023,-2.68326 6.56936,-2.7547 0.12914,-0.0714 -0.85007,-0.31668 -2.17602,-0.54496 l -2.41082,-0.41504 -6.12137,3.89328 c -3.36676,2.14132 -6.20153,3.96412 -6.2995,4.0507 -0.18975,0.16771 0.55652,-0.13465 10.43835,-4.22928 z m 192.11989,-13.38967 c 47.58165,-8.39355 86.83326,-15.33068 87.22583,-15.41583 0.40657,-0.0882 -43.51939,-0.16304 -102.06652,-0.17392 l -102.7803,-0.0191 15.43418,15.43494 c 8.48879,8.48922 15.4883,15.43494 15.55446,15.43494 0.0662,0 39.05071,-6.86746 86.63235,-15.26102 z M 196.80421,197.14275 181.35588,181.69442 95.27274,196.88241 c -47.34573,8.35339 -86.64523,15.29749 -87.33222,15.4313 -1.06114,0.20672 14.21505,0.24589 101.53147,0.26034 l 102.78054,0.017 -15.44832,-15.44832 z M 230.37037,94.27274 C 222.01698,46.92701 215.07288,7.627509 214.93907,6.94052 c -0.20672,-1.061138 -0.24589,14.21505 -0.26034,101.53147 l -0.017,102.78054 15.44832,-15.44832 15.44833,-15.44833 -15.18798,-86.08314 z m -123.89953,99.58572 c 18.92356,-3.33491 34.6319,-6.12525 34.9074,-6.20074 0.46059,-0.12623 -0.0854,-0.51029 -6.78067,-4.76988 -4.00487,-2.54795 -7.82415,-4.98119 -8.48727,-5.40721 -1.11436,-0.71592 -1.19025,-0.8043 -1.00186,-1.16665 0.11211,-0.21563 0.22576,-0.41816 0.25255,-0.45007 0.0268,-0.0319 8.23183,1.7547 18.23342,3.97027 10.00158,2.21555 18.50707,4.02827 18.90107,4.02827 0.62554,0 2.72723,-0.33225 2.88509,-0.45609 0.0314,-0.0247 -9.51136,-13.71349 -21.20622,-30.41963 -21.22557,-30.32079 -21.26274,-30.37542 -20.90838,-30.72978 0.35435,-0.35435 0.40898,-0.31718 30.73093,20.90723 16.70677,11.69422 30.39579,21.23905 30.42004,21.21073 0.10071,-0.11763 0.44551,-2.44712 0.44551,-3.00992 0,-0.33522 -1.81176,-8.78826 -4.02613,-18.78453 -2.21439,-9.99627 -4.001,-18.19599 -3.97026,-18.22161 0.0307,-0.0256 0.23229,-0.1383 0.44792,-0.25041 0.36236,-0.1884 0.45067,-0.11253 1.1662,1.00186 0.42577,0.66312 2.85902,4.47633 5.40721,8.47378 2.54818,3.99745 4.66692,7.1692 4.70832,7.04833 0.16589,-0.48431 12.45489,-70.35178 12.38732,-70.42631 -0.11891,-0.13111 -5.42966,0.48724 -9.07225,1.05632 -23.00143,3.59349 -44.88652,12.83735 -63.52417,26.83147 -31.00861,23.28287 -51.3473,58.22466 -56.10354,96.38566 -0.54263,4.35369 -0.6242,5.44238 -0.40778,5.44238 0.10399,0 15.67198,-2.72856 34.59555,-6.06347 z m 250.0488,5.48354 c -0.002,-1.11129 -0.71652,-6.67364 -1.3475,-10.48327 -6.3857,-38.55511 -28.4883,-72.85713 -61.19445,-94.97039 -8.64339,-5.84397 -18.41872,-10.96424 -28.10409,-14.72078 -8.96547,-3.47732 -18.35061,-6.05078 -28.11856,-7.71027 -2.76612,-0.46995 -8.97302,-1.26026 -9.89765,-1.26026 -0.64781,0 -0.70309,0.0361 -0.61513,0.40148 0.0532,0.22082 2.86363,16.09149 6.24553,35.26816 3.38189,19.17668 6.17207,34.88984 6.20037,34.91815 0.0283,0.0283 2.13437,-3.2156 4.68014,-7.20869 2.54577,-3.99308 4.97526,-7.79946 5.39887,-8.45861 0.73978,-1.15106 0.78829,-1.19024 1.22675,-0.99046 0.3638,0.16576 0.43739,0.30045 0.36227,0.66315 -0.0518,0.25033 -1.86536,8.4435 -4.03006,18.20704 -2.16469,9.76355 -3.9358,18.02761 -3.9358,18.36457 0,0.58279 0.34601,2.89795 0.45118,3.01875 0.0274,0.0314 13.7184,-9.51136 30.42454,-21.20622 30.18993,-21.13397 30.37692,-21.26124 30.72527,-20.91289 0.34834,0.34835 0.22108,0.53533 -20.91289,30.72527 -11.69485,16.70614 -21.23766,30.39718 -21.20622,30.42454 0.123,0.10708 2.4412,0.45118 3.03952,0.45118 0.34839,0 8.61243,-1.77134 18.36457,-3.9363 9.75212,-2.16498 17.93594,-3.97851 18.18627,-4.03007 0.36364,-0.0749 0.49754,-7.1e-4 0.66604,0.36914 0.19889,0.43649 0.16668,0.49077 -0.56495,0.95199 -8.33271,5.25294 -16.11731,10.31995 -15.94498,10.37861 0.30303,0.10313 69.19866,12.29083 69.58949,12.31044 0.23672,0.012 0.31207,-0.12465 0.31147,-0.56426 z m -65.58961,-15.94817 c 3.34462,-2.12243 6.16141,-3.93321 6.25956,-4.02398 0.0981,-0.0908 -0.90558,0.28521 -2.23049,0.83552 -1.3249,0.55028 -5.2575,2.1797 -8.73908,3.62089 -3.48157,1.4412 -6.21169,2.64245 -6.06692,2.66945 3.11504,0.58079 3.90181,0.71639 4.26392,0.73495 0.28063,0.0145 2.56163,-1.32937 6.51301,-3.83683 z m -135.95606,1.89613 c 2.20181,-0.39257 4.10627,-0.7192 4.23213,-0.72584 0.12586,-0.007 0.0683,-0.0838 -0.12804,-0.1714 -0.44488,-0.19862 -27.22611,-6.10712 -27.30842,-6.02482 -0.14124,0.14125 18.0849,7.59797 18.61533,7.61595 0.32214,0.0109 2.3872,-0.30133 4.589,-0.69389 z m 126.24689,-30.06691 19.47417,-27.83644 -26.6003,26.58714 c -14.63016,14.62292 -26.60019,26.62738 -26.60003,26.67657 0,0.13317 13.21483,2.47295 13.7727,2.43863 0.42553,-0.0262 2.66429,-3.1527 19.95346,-27.8659 z m -98.24451,17.48316 c 0.75318,-4.29499 1.1717,-7.11139 1.07064,-7.20448 -0.0913,-0.0841 -12.25071,-8.60513 -27.02097,-18.93572 -14.77026,-10.33058 -27.25651,-19.065 -27.74721,-19.40982 -0.49071,-0.34482 11.07202,11.34961 25.69494,25.98762 14.62292,14.638 26.62738,26.61444 26.67657,26.6143 0.0492,-1.4e-4 0.64591,-3.1735 1.32603,-7.0519 z m 62.92015,-28.12369 c 1.66341,-7.49492 3.00405,-13.68879 2.97923,-13.76414 -0.0806,-0.24468 -7.62666,18.16464 -7.62666,18.60599 0,0.56771 1.47206,8.93627 1.55698,8.85135 0.0363,-0.0363 1.42705,-6.19828 3.09045,-13.6932 z m -57.99822,0.25012 0.40445,-2.36067 -3.88896,-6.11517 c -2.13893,-3.36334 -3.95918,-6.19377 -4.04501,-6.28985 -0.0858,-0.0961 0.35705,1.06823 0.98416,2.58736 3.96332,9.60068 6.06613,14.62825 6.10094,14.5867 0.022,-0.0262 0.22198,-1.11 0.44442,-2.40837 z"
style="fill:#b7b7b7;stroke-width:0.17843866;fill-opacity:1;opacity:1" />
</svg>
<?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"
version="1.1"
id="svg2"
width="428.25278"
height="428.25278"
viewBox="0 0 428.25278 428.25278"
sodipodi:docname="wind-rose.svg"
inkscape:version="0.92.1 r">
<metadata
id="metadata8">
<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 />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs6" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1366"
inkscape:window-height="742"
id="namedview4"
showgrid="false"
inkscape:zoom="1"
inkscape:cx="339.2147"
inkscape:cy="199.48303"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
inkscape:pagecheckerboard="true" />
<path
style="fill:#000000;stroke-width:0.17843866"
d="m 213.59107,427.14472 c 0,-0.15449 -6.93819,-39.51323 -7.05005,-39.99332 -0.11658,-0.50027 -0.15889,-0.50769 -4.2808,-0.75026 -24.73554,-1.45561 -50.61982,-9.10981 -72.89219,-21.5548 -46.05167,-25.732 -78.09056,-70.84386 -86.97924,-122.46975 -1.05466,-6.12553 -1.8207,-12.67992 -2.22644,-19.04975 -0.0896,-1.40685 -0.18957,-2.58435 -0.22212,-2.61666 -0.0575,-0.0571 -39.54264,-7.04847 -39.80762,-7.04847 -0.0729,0 -0.13261,-0.2409 -0.13261,-0.53532 0,-0.29442 0.0597,-0.53532 0.13261,-0.53532 0.17977,0 39.74221,-6.98202 39.77211,-7.01902 0.013,-0.0161 0.11646,-1.5148 0.22984,-3.33042 1.14428,-18.32369 4.77559,-35.25316 11.11871,-51.83643 8.09487,-21.16296 20.20243,-40.52286 35.61905,-56.9546 24.96495,-26.60877 57.43828,-44.74014 92.7585,-51.79139 8.36935,-1.67083 16.98273,-2.77766 24.54376,-3.15388 2.02671,-0.10085 2.46417,-0.17137 2.53354,-0.40841 0.0857,-0.2929 6.88295,-38.79785 6.88295,-38.990634 0,-0.05846 0.2409,-0.106286 0.53532,-0.106286 0.29442,0 0.53532,0.04783 0.53532,0.106286 0,0.192155 6.79705,38.697224 6.88255,38.989414 0.0689,0.23559 0.51037,0.30632 2.53355,0.40593 7.67091,0.37767 17.08195,1.60659 25.46865,3.32577 30.34079,6.2195 58.82978,20.75741 81.99257,41.84072 2.50431,2.27949 8.79875,8.57539 11.24006,11.24266 21.17871,23.13901 35.9034,51.95263 42.10091,82.3841 1.71865,8.439 2.72276,16.07164 3.25254,24.7237 0.12168,1.98736 0.28078,3.61339 0.35354,3.61339 0.0728,0 8.78907,1.52442 19.36957,3.38762 10.58051,1.86318 19.49825,3.43262 19.8172,3.48764 0.49847,0.086 0.57993,0.17294 0.57993,0.61916 0,0.44622 -0.0815,0.53319 -0.57993,0.61916 -0.31895,0.055 -9.23669,1.62446 -19.8172,3.48764 -10.5805,1.8632 -19.30535,3.38762 -19.38855,3.38762 -0.0832,0 -0.20339,0.7829 -0.26709,1.73978 -0.28249,4.2432 -0.66875,8.43435 -1.08949,11.82156 -5.5253,44.48185 -28.00251,85.03047 -62.93864,113.54052 -21.89324,17.86626 -47.95109,30.16231 -75.69605,35.71908 -7.84058,1.57032 -17.03059,2.75556 -23.76583,3.06508 -1.3924,0.064 -2.62821,0.17603 -2.74625,0.24899 -0.12669,0.0783 -1.66518,8.34451 -3.75606,20.18097 -1.94778,11.02658 -3.54247,20.10856 -3.54372,20.18216 -0.002,0.0736 -0.24316,0.13383 -0.53758,0.13383 -0.29442,0 -0.53532,-0.0486 -0.53532,-0.10806 z m 0,-109.40854 V 215.00025 l -15.4482,15.4482 -15.4482,15.4482 15.4034,87.28773 c 8.47185,48.00826 15.42354,87.28773 15.4482,87.28773 0.0246,0 0.0448,-46.23117 0.0448,-102.73593 z m -18.81608,2.61776 c -3.29195,-18.68816 -6.04592,-34.19973 -6.11995,-34.47013 -0.12268,-0.44813 -0.54461,0.15194 -4.76765,6.78067 -2.54819,3.99977 -4.98144,7.81488 -5.40721,8.47801 -0.71553,1.11438 -0.80384,1.19024 -1.1662,1.00184 -0.21563,-0.11211 -0.41725,-0.22485 -0.44805,-0.25052 -0.0308,-0.0257 1.75582,-8.22688 3.97027,-18.22487 2.21444,-9.99799 4.02625,-18.45097 4.02625,-18.7844 0,-0.56039 -0.3451,-2.8894 -0.44551,-3.00667 -0.0243,-0.0283 -13.71327,9.5165 -30.42004,21.21073 l -30.37595,21.26222 -0.36187,-0.36188 -0.36187,-0.36187 21.27036,-30.3678 c 11.6987,-16.7023 21.2446,-30.38803 21.2131,-30.41274 -0.15787,-0.12393 -2.25936,-0.4562 -2.88519,-0.4562 -0.394,0 -8.89949,1.81272 -18.90107,4.02827 -10.00159,2.21557 -18.20662,4.00218 -18.23342,3.97026 -0.0268,-0.0319 -0.14044,-0.23443 -0.25255,-0.45006 -0.18839,-0.36235 -0.1125,-0.45073 1.00186,-1.16665 0.66312,-0.42602 4.4824,-2.85926 8.48727,-5.40721 6.69529,-4.25959 7.24126,-4.64365 6.78067,-4.76988 -0.7814,-0.21414 -69.34188,-12.27768 -69.46847,-12.22331 -0.32247,0.1385 1.22683,10.68566 2.33991,15.92936 4.75066,22.38037 14.86072,43.32996 29.48569,61.09884 5.90485,7.17422 13.65491,14.8304 20.90403,20.65082 21.07711,16.9231 46.51574,27.5334 73.24907,30.55176 2.55091,0.28802 2.76992,0.28966 2.81882,0.0211 0.0291,-0.16014 -2.64038,-15.58151 -5.9323,-34.26968 z m 37.01683,34.07884 c 40.82637,-4.8496 78.31671,-28.0151 101.33412,-62.61494 12.54266,-18.85419 20.09404,-39.17203 22.93991,-61.72247 0.2527,-2.00238 0.42656,-3.67359 0.38635,-3.71379 -0.0745,-0.0745 -68.67047,11.97047 -69.5702,12.21607 -0.45007,0.12284 0.18369,0.56624 7.20616,5.04175 4.2348,2.69889 8.04878,5.12717 8.4755,5.39616 0.73163,0.46123 0.76384,0.51551 0.56495,0.95201 -0.1685,0.36983 -0.3024,0.44404 -0.66604,0.36914 -0.25033,-0.0516 -8.43415,-1.8651 -18.18627,-4.03008 -9.75214,-2.16496 -18.01618,-3.9363 -18.36457,-3.9363 -0.59832,0 -2.91652,0.3441 -3.03952,0.45118 -0.0314,0.0274 9.51137,13.7184 21.20622,30.42454 21.13397,30.18993 21.26123,30.37692 20.91289,30.72527 -0.34835,0.34834 -0.53534,0.22108 -30.72527,-20.91289 -16.70614,-11.69485 -30.39718,-21.23766 -30.42454,-21.20622 -0.10487,0.12046 -0.45118,2.43515 -0.45118,3.01558 0,0.33523 1.81176,8.78826 4.02613,18.78454 2.21439,9.99626 4.001,18.19598 3.97026,18.2216 -0.0307,0.0256 -0.23229,0.13829 -0.44792,0.2504 -0.36233,0.1884 -0.45077,0.11249 -1.16695,-1.00184 -0.42618,-0.66313 -2.85943,-4.47785 -5.40721,-8.47714 -4.21977,-6.62387 -4.64429,-7.22773 -4.7669,-6.78067 -0.19653,0.71652 -12.08845,68.29047 -12.08845,68.69062 0,0.38832 -0.25886,0.39694 4.28253,-0.14252 z m 41.48699,-81.351 c -14.6228,-14.62305 -26.62716,-26.58725 -26.67635,-26.58711 -0.0492,1.4e-4 -0.64786,3.18461 -1.33037,7.07659 -1.2154,6.93084 -1.23374,7.08112 -0.89219,7.30945 0.1918,0.12821 12.71452,8.90085 27.82827,19.49473 15.11376,10.5939 27.5196,19.26884 27.56854,19.27766 0.049,0.009 -11.87511,-11.94827 -26.4979,-26.57132 z m -92.52088,-27.47932 c 0,-0.12127 -13.84211,-2.55435 -14.07055,-2.47334 -0.0996,0.0353 -8.94446,12.59058 -19.65533,27.90061 l -19.4743,27.83644 26.6003,-26.58713 c 14.63017,-14.62293 26.60011,-26.62739 26.59988,-26.67658 z m 67.01262,50.09642 c -0.13252,-0.31896 -1.7031,-4.11301 -3.49019,-8.43123 -1.78708,-4.31821 -3.30632,-7.95626 -3.37611,-8.08455 -0.0698,-0.1283 -0.31209,0.85359 -0.53844,2.18196 l -0.41157,2.41522 3.97908,6.24926 c 2.18848,3.43709 4.00136,6.24926 4.02863,6.24926 0.0273,0 -0.0589,-0.26096 -0.1914,-0.57992 z m -64.53476,-9.33746 c 2.07235,-5.01292 3.76792,-9.30487 3.76792,-9.53768 0,-0.57453 -1.47327,-8.9304 -1.55939,-8.84427 -0.0746,0.0746 -6.11124,27.21436 -6.11263,27.4815 0,0.09 0.03,0.1301 0.0677,0.0892 0.0377,-0.0409 1.76407,-4.17584 3.83644,-9.18877 z m 112.88177,-38.70458 c -3.93864,-1.73175 -17.93963,-7.40777 -18.27263,-7.40777 -0.57106,0 -8.95495,1.46992 -8.86976,1.55511 0.0938,0.0938 27.09486,6.09343 27.41144,6.09082 0.14721,-0.002 0.0261,-0.10838 -0.26905,-0.23816 z m -154.6157,-4.9966 c 3.48401,-1.44364 6.44023,-2.68326 6.56936,-2.7547 0.12914,-0.0714 -0.85007,-0.31668 -2.17602,-0.54496 l -2.41082,-0.41504 -6.12137,3.89328 c -3.36676,2.14132 -6.20153,3.96412 -6.2995,4.0507 -0.18975,0.16771 0.55652,-0.13465 10.43835,-4.22928 z m 192.11989,-13.38967 c 47.58165,-8.39355 86.83326,-15.33068 87.22583,-15.41583 0.40657,-0.0882 -43.51939,-0.16304 -102.06652,-0.17392 l -102.7803,-0.0191 15.43418,15.43494 c 8.48879,8.48922 15.4883,15.43494 15.55446,15.43494 0.0662,0 39.05071,-6.86746 86.63235,-15.26102 z M 196.80421,197.14275 181.35588,181.69442 95.27274,196.88241 c -47.34573,8.35339 -86.64523,15.29749 -87.33222,15.4313 -1.06114,0.20672 14.21505,0.24589 101.53147,0.26034 l 102.78054,0.017 -15.44832,-15.44832 z M 230.37037,94.27274 C 222.01698,46.92701 215.07288,7.627509 214.93907,6.94052 c -0.20672,-1.061138 -0.24589,14.21505 -0.26034,101.53147 l -0.017,102.78054 15.44832,-15.44832 15.44833,-15.44833 -15.18798,-86.08314 z m -123.89953,99.58572 c 18.92356,-3.33491 34.6319,-6.12525 34.9074,-6.20074 0.46059,-0.12623 -0.0854,-0.51029 -6.78067,-4.76988 -4.00487,-2.54795 -7.82415,-4.98119 -8.48727,-5.40721 -1.11436,-0.71592 -1.19025,-0.8043 -1.00186,-1.16665 0.11211,-0.21563 0.22576,-0.41816 0.25255,-0.45007 0.0268,-0.0319 8.23183,1.7547 18.23342,3.97027 10.00158,2.21555 18.50707,4.02827 18.90107,4.02827 0.62554,0 2.72723,-0.33225 2.88509,-0.45609 0.0314,-0.0247 -9.51136,-13.71349 -21.20622,-30.41963 -21.22557,-30.32079 -21.26274,-30.37542 -20.90838,-30.72978 0.35435,-0.35435 0.40898,-0.31718 30.73093,20.90723 16.70677,11.69422 30.39579,21.23905 30.42004,21.21073 0.10071,-0.11763 0.44551,-2.44712 0.44551,-3.00992 0,-0.33522 -1.81176,-8.78826 -4.02613,-18.78453 -2.21439,-9.99627 -4.001,-18.19599 -3.97026,-18.22161 0.0307,-0.0256 0.23229,-0.1383 0.44792,-0.25041 0.36236,-0.1884 0.45067,-0.11253 1.1662,1.00186 0.42577,0.66312 2.85902,4.47633 5.40721,8.47378 2.54818,3.99745 4.66692,7.1692 4.70832,7.04833 0.16589,-0.48431 12.45489,-70.35178 12.38732,-70.42631 -0.11891,-0.13111 -5.42966,0.48724 -9.07225,1.05632 -23.00143,3.59349 -44.88652,12.83735 -63.52417,26.83147 -31.00861,23.28287 -51.3473,58.22466 -56.10354,96.38566 -0.54263,4.35369 -0.6242,5.44238 -0.40778,5.44238 0.10399,0 15.67198,-2.72856 34.59555,-6.06347 z m 250.0488,5.48354 c -0.002,-1.11129 -0.71652,-6.67364 -1.3475,-10.48327 -6.3857,-38.55511 -28.4883,-72.85713 -61.19445,-94.97039 -8.64339,-5.84397 -18.41872,-10.96424 -28.10409,-14.72078 -8.96547,-3.47732 -18.35061,-6.05078 -28.11856,-7.71027 -2.76612,-0.46995 -8.97302,-1.26026 -9.89765,-1.26026 -0.64781,0 -0.70309,0.0361 -0.61513,0.40148 0.0532,0.22082 2.86363,16.09149 6.24553,35.26816 3.38189,19.17668 6.17207,34.88984 6.20037,34.91815 0.0283,0.0283 2.13437,-3.2156 4.68014,-7.20869 2.54577,-3.99308 4.97526,-7.79946 5.39887,-8.45861 0.73978,-1.15106 0.78829,-1.19024 1.22675,-0.99046 0.3638,0.16576 0.43739,0.30045 0.36227,0.66315 -0.0518,0.25033 -1.86536,8.4435 -4.03006,18.20704 -2.16469,9.76355 -3.9358,18.02761 -3.9358,18.36457 0,0.58279 0.34601,2.89795 0.45118,3.01875 0.0274,0.0314 13.7184,-9.51136 30.42454,-21.20622 30.18993,-21.13397 30.37692,-21.26124 30.72527,-20.91289 0.34834,0.34835 0.22108,0.53533 -20.91289,30.72527 -11.69485,16.70614 -21.23766,30.39718 -21.20622,30.42454 0.123,0.10708 2.4412,0.45118 3.03952,0.45118 0.34839,0 8.61243,-1.77134 18.36457,-3.9363 9.75212,-2.16498 17.93594,-3.97851 18.18627,-4.03007 0.36364,-0.0749 0.49754,-7.1e-4 0.66604,0.36914 0.19889,0.43649 0.16668,0.49077 -0.56495,0.95199 -8.33271,5.25294 -16.11731,10.31995 -15.94498,10.37861 0.30303,0.10313 69.19866,12.29083 69.58949,12.31044 0.23672,0.012 0.31207,-0.12465 0.31147,-0.56426 z m -65.58961,-15.94817 c 3.34462,-2.12243 6.16141,-3.93321 6.25956,-4.02398 0.0981,-0.0908 -0.90558,0.28521 -2.23049,0.83552 -1.3249,0.55028 -5.2575,2.1797 -8.73908,3.62089 -3.48157,1.4412 -6.21169,2.64245 -6.06692,2.66945 3.11504,0.58079 3.90181,0.71639 4.26392,0.73495 0.28063,0.0145 2.56163,-1.32937 6.51301,-3.83683 z m -135.95606,1.89613 c 2.20181,-0.39257 4.10627,-0.7192 4.23213,-0.72584 0.12586,-0.007 0.0683,-0.0838 -0.12804,-0.1714 -0.44488,-0.19862 -27.22611,-6.10712 -27.30842,-6.02482 -0.14124,0.14125 18.0849,7.59797 18.61533,7.61595 0.32214,0.0109 2.3872,-0.30133 4.589,-0.69389 z m 126.24689,-30.06691 19.47417,-27.83644 -26.6003,26.58714 c -14.63016,14.62292 -26.60019,26.62738 -26.60003,26.67657 0,0.13317 13.21483,2.47295 13.7727,2.43863 0.42553,-0.0262 2.66429,-3.1527 19.95346,-27.8659 z m -98.24451,17.48316 c 0.75318,-4.29499 1.1717,-7.11139 1.07064,-7.20448 -0.0913,-0.0841 -12.25071,-8.60513 -27.02097,-18.93572 -14.77026,-10.33058 -27.25651,-19.065 -27.74721,-19.40982 -0.49071,-0.34482 11.07202,11.34961 25.69494,25.98762 14.62292,14.638 26.62738,26.61444 26.67657,26.6143 0.0492,-1.4e-4 0.64591,-3.1735 1.32603,-7.0519 z m 62.92015,-28.12369 c 1.66341,-7.49492 3.00405,-13.68879 2.97923,-13.76414 -0.0806,-0.24468 -7.62666,18.16464 -7.62666,18.60599 0,0.56771 1.47206,8.93627 1.55698,8.85135 0.0363,-0.0363 1.42705,-6.19828 3.09045,-13.6932 z m -57.99822,0.25012 0.40445,-2.36067 -3.88896,-6.11517 c -2.13893,-3.36334 -3.95918,-6.19377 -4.04501,-6.28985 -0.0858,-0.0961 0.35705,1.06823 0.98416,2.58736 3.96332,9.60068 6.06613,14.62825 6.10094,14.5867 0.022,-0.0262 0.22198,-1.11 0.44442,-2.40837 z"
id="path15"
inkscape:connector-curvature="0" />
</svg>
import QtQuick 2.3
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.4
import QtQuick.Dialogs 1.2
import QtQuick.Extras 1.4
import QtQuick.Layouts 1.2
import QGroundControl 1.0
......@@ -398,10 +400,40 @@ Rectangle {
columns: 2
visible: gridHeader.checked
QGCLabel { text: qsTr("Angle") }
GridLayout {
anchors.left: parent.left
anchors.right: parent.right
columnSpacing: _margin
rowSpacing: _margin
columns: 3
visible: gridHeader.checked
QGCLabel {
id: angleText
text: qsTr("Angle")
}
Item { Layout.fillWidth: true }
property var activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
ToolButton {
id: windRoseButton
anchors.verticalCenter: angleText.verticalCenter
iconSource: qgcPal.globalTheme === QGCPalette.Light ? "/res/wind-roseBlack.svg" : "/res/wind-rose.svg"
visible: _activeVehicle ? _activeVehicle.fixedWing : true
onClicked: {
var cords = windRoseButton.mapToItem(_root, 0, 0)
windRosePie.popup(cords.x + windRoseButton.width / 2, cords.y + windRoseButton.height / 2);
}
}
}
FactTextField {
id: gridAngleText
fact: missionItem.gridAngle
Layout.fillWidth: true
Layout.columnSpan: 1
}
QGCLabel { text: qsTr("Turnaround dist") }
......@@ -467,13 +499,49 @@ Rectangle {
spacing: _margin
visible: manualGridHeader.visible && manualGridHeader.checked
GridLayout {
anchors.left: parent.left
anchors.right: parent.right
columnSpacing: _margin
rowSpacing: _margin
columns: 4
visible: gridHeader.checked
QGCLabel {
id: manualAngleText
text: qsTr("Angle")
Layout.columnSpan: 1
Layout.fillWidth: true
}
property var activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
ToolButton {
id: manualWindRoseButton
anchors.verticalCenter: manualAngleText.verticalCenter
Layout.columnSpan: 1
iconSource: qgcPal.globalTheme === QGCPalette.Light ? "/res/wind-roseBlack.svg" : "/res/wind-rose.svg"
visible: _activeVehicle ? _activeVehicle.fixedWing : true
onClicked: {
var cords = manualWindRoseButton.mapToItem(_root, 0, 0)
windRosePie.popup(cords.x + manualWindRoseButton.width / 2, cords.y + manualWindRoseButton.height / 2);
}
}
FactTextField {
id: manualGridAngleText
fact: missionItem.gridAngle
Layout.columnSpan: 2
}
}
FactTextFieldGrid {
anchors.left: parent.left
anchors.right: parent.right
columnSpacing: ScreenTools.defaultFontPixelWidth
rowSpacing: _margin
factList: [ missionItem.gridAngle, missionItem.gridSpacing, missionItem.gridAltitude, missionItem.turnaroundDist ]
factLabels: [ qsTr("Angle"), qsTr("Spacing"), qsTr("Altitude"), qsTr("Turnaround dist")]
factList: [ missionItem.gridSpacing, missionItem.gridAltitude, missionItem.turnaroundDist ]
factLabels: [ qsTr("Spacing"), qsTr("Altitude"), qsTr("Turnaround dist")]
}
QGCCheckBox {
......@@ -516,4 +584,112 @@ Rectangle {
}
}
}
QGCColoredImage {
id: windRoseArrow
source: "/res/wind-rose-arrow.svg"
visible: windRosePie.visible
width: windRosePie.width / 5
height: width * 1.454
smooth: true
color: qgcPal.colorGrey
transform: Rotation {
origin.x: windRoseArrow.width / 2
origin.y: windRoseArrow.height / 2
axis { x: 0; y: 0; z: 1 } angle: windRosePie.angle
}
x: windRosePie.x + Math.sin(- windRosePie.angle*Math.PI/180 - Math.PI/2)*(windRosePie.width/2 - windRoseArrow.width/2) + windRosePie.width / 2 - windRoseArrow.width / 2
y: windRosePie.y + Math.cos(- windRosePie.angle*Math.PI/180 - Math.PI/2)*(windRosePie.width/2 - windRoseArrow.width/2) + windRosePie.height / 2 - windRoseArrow.height / 2
z: windRosePie.z + 1
}
QGCColoredImage {
id: windGuru
source: "/res/wind-guru.svg"
visible: windRosePie.visible
width: windRosePie.width / 3
height: width * 4.28e-1
smooth: true
color: qgcPal.colorGrey
transform: Rotation {
origin.x: windGuru.width / 2
origin.y: windGuru.height / 2
axis { x: 0; y: 0; z: 1 } angle: windRosePie.angle + 180
}
x: windRosePie.x + Math.sin(- windRosePie.angle*Math.PI/180 - 3*Math.PI/2)*(windRosePie.width/2) + windRosePie.width / 2 - windGuru.width / 2
y: windRosePie.y + Math.cos(- windRosePie.angle*Math.PI/180 - 3*Math.PI/2)*(windRosePie.height/2) + windRosePie.height / 2 - windGuru.height / 2
z: windRosePie.z + 1
}
Item {
id: windRosePie
height: 2.6*windRoseButton.height
width: 2.6*windRoseButton.width
visible: false
focus: true
property string colorCircle: qgcPal.windowShade
property string colorBackground: qgcPal.colorGrey
property real lineWidth: windRoseButton.width / 3
property real angle: 0
Canvas {
id: windRoseCanvas
anchors.fill: parent
onPaint: {
var ctx = getContext("2d")
var x = width / 2
var y = height / 2
var angleWidth = 0.03 * Math.PI
var start = windRosePie.angle*Math.PI/180 - angleWidth
var end = windRosePie.angle*Math.PI/180 + angleWidth
ctx.reset()
ctx.beginPath();
ctx.arc(x, y, (width / 3) - windRosePie.lineWidth / 2, 0, 2*Math.PI, false)
ctx.lineWidth = windRosePie.lineWidth
ctx.strokeStyle = windRosePie.colorBackground
ctx.stroke()
ctx.beginPath();
ctx.arc(x, y, (width / 3) - windRosePie.lineWidth / 2, start, end, false)
ctx.lineWidth = windRosePie.lineWidth
ctx.strokeStyle = windRosePie.colorCircle
ctx.stroke()
}
}
onFocusChanged: {
visible = focus
}
function popup(x, y) {
if (x !== undefined)
windRosePie.x = x - windRosePie.width / 2;
if (y !== undefined)
windRosePie.y = y - windRosePie.height / 2;
windRosePie.visible = true;
windRosePie.focus = true
}
MouseArea {
id: mouseArea
anchors.fill: parent
acceptedButtons: Qt.LeftButton | Qt.RightButton
onClicked: {
windRosePie.visible = false;
}
onPositionChanged: {
var point = Qt.point(mouseX - parent.width / 2, mouseY - parent.height / 2)
var angle = Math.round(Math.atan2(point.y, point.x) * 180 / Math.PI)
windRoseCanvas.requestPaint()
windRosePie.angle = angle
gridAngleText.text = angle
gridAngleText.editingFinished();
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment