Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
f63b0db6
Commit
f63b0db6
authored
May 07, 2017
by
Don Gagne
Committed by
GitHub
May 07, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5105 from DonLakeFlyer/RallyPointDrag
Rally point drag
parents
05ad4627
f8c906c0
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
21 deletions
+31
-21
GeoFenceEditor.qml
src/PlanView/GeoFenceEditor.qml
+1
-1
RallyPointEditorHeader.qml
src/PlanView/RallyPointEditorHeader.qml
+1
-1
RallyPointItemEditor.qml
src/PlanView/RallyPointItemEditor.qml
+1
-1
RallyPointMapVisuals.qml
src/PlanView/RallyPointMapVisuals.qml
+20
-10
QGCRadioButton.qml
src/QmlControls/QGCRadioButton.qml
+8
-8
No files found.
src/PlanView/GeoFenceEditor.qml
View file @
f63b0db6
...
@@ -30,7 +30,7 @@ QGCFlickable {
...
@@ -30,7 +30,7 @@ QGCFlickable {
width
:
parent
.
width
width
:
parent
.
width
height
:
geoFenceItems
.
y
+
geoFenceItems
.
height
+
(
_margin
*
2
)
height
:
geoFenceItems
.
y
+
geoFenceItems
.
height
+
(
_margin
*
2
)
radius
:
_radius
radius
:
_radius
color
:
qgcPal
.
buttonHighlight
color
:
qgcPal
.
missionItemEditor
QGCLabel
{
QGCLabel
{
id
:
geoFenceLabel
id
:
geoFenceLabel
...
...
src/PlanView/RallyPointEditorHeader.qml
View file @
f63b0db6
...
@@ -20,7 +20,7 @@ QGCFlickable {
...
@@ -20,7 +20,7 @@ QGCFlickable {
width
:
parent
.
width
width
:
parent
.
width
height
:
innerEditorRect
.
y
+
innerEditorRect
.
height
+
(
_margin
*
2
)
height
:
innerEditorRect
.
y
+
innerEditorRect
.
height
+
(
_margin
*
2
)
radius
:
_radius
radius
:
_radius
color
:
qgcPal
.
buttonHighlight
color
:
qgcPal
.
missionItemEditor
QGCLabel
{
QGCLabel
{
id
:
editorLabel
id
:
editorLabel
...
...
src/PlanView/RallyPointItemEditor.qml
View file @
f63b0db6
...
@@ -11,7 +11,7 @@ import QGroundControl.Palette 1.0
...
@@ -11,7 +11,7 @@ import QGroundControl.Palette 1.0
Rectangle
{
Rectangle
{
id
:
root
id
:
root
height
:
_currentItem
?
valuesRect
.
y
+
valuesRect
.
height
+
(
_margin
*
2
)
:
titleBar
.
y
-
titleBar
.
height
+
_margin
height
:
_currentItem
?
valuesRect
.
y
+
valuesRect
.
height
+
(
_margin
*
2
)
:
titleBar
.
y
-
titleBar
.
height
+
_margin
color
:
_currentItem
?
qgcPal
.
buttonHighlight
:
qgcPal
.
windowShade
color
:
_currentItem
?
qgcPal
.
missionItemEditor
:
qgcPal
.
windowShade
radius
:
_radius
radius
:
_radius
property
var
rallyPoint
///< RallyPoint object associated with editor
property
var
rallyPoint
///< RallyPoint object associated with editor
...
...
src/PlanView/RallyPointMapVisuals.qml
View file @
f63b0db6
...
@@ -40,6 +40,19 @@ Item {
...
@@ -40,6 +40,19 @@ Item {
_rallyPointsComponent
.
destroy
()
_rallyPointsComponent
.
destroy
()
}
}
Component
{
id
:
dragAreaComponent
MissionItemIndicatorDrag
{
itemCoordinate
:
rallyPointObject
.
coordinate
visible
:
rallyPointObject
==
myRallyPointController
.
currentRallyPoint
property
var
rallyPointObject
onItemCoordinateChanged
:
rallyPointObject
.
coordinate
=
itemCoordinate
}
}
Component
{
Component
{
id
:
rallyPointComponent
id
:
rallyPointComponent
...
@@ -72,17 +85,14 @@ Item {
...
@@ -72,17 +85,14 @@ Item {
property
var
_visuals
:
[
]
property
var
_visuals
:
[
]
Component.onCompleted
:
{
Component.onCompleted
:
{
var
rallyPoint
=
rallyPointComponent
.
createObject
(
map
)
var
rallyPointIndicator
=
rallyPointComponent
.
createObject
(
map
)
rallyPoint
.
coordinate
=
Qt
.
binding
(
function
()
{
return
object
.
coordinate
})
rallyPointIndicator
.
coordinate
=
Qt
.
binding
(
function
()
{
return
object
.
coordinate
})
rallyPoint
.
rallyPointObject
=
Qt
.
binding
(
function
()
{
return
object
})
rallyPointIndicator
.
rallyPointObject
=
Qt
.
binding
(
function
()
{
return
object
})
map
.
addMapItem
(
rallyPoint
)
map
.
addMapItem
(
rallyPointIndicator
)
_visuals
.
push
(
rallyPoint
)
_visuals
.
push
(
rallyPointIndicator
)
/*
var dragArea = dragAreaComponent.createObject(map, { "itemIndicator": dragHandle, "itemCoordinate": object.coordinate })
var
dragArea
=
dragAreaComponent
.
createObject
(
map
,
{
"
itemIndicator
"
:
rallyPointIndicator
,
"
rallyPointObject
"
:
object
})
dragArea.polygonVertex = Qt.binding(function() { return index })
_visuals.push(dragHandle)
_visuals
.
push
(
dragArea
)
_visuals
.
push
(
dragArea
)
*/
}
}
Component.onDestruction
:
{
Component.onDestruction
:
{
...
...
src/QmlControls/QGCRadioButton.qml
View file @
f63b0db6
...
@@ -9,8 +9,7 @@ RadioButton {
...
@@ -9,8 +9,7 @@ RadioButton {
property
var
color
:
qgcPal
.
text
///< Text color
property
var
color
:
qgcPal
.
text
///< Text color
property
int
textStyle
:
Text
.
Normal
property
int
textStyle
:
Text
.
Normal
property
color
textStyleColor
:
qgcPal
.
text
property
color
textStyleColor
:
qgcPal
.
text
property
var
qgcPal
:
QGCPalette
{
colorGroupEnabled
:
enabled
}
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
enabled
}
style
:
RadioButtonStyle
{
style
:
RadioButtonStyle
{
label
:
Item
{
label
:
Item
{
...
@@ -47,7 +46,8 @@ RadioButton {
...
@@ -47,7 +46,8 @@ RadioButton {
indicator
:
Rectangle
{
indicator
:
Rectangle
{
width
:
ScreenTools
.
radioButtonIndicatorSize
width
:
ScreenTools
.
radioButtonIndicatorSize
height
:
width
height
:
width
border.color
:
qgcPal
.
text
color
:
"
white
"
border.color
:
control
.
qgcPal
.
text
antialiasing
:
true
antialiasing
:
true
radius
:
height
/
2
radius
:
height
/
2
...
@@ -56,8 +56,8 @@ RadioButton {
...
@@ -56,8 +56,8 @@ RadioButton {
width
:
Math
.
round
(
parent
.
width
*
0.5
)
width
:
Math
.
round
(
parent
.
width
*
0.5
)
height
:
width
height
:
width
antialiasing
:
true
antialiasing
:
true
radius
:
height
/
2
radius
:
height
/
2
color
:
qgcPal
.
text
color
:
"
black
"
opacity
:
control
.
checked
?
(
control
.
enabled
?
1
:
0.5
)
:
0
opacity
:
control
.
checked
?
(
control
.
enabled
?
1
:
0.5
)
:
0
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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