|
|
@ -13,6 +13,7 @@ Item { |
|
|
|
property bool yAxisThrottle: false ///< true: yAxis used for throttle, range [1,0], positive value are stick up |
|
|
|
property bool yAxisThrottle: false ///< true: yAxis used for throttle, range [1,0], positive value are stick up |
|
|
|
property real xPositionDelta: 0 ///< Amount to move the control on x axis |
|
|
|
property real xPositionDelta: 0 ///< Amount to move the control on x axis |
|
|
|
property real yPositionDelta: 0 ///< Amount to move the control on y axis |
|
|
|
property real yPositionDelta: 0 ///< Amount to move the control on y axis |
|
|
|
|
|
|
|
property bool throttle: false |
|
|
|
|
|
|
|
|
|
|
|
property real _centerXY: width / 2 |
|
|
|
property real _centerXY: width / 2 |
|
|
|
property bool _processTouchPoints: false |
|
|
|
property bool _processTouchPoints: false |
|
|
@ -83,13 +84,69 @@ Item { |
|
|
|
smooth: true |
|
|
|
smooth: true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QGCColoredImage { |
|
|
|
|
|
|
|
color: lightColors ? "white" : "black" |
|
|
|
|
|
|
|
visible: throttle |
|
|
|
|
|
|
|
height: ScreenTools.defaultFontPixelHeight |
|
|
|
|
|
|
|
width: height |
|
|
|
|
|
|
|
sourceSize.height: height |
|
|
|
|
|
|
|
mipmap: true |
|
|
|
|
|
|
|
fillMode: Image.PreserveAspectFit |
|
|
|
|
|
|
|
source: "/res/clockwise-arrow.svg" |
|
|
|
|
|
|
|
anchors.right: parent.right |
|
|
|
|
|
|
|
anchors.rightMargin: ScreenTools.defaultFontPixelWidth |
|
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QGCColoredImage { |
|
|
|
|
|
|
|
color: lightColors ? "white" : "black" |
|
|
|
|
|
|
|
visible: throttle |
|
|
|
|
|
|
|
height: ScreenTools.defaultFontPixelHeight |
|
|
|
|
|
|
|
width: height |
|
|
|
|
|
|
|
sourceSize.height: height |
|
|
|
|
|
|
|
mipmap: true |
|
|
|
|
|
|
|
fillMode: Image.PreserveAspectFit |
|
|
|
|
|
|
|
source: "/res/counter-clockwise-arrow.svg" |
|
|
|
|
|
|
|
anchors.left: parent.left |
|
|
|
|
|
|
|
anchors.leftMargin: ScreenTools.defaultFontPixelWidth |
|
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QGCColoredImage { |
|
|
|
|
|
|
|
color: lightColors ? "white" : "black" |
|
|
|
|
|
|
|
visible: throttle |
|
|
|
|
|
|
|
height: ScreenTools.defaultFontPixelHeight |
|
|
|
|
|
|
|
width: height |
|
|
|
|
|
|
|
sourceSize.height: height |
|
|
|
|
|
|
|
mipmap: true |
|
|
|
|
|
|
|
fillMode: Image.PreserveAspectFit |
|
|
|
|
|
|
|
source: "/res/chevron-up.svg" |
|
|
|
|
|
|
|
anchors.top: parent.top |
|
|
|
|
|
|
|
anchors.topMargin: ScreenTools.defaultFontPixelWidth |
|
|
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QGCColoredImage { |
|
|
|
|
|
|
|
color: lightColors ? "white" : "black" |
|
|
|
|
|
|
|
visible: throttle |
|
|
|
|
|
|
|
height: ScreenTools.defaultFontPixelHeight |
|
|
|
|
|
|
|
width: height |
|
|
|
|
|
|
|
sourceSize.height: height |
|
|
|
|
|
|
|
mipmap: true |
|
|
|
|
|
|
|
fillMode: Image.PreserveAspectFit |
|
|
|
|
|
|
|
source: "/res/chevron-down.svg" |
|
|
|
|
|
|
|
anchors.bottom: parent.bottom |
|
|
|
|
|
|
|
anchors.bottomMargin: ScreenTools.defaultFontPixelWidth |
|
|
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
Rectangle { |
|
|
|
anchors.margins: parent.width / 4 |
|
|
|
anchors.margins: parent.width / 4 |
|
|
|
anchors.fill: parent |
|
|
|
anchors.fill: parent |
|
|
|
radius: width / 2 |
|
|
|
radius: width / 2 |
|
|
|
border.color: mapPal.thumbJoystick |
|
|
|
border.color: mapPal.thumbJoystick |
|
|
|
border.width: 2 |
|
|
|
border.width: 2 |
|
|
|
color: "transparent" |
|
|
|
color: Qt.rgba(0,0,0,0) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
Rectangle { |
|
|
@ -97,13 +154,15 @@ Item { |
|
|
|
radius: width / 2 |
|
|
|
radius: width / 2 |
|
|
|
border.color: mapPal.thumbJoystick |
|
|
|
border.color: mapPal.thumbJoystick |
|
|
|
border.width: 2 |
|
|
|
border.width: 2 |
|
|
|
color: "transparent" |
|
|
|
color: Qt.rgba(0,0,0,0) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
Rectangle { |
|
|
|
width: hatWidth |
|
|
|
width: hatWidth |
|
|
|
height: hatWidth |
|
|
|
height: hatWidth |
|
|
|
radius: hatWidthHalf |
|
|
|
radius: hatWidthHalf |
|
|
|
|
|
|
|
border.color: lightColors ? "white" : "black" |
|
|
|
|
|
|
|
border.width: 1 |
|
|
|
color: mapPal.thumbJoystick |
|
|
|
color: mapPal.thumbJoystick |
|
|
|
x: stickPositionX - hatWidthHalf |
|
|
|
x: stickPositionX - hatWidthHalf |
|
|
|
y: stickPositionY - hatWidthHalf |
|
|
|
y: stickPositionY - hatWidthHalf |
|
|
|