QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
APMSubMotorDisplay.qml
Go to the documentation of this file.
1import QtQuick
2
3import QGroundControl
4import QGroundControl.Controls
5import QGroundControl.FactControls
6
7Item {
8 id: root
9
10 property var frameType: 0
11 // TODO need a better class for getting vehicle parameters into qml?
12 // according to comments in FactPanelController.h, this is not the intended use case
13
14 function getImage() {
15 switch (frameType) {
16 case 0:
17 return "qrc:///qmlimages/Frames/BlueROV1.png"
18 case 1:
19 return "qrc:///qmlimages/Frames/Vectored.png"
20 case 2:
21 return "qrc:///qmlimages/Frames/Vectored6DOF.png"
22 case 4:
23 return "qrc:///qmlimages/Frames/SimpleROV-3.png"
24 case 5:
25 return "qrc:///qmlimages/Frames/SimpleROV-4.png"
26 }
27 return ""
28 }
29
30 Component.onCompleted: {
31 console.log(getImage())
32 subImage.source = getImage()
33 }
34
35 Image {
36 id: subImage
37 anchors.margins: ScreenTools.defaultFontPixelWidth
38 anchors.fill: parent
39 fillMode: Image.PreserveAspectFit
40 smooth: true
41 mipmap: true
42 }
43} // Item