Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
deeecc74
Commit
deeecc74
authored
Nov 03, 2015
by
dogmaphobic
Browse files
Adding a confirmation dialog for when arming vehicle.
parent
c6b66c46
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ui/toolbar/MainToolBarIndicators.qml
View file @
deeecc74
...
...
@@ -25,6 +25,7 @@ import QtQuick 2.5
import
QtQuick
.
Controls
1.2
import
QtGraphicalEffects
1.0
import
QtQuick
.
Controls
.
Styles
1.2
import
QtQuick
.
Dialogs
1.1
import
QGroundControl
1.0
import
QGroundControl
.
Controls
1.0
...
...
@@ -441,7 +442,19 @@ Row {
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
armDialog
.
visible
=
true
}
}
MessageDialog
{
id
:
armDialog
visible
:
false
icon
:
StandardIcon
.
Warning
standardButtons
:
StandardButton
.
Yes
|
StandardButton
.
No
title
:
activeVehicle
.
armed
?
"
Disarming Vehicle
"
:
"
Arming Vehicle
"
text
:
activeVehicle
.
armed
?
"
Do you want to disarm? This will cut power to all motors.
"
:
"
Do you want to arm? This will enable all motors.
"
onYes
:
{
activeVehicle
.
armed
=
!
activeVehicle
.
armed
armDialog
.
visible
=
false
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment