Browse Source

Add zoom buttons

QGC4.4
Don Gagne 8 years ago
parent
commit
e36b3dd247
  1. 75
      src/MissionEditor/MissionEditor.qml

75
src/MissionEditor/MissionEditor.qml

@ -100,7 +100,7 @@ QGCView { @@ -100,7 +100,7 @@ QGCView {
property real toolbarHeight: qgcView.height - ScreenTools.availableHeight
property real rightPanelWidth: _rightPanelWidth
property real leftToolWidth: mapFitFunctions.x + mapFitFunctions.width
property real leftToolWidth: toolStrip.x + toolStrip.width
}
MissionController {
@ -810,46 +810,8 @@ QGCView { @@ -810,46 +810,8 @@ QGCView {
}
}
/*
FIXME: Need to put these back into ToolStrip
//-- Zoom Map In
RoundButton {
id: mapZoomPlus
anchors.topMargin: ScreenTools.defaultFontPixelHeight
anchors.top: mapTypeButton.bottom
anchors.left: mapTypeButton.left
visible: !ScreenTools.isTinyScreen && !ScreenTools.isShortScreen
buttonImage: "/qmlimages/ZoomPlus.svg"
lightBorders: _lightWidgetBorders
onClicked: {
if(editorMap)
editorMap.zoomLevel += 0.5
checked = false
}
}
//-- Zoom Map Out
RoundButton {
id: mapZoomMinus
anchors.topMargin: ScreenTools.defaultFontPixelHeight
anchors.top: mapZoomPlus.bottom
anchors.left: mapZoomPlus.left
visible: !ScreenTools.isTinyScreen && !ScreenTools.isShortScreen
buttonImage: "/qmlimages/ZoomMinus.svg"
lightBorders: _lightWidgetBorders
onClicked: {
if(editorMap)
editorMap.zoomLevel -= 0.5
checked = false
}
}
*/
ToolStrip {
id: toolStrip
anchors.leftMargin: ScreenTools.defaultFontPixelWidth
anchors.left: parent.left
anchors.topMargin: _toolButtonTopMargin
@ -857,9 +819,12 @@ QGCView { @@ -857,9 +819,12 @@ QGCView {
color: qgcPal.window
title: qsTr("Plan")
z: QGroundControl.zOrderWidgets
showAlternateIcon: [ false, false, _syncDropDownController.dirty, false, false ]
rotateImage: [ false, false, _syncDropDownController.syncInProgress, false, false ]
buttonEnabled: [ true, true, !_syncDropDownController.syncInProgress, true, true ]
showAlternateIcon: [ false, false, _syncDropDownController.dirty, false, false, false, false ]
rotateImage: [ false, false, _syncDropDownController.syncInProgress, false, false, false, false ]
buttonEnabled: [ true, true, !_syncDropDownController.syncInProgress, true, true, true, true ]
buttonVisible: [ true, true, true, true, true, _showZoom, _showZoom ]
property bool _showZoom: !ScreenTools.isShortScreen
model: [
{
@ -887,12 +852,34 @@ QGCView { @@ -887,12 +852,34 @@ QGCView {
name: "Map",
iconSource: "/qmlimages/MapType.svg",
dropPanelComponent: mapTypeDropPanel
},
{
name: "In",
iconSource: "/qmlimages/ZoomPlus.svg"
},
{
name: "Out",
iconSource: "/qmlimages/ZoomMinus.svg"
}
]
onClicked: {
if (index == 0) {
switch (index == 0) {
case 0:
_addWaypointOnClick = checked
break
case 5:
editorMap.zoomLevel += 0.5
break
case 6:
editorMap.zoomLevel -= 0.5
break
case 5:
editorMap.zoomLevel += 0.5
break
case 6:
editorMap.zoomLevel -= 0.5
break
}
}
}

Loading…
Cancel
Save