Browse Source

Changes on Compass COG cursor

QGC4.4
Pierre TILAK 6 years ago
parent
commit
b2082edb8b
  1. 1
      qgcimages.qrc
  2. 53
      src/FlightMap/Images/cOGPointer.svg
  3. 37
      src/FlightMap/Widgets/QGCCompassWidget.qml

1
qgcimages.qrc

@ -69,6 +69,7 @@ @@ -69,6 +69,7 @@
<file alias="CogWheel.svg">src/MissionManager/CogWheel.svg</file>
<file alias="compassInstrumentArrow.svg">src/FlightMap/Images/compassInstrumentArrow.svg</file>
<file alias="compassInstrumentDial.svg">src/FlightMap/Images/compassInstrumentDial.svg</file>
<file alias="cOGPointer.svg">src/FlightMap/Images/cOGPointer.svg</file>
<file alias="Connect.svg">src/ui/toolbar/Images/Connect.svg</file>
<file alias="crossHair.svg">src/FlightMap/Images/crossHair.svg</file>
<file alias="DatalinkLoss.svg">src/AutoPilotPlugins/PX4/Images/DatalinkLoss.svg</file>

53
src/FlightMap/Images/cOGPointer.svg

@ -0,0 +1,53 @@ @@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<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="Layer_3"
x="0px"
y="0px"
viewBox="0 0 288 288"
enable-background="new 0 0 288 288"
xml:space="preserve"
inkscape:version="0.91 r13725"
sodipodi:docname="cOGPointer .svg"><metadata
id="metadata11"><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="defs9" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1855"
inkscape:window-height="1056"
id="namedview7"
showgrid="false"
inkscape:zoom="2.3177389"
inkscape:cx="103.82028"
inkscape:cy="155.36757"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:current-layer="Layer_3" /><polygon
points="133.2,17.4 154.8,17.4 144,46.2 "
id="polygon3"
transform="matrix(-1,0,0,-1,288,104.6)"
style="fill:#008000" /><rect
x="135"
y="270"
fill="none"
width="18"
height="18"
id="rect5" /></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

37
src/FlightMap/Widgets/QGCCompassWidget.qml

@ -59,6 +59,21 @@ Item { @@ -59,6 +59,21 @@ Item {
visible: false
Image {
id: cOGPointer
source: _showCOGAngleCompass ? "/qmlimages/cOGPointer.svg" : ""
mipmap: true
fillMode: Image.PreserveAspectFit
anchors.fill: parent
sourceSize.height: parent.height
transform: Rotation {
origin.x: cOGPointer.width / 2
origin.y: cOGPointer.height / 2
angle: _courseOverGround - _heading
}
}
Image {
id: pointer
width: size * 0.65
source: vehicle ? vehicle.vehicleImageCompass : ""
@ -99,28 +114,6 @@ Item { @@ -99,28 +114,6 @@ Item {
}
}
Image {
id: cOGPointer
source: _showCOGAngleCompass ? "/qmlimages/attitudePointer.svg" : ""
mipmap: true
fillMode: Image.PreserveAspectFit
anchors.fill: parent
sourceSize.height: parent.height
onVisibleChanged: {
if (visible)
console.log("is being displayed")
else
console.log("is being hidden")
}
transform: Rotation {
origin.x: cOGPointer.width / 2
origin.y: cOGPointer.height / 2
angle: _courseOverGround - _heading
}
}
Rectangle {
anchors.centerIn: parent

Loading…
Cancel
Save