-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cee4f7f
commit 0bb79fd
Showing
6 changed files
with
98 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
<file alias="QGroundControl/FlightDisplay/CustomGuidedActionsController.qml">src/FlightDisplay/CustomGuidedActionsController.qml</file> | ||
<file alias="QGroundControl/FlightDisplay/FlyViewCustomLayer.qml">src/FlightDisplay/FlyViewCustomLayer.qml</file> | ||
<file alias="QGroundControl/FlightDisplay/FlyViewToolStripActionList.qml">src/FlightDisplay/FlyViewToolStripActionList.qml</file> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/**************************************************************************** | ||
* | ||
* (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org> | ||
* | ||
* QGroundControl is licensed according to the terms in the file | ||
* COPYING.md in the root of the source code directory. | ||
* | ||
****************************************************************************/ | ||
|
||
// Custom builds can override this file to add custom guided actions. | ||
|
||
import QtQml | ||
|
||
QtObject { | ||
readonly property int actionCustomButton: _guidedController.customActionStart + 0 | ||
|
||
readonly property string customButtonTitle: qsTr("Custom") | ||
|
||
readonly property string customButtonMessage: qsTr("Example of a custom action.") | ||
|
||
function customConfirmAction(actionCode, actionData, mapIndicator, confirmDialog) { | ||
switch (actionCode) { | ||
case actionCustomButton: | ||
confirmDialog.hideTrigger = true | ||
confirmDialog.title = customButtonTitle | ||
confirmDialog.message = customButtonMessage | ||
break | ||
default: | ||
return false // false = action not handled here | ||
} | ||
|
||
return true // true = action handled here | ||
} | ||
|
||
function customExecuteAction(actionCode, actionData, sliderOutputValue, optionCheckedode) { | ||
switch (actionCode) { | ||
case actionCustomButton: | ||
mainWindow.showMessageDialog("Custom Action", "Custom action executed.") | ||
break | ||
default: | ||
return false // false = action not handled here | ||
} | ||
|
||
return true // true = action handled here | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/**************************************************************************** | ||
* | ||
* (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org> | ||
* | ||
* QGroundControl is licensed according to the terms in the file | ||
* COPYING.md in the root of the source code directory. | ||
* | ||
****************************************************************************/ | ||
|
||
import QtQml.Models | ||
|
||
import QGroundControl | ||
import QGroundControl.Controls | ||
|
||
ToolStripActionList { | ||
id: _root | ||
|
||
signal displayPreFlightChecklist | ||
|
||
model: [ | ||
ToolStripAction { | ||
text: qsTr("Plan") | ||
iconSource: "/qmlimages/Plan.svg" | ||
onTriggered:{ | ||
mainWindow.showPlanView() | ||
viewer3DWindow.close() | ||
} | ||
}, | ||
PreFlightCheckListShowAction { onTriggered: displayPreFlightChecklist() }, | ||
GuidedActionTakeoff { }, | ||
GuidedActionLand { }, | ||
GuidedActionRTL { }, | ||
GuidedActionPause { }, | ||
GuidedActionActionList { }, | ||
GuidedToolStripAction { | ||
text: _guidedController._customController.customButtonTitle | ||
iconSource: "/res/gear-white.svg" | ||
visible: true | ||
enabled: true | ||
actionID: _guidedController._customController.actionCustomButton | ||
} | ||
] | ||
} |