Browse Source

Add external Zoom buttons

QGC4.4
Stefan Dunca 6 years ago
parent
commit
29e7d8dd3c
  1. 9
      custom-example/res/CustomCameraControl.qml

9
custom-example/res/CustomCameraControl.qml

@ -161,15 +161,20 @@ Item {
sourceSize.height: height sourceSize.height: height
} }
} }
// Thermal with color-map // Thermal with color-map
QGCHoverButton { QGCHoverButton {
width: buttonSize width: buttonSize
height: width height: width
checkable: true checkable: true
radius: buttonRadius radius: buttonRadius
function isDesiredThermalPalette(name) {
return name === 'Rainbow';
}
onClicked: { onClicked: {
if(_irPaletteFact) { if(_irPaletteFact) {
var entryIdx = _irPaletteFact.enumStrings.find("Rainbow") var entryIdx = _irPaletteFact.enumStrings.find(isDesiredThermalPalette)
if(entryIdx !== undefined) { if(entryIdx !== undefined) {
_irPaletteFact.value = entryIdx; _irPaletteFact.value = entryIdx;
} }
@ -421,7 +426,7 @@ Item {
ZoomControl { ZoomControl {
id: zoomControl id: zoomControl
visible: _hasZoom visible: _hasZoom
mainColor: qgcPal.window mainColor: qgcPal.windowShade
contentColor: qgcPal.text contentColor: qgcPal.text
fontPointSize: ScreenTools.defaultFontPointSize * 1.25 fontPointSize: ScreenTools.defaultFontPointSize * 1.25
zoomLevelVisible: false zoomLevelVisible: false

Loading…
Cancel
Save