Skip to content
Permalink
Browse files

Merge pull request #5737 from elpaso/hidpi-cursors

[bugfix][hidpi] Scalable SVG theme cursors
  • Loading branch information
elpaso committed Dec 1, 2017
2 parents f6e63d7 + 656de62 commit 62ff88af03bea2c92f619a6162add5f5ed72b7eb
Showing with 217 additions and 330 deletions.
  1. +7 −0 images/images.qrc
  2. +1 −0 images/themes/default/cursors/mCapturePoint.svg
  3. +1 −0 images/themes/default/cursors/mCrossHair.svg
  4. +1 −0 images/themes/default/cursors/mIdentify.svg
  5. +1 −0 images/themes/default/cursors/mSampler.svg
  6. +1 −0 images/themes/default/cursors/mSelect.svg
  7. +1 −0 images/themes/default/cursors/mZoomIn.svg
  8. +1 −0 images/themes/default/cursors/mZoomOut.svg
  9. +20 −0 python/core/qgsapplication.sip
  10. +0 −1 src/app/composer/qgscomposer.cpp
  11. +0 −1 src/app/qgisapp.cpp
  12. +1 −7 src/app/qgsmaptoolidentifyaction.cpp
  13. +1 −3 src/app/qgsmaptoolselectrectangle.cpp
  14. +1 −3 src/app/qgsmeasuretool.cpp
  15. +64 −0 src/core/qgsapplication.cpp
  16. +24 −0 src/core/qgsapplication.h
  17. +0 −2 src/gui/CMakeLists.txt
  18. +1 −3 src/gui/layout/qgslayoutviewtooladditem.cpp
  19. +1 −3 src/gui/layout/qgslayoutviewtooladdnodeitem.cpp
  20. +3 −4 src/gui/layout/qgslayoutviewtooltemporarykeyzoom.cpp
  21. +9 −10 src/gui/layout/qgslayoutviewtoolzoom.cpp
  22. +26 −9 src/gui/qgscolorbutton.cpp
  23. +1 −0 src/gui/qgscolorbutton.h
  24. +0 −1 src/gui/qgscolordialog.cpp
  25. +17 −25 src/gui/qgscomposerview.cpp
  26. +24 −5 src/gui/qgscompoundcolorwidget.cpp
  27. +2 −0 src/gui/qgscompoundcolorwidget.h
  28. +0 −191 src/gui/qgscursors.cpp
  29. +0 −38 src/gui/qgscursors.h
  30. +1 −3 src/gui/qgsmapcanvas.cpp
  31. +1 −3 src/gui/qgsmaptoolcapture.cpp
  32. +1 −4 src/gui/qgsmaptoolidentify.cpp
  33. +1 −3 src/gui/qgsmaptoolidentifyfeature.cpp
  34. +0 −1 src/gui/qgsmaptoolpan.cpp
  35. +2 −3 src/gui/qgsmaptoolzoom.cpp
  36. +1 −4 src/plugins/coordinate_capture/coordinatecapturemaptool.cpp
  37. +1 −3 src/plugins/evis/idtool/eviseventidtool.cpp
@@ -606,6 +606,13 @@
<file>themes/default/mActionResizeSquare.svg</file>
<file>themes/default/mSourceFields.svg</file>
<file>flags/zh_Hant.svg</file>
<file>themes/default/cursors/mCapturePoint.svg</file>
<file>themes/default/cursors/mCrossHair.svg</file>
<file>themes/default/cursors/mSampler.svg</file>
<file>themes/default/cursors/mSelect.svg</file>
<file>themes/default/cursors/mZoomIn.svg</file>
<file>themes/default/cursors/mZoomOut.svg</file>
<file>themes/default/cursors/mIdentify.svg</file>
</qresource>
<qresource prefix="/images/tips">
<file alias="symbol_levels.png">qgis_tips/symbol_levels.png</file>
@@ -0,0 +1 @@
<svg height="24" viewBox="0 0 24.000001 24.000001" width="24" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 -1028.3622)"><path d="m11.999024 1031.2685c-5.0013627 0-9.0917967 4.0922-9.0917967 9.0938 0 5.0016 4.090434 9.0937 9.0917967 9.0937 5.001362 0 9.09375-4.0921 9.09375-9.0937 0-5.0016-4.092388-9.0938-9.09375-9.0938zm.002 1.7481a7.3431287 7.3438616 0 0 1 .732422.037 7.3431287 7.3438616 0 0 1 .724609.1093 7.3431287 7.3438616 0 0 1 .712891.1817 7.3431287 7.3438616 0 0 1 .689453.2519 7.3431287 7.3438616 0 0 1 .660156.3204 7.3431287 7.3438616 0 0 1 .625.3828 7.3431287 7.3438616 0 0 1 .585938.4453 7.3431287 7.3438616 0 0 1 .537109.5 7.3431287 7.3438616 0 0 1 .484375.5508 7.3431287 7.3438616 0 0 1 .425781.5976 7.3431287 7.3438616 0 0 1 .365235.6367 7.3431287 7.3438616 0 0 1 .300781.67 7.3431287 7.3438616 0 0 1 .230469.6972 7.3431287 7.3438616 0 0 1 .160156.7149 7.3431287 7.3438616 0 0 1 .08984.7304 7.3431287 7.3438616 0 0 1 .01758.5196 7.3431287 7.3438616 0 0 1 -.03711.7324 7.3431287 7.3438616 0 0 1 -.109375.7265 7.3431287 7.3438616 0 0 1 -.18164.711 7.3431287 7.3438616 0 0 1 -.251953.6894 7.3431287 7.3438616 0 0 1 -.31836.6602 7.3431287 7.3438616 0 0 1 -.384765.6269 7.3431287 7.3438616 0 0 1 -.44336.584 7.3431287 7.3438616 0 0 1 -.5.5371 7.3431287 7.3438616 0 0 1 -.550781.4844 7.3431287 7.3438616 0 0 1 -.597656.4278 7.3431287 7.3438616 0 0 1 -.636719.3652 7.3431287 7.3438616 0 0 1 -.669922.2988 7.3431287 7.3438616 0 0 1 -.697266.2324 7.3431287 7.3438616 0 0 1 -.714843.1602 7.3431287 7.3438616 0 0 1 -.730469.088 7.3431287 7.3438616 0 0 1 -.517578.019 7.3431287 7.3438616 0 0 1 -.734375-.037 7.3431287 7.3438616 0 0 1 -.724609-.1094 7.3431287 7.3438616 0 0 1 -.7128907-.1816 7.3431287 7.3438616 0 0 1 -.689453-.252 7.3431287 7.3438616 0 0 1 -.660156-.3203 7.3431287 7.3438616 0 0 1 -.625-.3828 7.3431287 7.3438616 0 0 1 -.585938-.4453 7.3431287 7.3438616 0 0 1 -.537109-.5 7.3431287 7.3438616 0 0 1 -.484375-.5508 7.3431287 7.3438616 0 0 1 -.425782-.5976 7.3431287 7.3438616 0 0 1 -.365234-.6368 7.3431287 7.3438616 0 0 1 -.300781-.6699 7.3431287 7.3438616 0 0 1 -.230469-.6972 7.3431287 7.3438616 0 0 1 -.160156-.7149 7.3431287 7.3438616 0 0 1 -.089844-.7285 7.3431287 7.3438616 0 0 1 -.017578-.5195 7.3431287 7.3438616 0 0 1 .037109-.7344 7.3431287 7.3438616 0 0 1 .109375-.7246 7.3431287 7.3438616 0 0 1 .181641-.7129 7.3431287 7.3438616 0 0 1 .251953-.6895 7.3431287 7.3438616 0 0 1 .318359-.6601 7.3431287 7.3438616 0 0 1 .384766-.627 7.3431287 7.3438616 0 0 1 .443359-.584 7.3431287 7.3438616 0 0 1 .5-.5371 7.3431287 7.3438616 0 0 1 .550782-.4843 7.3431287 7.3438616 0 0 1 .597656-.4258 7.3431287 7.3438616 0 0 1 .636719-.3653 7.3431287 7.3438616 0 0 1 .669921-.3007 7.3431287 7.3438616 0 0 1 .6972657-.2305 7.3431287 7.3438616 0 0 1 .714844-.1621 7.3431287 7.3438616 0 0 1 .730469-.088 7.3431287 7.3438616 0 0 1 .519531-.02z" fill="#fff" overflow="visible"/><path d="m7.0000003 1040.3622h10.0000007" fill="none" stroke="#000" stroke-width="1.50000009"/><path d="m12.000001 1035.3621v10.0001" fill="none" stroke="#000" stroke-width="1.50000009"/><ellipse cx="12.000001" cy="1040.3622" fill="#fff" rx="1.499993" ry="1.4999931"/><path d="m11.250001 1030.3622v1.9454c-3.8637771.3575-6.9473551 3.4415-7.3046881 7.3046h-1.945312v1.4981h1.945312c.356486 3.864 3.440264 6.9511 7.3046881 7.3086v1.9433h1.5v-1.9433c3.864427-.3575 6.948205-3.4446 7.304687-7.3086h1.945313v-1.4981h-1.945313c-.35733-3.8631-3.440907-6.9471-7.304687-7.3046v-1.9454zm.75 3.4063c.912362 0 1.781158.1826 2.570312.5156.789154.333 1.499679.816 2.095703 1.4121.596024.5962 1.077184 1.3063 1.410156 2.0957.332973.7894.517579 1.6575.517579 2.5703 0 .9129-.184606 1.7811-.517579 2.5704-.332972.7892-.814132 1.4997-1.410156 2.0957-.596024.5959-1.306549 1.0773-2.095703 1.4101-.789154.3328-1.65795.5176-2.570312.5176-.912362 0-1.781159-.1848-2.5703131-.5176-.789153-.3328-1.497726-.8142-2.09375-1.4101-.596024-.596-1.079137-1.3065-1.412109-2.0957-.332973-.7893-.515625-1.6575-.515625-2.5704 0-.9128.182652-1.7809.515625-2.5703.332972-.7894.816085-1.4995 1.412109-2.0957.596024-.5961 1.304597-1.0791 2.09375-1.4121.7891541-.333 1.6579511-.5156 2.5703131-.5156z" fill-rule="evenodd" overflow="visible"/></g></svg>
@@ -0,0 +1 @@
<svg height="24" viewBox="0 0 24.000001 24.000001" width="24" xmlns="http://www.w3.org/2000/svg"><g fill="none" transform="translate(0 -1028.3622)"><path d="m2.0000001 1040.3622h7.0075899m5.994795 0h6.997617" stroke="#fff" stroke-width="4.00000024"/><path d="m2.0000001 1040.3622h7.0075899m5.994795 0h6.997617" stroke="#000" stroke-width="2.00000012"/><path d="m12.000001 1050.3622v-7.0076m0-5.9948v-6.9976" stroke="#fff" stroke-width="4.00000048"/><path d="m12.000001 1050.3622v-7.0076m0-5.9948v-6.9976" stroke="#000" stroke-width="2.00000024"/></g></svg>
@@ -0,0 +1 @@
<svg height="24" viewBox="0 0 24.000001 24.000001" width="24" xmlns="http://www.w3.org/2000/svg"><g fill-rule="evenodd" transform="translate(0 -1028.3622)"><path d="m1.5 1030.2852c-1.3663036 0-2.36077773 1.4769-1.85546875 2.7421a1.50015 1.50015 0 0 0 .001953 0l6.88867182 17.0938a1.50015 1.50015 0 0 0 .00195.01c.5822283 1.4296 2.7401585 1.6091 3.5527346.2968l1.351562-2.1875 3.634766 3.9688c.748547.8235 2.079397.86 2.875.086l2.050781-1.998c.770717-.7493.799189-2.0218.0625-2.8047a1.50015 1.50015 0 0 0 -.002 0l-3.583984-3.791 1.861328-.8067h-.0039c1.440714-.6208 1.542372-2.8405.166015-3.5918l-16.0429686-8.7695a1.50015 1.50015 0 0 0 -.00391 0c-.29764527-.1676-.62676307-.2483-.95503007-.2483z" fill="#fff" overflow="visible"/><path d="m1.5 1031.7852c-.3530058 0-.59380948.3577-.4628906.6855l6.8886718 17.0938c.1543448.379.6737665.4223.8886719.074l2.3945309-3.875 4.976563 5.4355c.19025.2093.516057.2192.71875.022l2.052734-2c .195733-.1903.20269-.5024.01563-.7012l-5.054687-5.3476 3.824219-1.6582c.383141-.1651.407522-.6992.04102-.8985l-16.0429786-8.7698c-.073736-.04-.1563493-.061-.2402344-.061z" overflow="visible"/><path d="m19.849609.51757812c-1.760247 0-3.173828 1.38844678-3.173828 3.15820308 0 .5941457.212401 1.1622226.521485 1.6738282-1.405122.7299557-2.357677 1.8584073-2.826172 2.4863281-.408514.4742198-.559553 1.1242578-.445313 1.6953125a1.50015 1.50015 0 0 0 0 .00195c.09218.4568816.323146.8214779.597657 1.0976559l.177734.179688a1.50015 1.50015 0 0 0 .0039.0039c.119867.120485.311329.102542.457031.189453l-.15039.44336c-.628376 1.822713-.949219 2.37686-.949219 3.380859 0 .567624.191074 1.23153.697266 1.75.506191.51847 1.267455.78125 2.011718.78125 3.516333 0 5.285152-2.574576 5.558594-3.013672a1.50015 1.50015 0 0 0 .01563-.02539c.418343-.703427.286154-1.944691-.302734-2.542968a1.50015 1.50015 0 0 0 -.01172-.01172l-.238281-.236328c-.134001-.134176-.307162-.08236-.455078-.173828l.597658-1.6992099a1.50015 1.50015 0 0 0 0-.00586c.299857-.8614512.5625-1.4669407.5625-2.3144531 0-.4736425-.318648-.8783406-.570313-1.2988281.103587-.085585.23957-.1422824.330078-.2363282.565527-.5876276.943361-1.3313619.94336-2.2246087.000328-.6963831-.237312-1.4788361-.837891-2.0957031-.600578-.61686705-1.522559-.96289067-2.513672-.96289068zm-5.511718 7.35351568c-.0031.0041-.01261.013526-.01563.017578a1.50015 1.50015 0 0 0 -.02149.03125l.03711-.048828z" fill="#fff" overflow="visible" transform="translate(1.1250001 1027.4872)"/><path d="m20.974609 1029.5048c-.89082 0-1.673828.7745-1.673828 1.6582 0 1.0074.672926 1.6601 1.712891 1.6601 1.02094 0 1.812501-.946 1.8125-1.7597.000338-.7182-.48374-1.5586-1.851563-1.5586zm-.160156 4.1621c-2.008926 0-3.582074 1.821-4.164062 2.6035-.0074.015-.01539.018-.02148.027-.100232.1147-.13869.2695-.107422.4258.02413.1196.09052.2364.191407.3379l.179687.1817c.108043.1086.249375.166.396484.166.109739 0 .271874-.034.433594-.1973l.03125-.033c.209624-.2802.600313-.7038.886719-.9648-.04927.1678-.119291.3723-.201172.6093l-.882812 2.5938c-.630912 1.8314-.869141 2.5166-.869141 2.8984 0 .499.317488 1.0313 1.208984 1.0313 2.770642 0 4.135326-2.0661 4.285157-2.3067.152189-.2559.124576-.5127-.08203-.7226l-.242187-.2403c-.219814-.2201-.640501-.1761-.814453.084-.109068.1641-.613978.6894-.931641.9356.03939-.1634.115796-.415.257813-.8203l1.27539-3.6309c.299317-.8599.478516-1.3793.478516-1.8223 0-.7007-.513246-1.1543-1.308594-1.1543l0 0z" overflow="visible"/><path d="m4.0164661 1034.9367l9.9835339 5.4255" fill="#ccc" stroke="#b3b3b3" stroke-linecap="round"/></g></svg>
@@ -0,0 +1 @@
<svg enable-background="new" height="24" viewBox="0 0 23.999998 24" width="24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><filter id="a" color-interpolation-filters="sRGB"><feBlend in2="BackgroundImage" mode="screen"/></filter><g fill-rule="evenodd" filter="url(#a)" transform="translate(-346.23242 -654.49916)"><path d="m1.6914062 0c-.9203699.00012-1.6913362.76650314-1.6914062 1.6894531v1.3789063c.00008.4505.17901375.8789925.49609375 1.1953125l2.26757815 2.2636719v.6796874c.00008.4505001.1790137.8790025.4960937 1.1953126l6.4140625 6.4023442v2.060546c.00007.92296.7709859 1.689353 1.6914059 1.689454h.681641l4.4375 4.429687a1.0001 1.0001 0 0 0 .001953.001953l.595703.59375a1.0001 1.0001 0 0 0 .527344.275391c2.20246.39553 4.043289-.066001 5.162109-1.300781 1.11881-1.23474 1.408937-3.02165 1.128907-4.94336a1.0001 1.0001 0 0 0 -.283203-.564453l-.703126-.699219-4.328124-4.322265v-.679688c-.0001-.92292-.770987-1.689353-1.691407-1.689453h-2.064453l-6.4140624-6.4023438c-.31838-.3181599-.7460356-.4960137-1.1972656-.4960937h-.6816406l-2.2675782-2.26367188c-.32191-.32168998-.7531756-.49407062-1.1972656-.49414062zm.7480469 2.0585938c.2873127-.058412.5683594.0996093.5683594.0996093l2.5625 2.5566407c.12964.1294.3050112.2030849.4882813.203125l.875.2207031 6.5058592 6.4941401c.06862.953761.069735 1.39991-.169922 1.607422-.239656.207513-.720182.175782-1.617187.175782l-6.5058596-6.494141-.265625-.8945312c-.00004-.1829401-.073455-.3589213-.203125-.4882813l-2.5605469-2.5566406c0 0-.0832531-.106785-.1191406-.2578125-.0358875-.1510275-.0256406-.3457544.1621093-.5214844.0869501-.0813825.183526-.1250606.2792969-.1445312z" fill="#fff" overflow="visible" transform="translate(346.23242 654.49916)"/><path d="m351.89648 662.97904l2.89851-2.59987 5.84473 5.74562-.26516 2.51907-2.3423.48613z" fill="#fff"/><path d="m350.74804 660.53041l1.46875-.0312 7.34375 7.46875-2.15625.4375-4.23437-4.07813-2.40625-2.28125z" fill="#8f8f8f" fill-opacity=".5"/><path d="m347.92347 655.49916c-.38164.00005-.69102.30886-.69105.68982v1.37962c.00003.18294.0728.35837.20245.48771l2.56175 2.55716v1.094c.00003.18294.0728.35837.20245.48771l6.70804 6.69604v2.47362c.00003.38096.30941.68977.69105.68981h1.09597l4.73052 4.72205.59541.59436c3.98133.71499 5.62957-1.64128 5.12348-5.11432l-.70339-.70213-4.62254-4.61427v-1.094c-.00004-.38095-.30941-.68977-.69105-.68981h-2.47806l-6.70805-6.69603c-.1295-.12941-.30532-.20206-.48858-.20209h-1.09597l-2.56175-2.55716c-.1295-.12941-.30531-.20206-.48858-.20209zm.47008 1.20285c.3478-.32553.84685-.0442.84685-.0442l2.56174 2.55715c.12964.1294.30533.20206.4886.2021l.87499.22097 6.50558 6.49393c.13724 1.90752.007 1.78381-1.78701 1.78381l-6.50558-6.49393-.26517-.89513c-.00004-.18294-.0728-.35837-.20247-.48773l-2.56173-2.55714c0 0-.3313-.42838.0442-.77984z" overflow="visible"/><path d="m363.56836 668.22266l-.70703.70703c1.5343 1.35775 4.39712 3.91196 4.29809 4.69486.099 1.21711-.94516 1.95194.40894 1.57031.61785-.61785.66326-1.6504.49609-2.15189-.16716-.50149-.49609-.82031-.49609-.82031z" fill="#fff" overflow="visible"/></g></svg>
@@ -0,0 +1 @@
<svg height="24" viewBox="0 0 24.000001 24.000001" width="24" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 -1028.3622)"><path d="m2.0000002 1030.3622h20.000002v14.000018h-20.000002z" fill="none" stroke="#fff" stroke-linejoin="round" stroke-width="1.50000009"/><path d="m2 1030.8613h-.75v1.5h1.5v-1.25h.75v-1.5h-1.5zm3 .25h1.5v-1.5h-1.5zm3 0h1.5v-1.5h-1.5zm3 0h1.5v-1.5h-1.5zm3 0h1.5v-1.5h-1.5zm3 0h1.5v-1.5h-1.5zm3 0h1.5v-1.5h-1.5zm1.25 1.75h1.5v-1.5h-1.5zm-20 2.5h1.5v-1.5h-1.5zm20 .5h1.5v-1.5h-1.5zm-20 2.5h1.5v-1.5h-1.5zm20 .5h1.5v-1.5h-1.5zm-20 2.5h1.5v-1.5h-1.5zm20 .5h1.5v-1.5h-1.5zm-20 2.5h1.5v-1.5h-1.5zm19.986344.7444c.5078.011 1.015731.015 1.523606.021-.01201-.5884-.0099-1.177-.0099-1.7655h-1.5c.006.5816-.003 1.163-.01366 1.7444zm-17.736344.01h1.5v-1.5h-1.5zm3 0h1.5v-1.5h-1.5zm3 0h1.5v-1.5h-1.5zm3 0h1.5v-1.5h-1.5zm3 0h1.5v-1.5h-1.5zm3 0h1.5v-1.5h-1.5z" overflow="visible"/><g fill-rule="evenodd" transform="translate(1.6470919 1.9701241)"><path d="m1.5 1030.7852c-1.02853767 0-1.77113729 1.1039-1.390625 2.0566a1.0001 1.0001 0 0 0 0 0l6.8886719 17.0937a1.0001 1.0001 0 0 0 .00195 0c .4398477 1.0801 2.0534622 1.2154 2.6660156.2227l1.6992184-2.7481 4.080078 4.4551c.562448.6188 1.558284.6482 2.15625.066l2.052735-2c .579056-.563.600354-1.5153.04687-2.1035a1.0001 1.0001 0 0 0 -.002 0l-4.074219-4.3105 2.513672-1.0899c1.087878-.4687 1.163804-2.1256.125-2.6933l-16.0429689-8.7695a1.0001 1.0001 0 0 0 -.00391 0c-.222982-.1187-.4699316-.1793-.716738-.1793z" fill="#fff" overflow="visible" transform="translate(.79549518 -1.8561554)"/><path d="m2.2954952 1029.929c-.3530058 0-.5938095.3577-.4628906.6855l6.8886718 17.0938c.1543448.379.6737665.4223.8886719.074l2.3945307-3.875 4.976563 5.4355c.19025.2093.516057.2192.71875.022l2.052734-2c .195733-.1903.20269-.5024.01563-.7012l-5.054687-5.3476 3.824219-1.6582c.383141-.1651.407522-.6992.04102-.8985l-16.0429784-8.7698c-.073736-.04-.1563493-.061-.2402344-.061z" overflow="visible"/><path d="m4.8119613 1033.0805l9.9835337 5.4255" fill="#ccc" stroke="#b3b3b3" stroke-linecap="round"/></g></g></svg>
@@ -0,0 +1 @@
<svg height="24" viewBox="0 0 24.000001 24.000001" width="24" xmlns="http://www.w3.org/2000/svg"><g transform="matrix(.9565239 0 0 .95545692 .65024315 -981.790403)"><path d="m15.139163 1041.2225c-.392993 1.7467-2.217698 2.2202-2.217698 2.2202l7.392464 7.4007 2.217697-2.2201z" fill="#fff" fill-rule="evenodd" stroke="#000" stroke-linejoin="round" stroke-width="1.56905377"/><path d="m1.1597145 1037.5041c0 4.4746 3.6230358 8.1021 8.0922782 8.1021 4.4692413 0 8.0922783-3.6275 8.0922783-8.1021 0-4.4747-3.623037-8.1023-8.0922783-8.1023-4.4692424 0-8.0922782 3.6276-8.0922782 8.1023z" style="fill:#fff;stroke:#000;stroke-width:1.56905373;stroke-linecap:round;stroke-linejoin:round;stroke-dashoffset:7"/><g fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.9000001" transform="translate(.1018275 .3826)"><path d="m9.1501655 1032.8214v8.6" overflow="visible"/><path d="m13.450165 1037.1214h-8.5999995" overflow="visible"/></g><path d="m18.377087 1044.1893l-2-2-2.000001 2 2.000001 2z" fill-rule="evenodd"/></g></svg>
@@ -0,0 +1 @@
<svg height="24" viewBox="0 0 24.000001 24.000001" width="24" xmlns="http://www.w3.org/2000/svg"><g transform="matrix(.9565239 0 0 .95545692 .65024315 -981.790403)"><path d="m15.139163 1041.2225c-.392993 1.7467-2.217698 2.2202-2.217698 2.2202l7.392464 7.4007 2.217697-2.2201z" fill="#fff" fill-rule="evenodd" stroke="#000" stroke-linejoin="round" stroke-width="1.56905377"/><path d="m1.1597145 1037.5041c0 4.4746 3.6230358 8.1021 8.0922782 8.1021 4.4692413 0 8.0922783-3.6275 8.0922783-8.1021 0-4.4747-3.623037-8.1023-8.0922783-8.1023-4.4692424 0-8.0922782 3.6276-8.0922782 8.1023z" style="fill:#fff;stroke:#000;stroke-width:1.56905373;stroke-linecap:round;stroke-linejoin:round;stroke-dashoffset:7"/><path d="m13.551993 1037.504h-8.6" style="overflow:visible;fill:none;stroke:#000;stroke-width:2.9000001;stroke-linecap:round;stroke-linejoin:round"/><path d="m18.377087 1044.1893l-2-2-2.000001 2 2.000001 2z" fill-rule="evenodd"/></g></svg>
@@ -345,6 +345,26 @@ Returns the path to the default theme directory.
:rtype: QIcon
%End

enum Cursor
{
ZoomIn,
ZoomOut,
Identify,
CrossHair,
CapturePoint,
Select,
Sampler,
};

static QCursor getThemeCursor( const Cursor &cursor );
%Docstring
Helper to get a theme cursor. It will fall back to the
default theme if the active theme does not have the required icon.
Cursors are automatically scaled to look like a 16px cursor on 96dpi
screens.
:rtype: QCursor
%End

static QPixmap getThemePixmap( const QString &name );
%Docstring
Helper to get a theme icon as a pixmap. It will fall back to the
@@ -57,7 +57,6 @@
#include "qgsproject.h"
#include "qgsmapcanvas.h"
#include "qgsmessageviewer.h"
#include "qgscursors.h"
#include "qgsmaplayeractionregistry.h"
#include "qgsgeometry.h"
#include "qgspaperitem.h"
@@ -161,7 +161,6 @@ Q_GUI_EXPORT extern int qt_defaultDpiX();
#include "qgscoordinatetransform.h"
#include "qgscoordinateutils.h"
#include "qgscredentialdialog.h"
#include "qgscursors.h"
#include "qgscustomdrophandler.h"
#include "qgscustomization.h"
#include "qgscustomlayerorderwidget.h"
@@ -16,7 +16,6 @@
#include "qgsapplication.h"
#include "qgisapp.h"
#include "qgsattributetabledialog.h"
#include "qgscursors.h"
#include "qgsdistancearea.h"
#include "qgsfeature.h"
#include "qgsfeaturestore.h"
@@ -50,14 +49,9 @@ QgsMapToolIdentifyAction::QgsMapToolIdentifyAction( QgsMapCanvas *canvas )
: QgsMapToolIdentify( canvas )
{
mToolName = tr( "Identify" );
// set cursor
QPixmap myIdentifyQPixmap = QPixmap( ( const char ** ) identify_cursor );
mCursor = QCursor( myIdentifyQPixmap, 1, 1 );

setCursor( QgsApplication::getThemeCursor( QgsApplication::Cursor::Identify ) );
connect( this, &QgsMapToolIdentify::changedRasterResults, this, &QgsMapToolIdentifyAction::handleChangedRasterResults );

mIdentifyMenu->setAllowMultipleReturn( true );

QgsMapLayerAction *attrTableAction = new QgsMapLayerAction( tr( "Show attribute table" ), mIdentifyMenu, QgsMapLayer::VectorLayer, QgsMapLayerAction::MultipleFeatures );
connect( attrTableAction, &QgsMapLayerAction::triggeredForFeatures, this, &QgsMapToolIdentifyAction::showAttributeTable );
identifyMenu()->addCustomAction( attrTableAction );
@@ -20,7 +20,6 @@
#include "qgsmapcanvas.h"
#include "qgsmaptopixel.h"
#include "qgsvectorlayer.h"
#include "qgscursors.h"
#include "qgsgeometry.h"
#include "qgspointxy.h"
#include "qgis.h"
@@ -34,8 +33,7 @@ QgsMapToolSelectFeatures::QgsMapToolSelectFeatures( QgsMapCanvas *canvas )
, mDragging( false )
{
mToolName = tr( "Select features" );
QPixmap mySelectQPixmap = QPixmap( ( const char ** ) select_cursor );
mCursor = QCursor( mySelectQPixmap, 1, 1 );
setCursor( QgsApplication::getThemeCursor( QgsApplication::Cursor::Select ) );
mRubberBand = nullptr;
mFillColor = QColor( 254, 178, 76, 63 );
mStrokeColor = QColor( 254, 58, 29, 100 );
@@ -24,7 +24,6 @@
#include "qgsexception.h"
#include "qgsmeasuredialog.h"
#include "qgsmeasuretool.h"
#include "qgscursors.h"
#include "qgsmessagelog.h"
#include "qgssettings.h"

@@ -40,8 +39,7 @@ QgsMeasureTool::QgsMeasureTool( QgsMapCanvas *canvas, bool measureArea )
mRubberBand = new QgsRubberBand( canvas, mMeasureArea ? QgsWkbTypes::PolygonGeometry : QgsWkbTypes::LineGeometry );
mRubberBandPoints = new QgsRubberBand( canvas, QgsWkbTypes::PointGeometry );

QPixmap myCrossHairQPixmap = QPixmap( ( const char ** ) cross_hair_cursor );
mCursor = QCursor( myCrossHairQPixmap, 8, 8 );
setCursor( QgsApplication::getThemeCursor( QgsApplication::Cursor::CrossHair ) );

mDone = true;
// Append point we will move

0 comments on commit 62ff88a

Please sign in to comment.
You can’t perform that action at this time.