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
368501b3
Commit
368501b3
authored
Mar 23, 2016
by
Don Gagne
Browse files
Merge pull request #3063 from DonLakeFlyer/ConfirmSlider
Confirm slider: Remove cancel button support
parents
39b220f8
a383c8a4
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/FlightDisplay/FlightDisplayViewMap.qml
View file @
368501b3
...
...
@@ -112,7 +112,7 @@ FlightMap {
// GoTo here waypoint
MapQuickItem
{
coordinate
:
_gotoHereCoordinate
visible
:
_
v
ehicle
.
guidedMode
&&
_gotoHereCoordinate
.
isValid
visible
:
_
activeVehicle
&&
_activeV
ehicle
.
guidedMode
&&
_gotoHereCoordinate
.
isValid
z
:
QGroundControl
.
zOrderMapItems
anchorPoint.x
:
sourceItem
.
width
/
2
anchorPoint.y
:
sourceItem
.
height
/
2
...
...
src/FlightDisplay/FlightDisplayViewWidgets.qml
View file @
368501b3
...
...
@@ -429,41 +429,6 @@ Item {
}
}
}
/*
Row {
id: guidedModeConfirm
anchors.margins: _margins
anchors.top: parent.top
anchors.left: parent.left
spacing: _margins
visible: false
QGCLabel {
text: "Confirm " + _guidedModeBar.confirmText + " :"
anchors.verticalCenter: parent.verticalCenter
}
QGCButton {
text: "Yes"
onClicked: {
guidedModeConfirm.visible = false
guidedModeButtons.visible = true
_guidedModeBar.actionConfirmed()
altitudeSlider.visible = false
}
}
QGCButton {
text: "No"
onClicked: {
guidedModeConfirm.visible = false
guidedModeButtons.visible = true
altitudeSlider.visible = false
_flightMap._gotoHereCoordinate = QtPositioning.coordinate()
}
}
}*/
}
// Rectangle - Guided mode buttons
MouseArea
{
...
...
@@ -480,7 +445,6 @@ Item {
anchors.top
:
_guidedModeBar
.
top
anchors.bottom
:
_guidedModeBar
.
bottom
anchors.horizontalCenter
:
parent
.
horizontalCenter
//showReject: true
visible
:
false
z
:
QGroundControl
.
zOrderWidgets
...
...
src/QmlControls/SliderSwitch.qml
View file @
368501b3
...
...
@@ -16,7 +16,6 @@ Rectangle {
signal
reject
///< Action rejected
property
string
confirmText
///< Text for slider
property
bool
showReject
:
false
property
real
_border
:
4
property
real
_diameter
:
height
-
(
_border
*
2
)
...
...
@@ -52,14 +51,6 @@ Rectangle {
source
:
"
/res/ArrowRight.svg
"
}
/*
QGCLabel {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
text: ">"
}
*/
MouseArea
{
id
:
sliderDragArea
anchors.fill
:
parent
...
...
@@ -69,7 +60,7 @@ Rectangle {
drag.minimumX
:
_border
drag.maximumX
:
_maxXDrag
property
real
_maxXDrag
:
_root
.
width
-
(
(
_diameter
+
_border
)
*
(
showReject
?
2
:
1
))
property
real
_maxXDrag
:
_root
.
width
-
(
_diameter
+
_border
)
property
bool
dragActive
:
drag
.
active
onDragActiveChanged
:
{
...
...
@@ -82,39 +73,4 @@ Rectangle {
}
}
}
Rectangle
{
id
:
cancel
anchors.rightMargin
:
_border
anchors.right
:
parent
.
right
anchors.verticalCenter
:
parent
.
verticalCenter
height
:
_diameter
width
:
_diameter
radius
:
_diameter
/
2
color
:
qgcPal
.
windowShade
opacity
:
0.8
visible
:
showReject
Image
{
anchors.centerIn
:
parent
width
:
parent
.
width
*
0.8
height
:
parent
.
height
*
0.8
fillMode
:
Image
.
PreserveAspectFit
smooth
:
true
source
:
"
/res/cancel.svg
"
}
/*
QGCLabel {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
text: "X"
}
*/
MouseArea
{
anchors.fill
:
parent
onClicked
:
_root
.
reject
()
}
}
}
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