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
05852c3b
Commit
05852c3b
authored
Jun 01, 2016
by
Nate Weibley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweaks to mission editor model views. Helps to address #3456
parent
c29de21a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
51 deletions
+37
-51
MissionEditor.qml
src/MissionEditor/MissionEditor.qml
+3
-7
MissionItemStatus.qml
src/MissionEditor/MissionItemStatus.qml
+29
-39
SimpleItemEditor.qml
src/MissionEditor/SimpleItemEditor.qml
+1
-1
SurveyItemEditor.qml
src/MissionEditor/SurveyItemEditor.qml
+1
-1
MissionItemEditor.qml
src/QmlControls/MissionItemEditor.qml
+3
-3
No files found.
src/MissionEditor/MissionEditor.qml
View file @
05852c3b
...
...
@@ -285,7 +285,6 @@ QGCView {
if
(
addMissionItemsButton
.
checked
)
{
var
sequenceNumber
=
controller
.
insertSimpleMissionItem
(
coordinate
,
controller
.
visualItems
.
count
)
setCurrentItem
(
sequenceNumber
)
editorListView
.
positionViewAtIndex
(
editorListView
.
count
-
1
,
ListView
.
Contain
)
}
else
{
editorMap
.
mapClicked
(
coordinate
)
}
...
...
@@ -485,6 +484,8 @@ QGCView {
model
:
controller
.
visualItems
cacheBuffer
:
height
*
2
clip
:
true
highlightMoveDuration
:
250
delegate
:
MissionItemEditor
{
missionItem
:
object
...
...
@@ -499,11 +500,6 @@ QGCView {
controller
.
removeMissionItem
(
index
)
}
onInsert
:
{
var
sequenceNumber
=
controller
.
insertSimpleMissionItem
(
editorMap
.
center
,
i
)
setCurrentItem
(
sequenceNumber
)
}
onMoveHomeToMapCenter
:
controller
.
visualItems
.
get
(
0
).
coordinate
=
editorMap
.
center
Connections
{
...
...
@@ -511,7 +507,7 @@ QGCView {
onIsCurrentItemChanged
:
{
if
(
object
.
isCurrentItem
)
{
editorListView
.
positionViewAtIndex
(
index
,
ListView
.
Contain
)
editorListView
.
currentIndex
=
index
}
}
}
...
...
src/MissionEditor/MissionItemStatus.qml
View file @
05852c3b
...
...
@@ -74,53 +74,43 @@ Rectangle {
QGCLabel
{
text
:
_azimuthText
}
}
QGCFlickable
{
ListView
{
id
:
statusListView
model
:
missionItems
highlightMoveDuration
:
250
anchors.leftMargin
:
_margins
anchors.rightMargin
:
_margins
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
width
:
parent
.
width
-
valueGrid
.
width
-
(
_margins
*
2
)
contentWidth
:
graphRow
.
width
orientation
:
ListView
.
Horizontal
spacing
:
ScreenTools
.
defaultFontPixelWidth
*
ScreenTools
.
smallFontPointRatio
visible
:
_expanded
width
:
parent
.
width
-
valueGrid
.
width
-
(
_margins
*
2
)
clip
:
true
delegate
:
Item
{
height
:
statusListView
.
height
width
:
indicator
.
width
visible
:
object
.
specifiesCoordinate
&&
!
object
.
isStandaloneCoordinate
property
real
availableHeight
:
height
-
indicator
.
height
property
bool
graphAbsolute
:
true
MissionItemIndexLabel
{
id
:
indicator
anchors.horizontalCenter
:
parent
.
horizontalCenter
y
:
availableHeight
-
(
availableHeight
*
object
.
altPercent
)
small
:
true
isCurrentItem
:
object
.
isCurrentItem
label
:
object
.
abbreviation
visible
:
object
.
relativeAltitude
?
true
:
(
object
.
homePosition
||
graphAbsolute
)
}
Connections
{
target
:
object
Row
{
id
:
graphRow
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
//anchors.margins: ScreenTools.defaultFontPixelWidth * ScreenTools.smallFontPointRatio
spacing
:
ScreenTools
.
defaultFontPixelWidth
*
ScreenTools
.
smallFontPointRatio
Repeater
{
model
:
missionItems
Item
{
height
:
graphRow
.
height
width
:
indicator
.
width
visible
:
object
.
specifiesCoordinate
&&
!
object
.
isStandaloneCoordinate
property
real
availableHeight
:
height
-
indicator
.
height
property
bool
graphAbsolute
:
true
MissionItemIndexLabel
{
id
:
indicator
anchors.horizontalCenter
:
parent
.
horizontalCenter
y
:
availableHeight
-
(
availableHeight
*
object
.
altPercent
)
small
:
true
isCurrentItem
:
object
.
isCurrentItem
label
:
object
.
abbreviation
visible
:
object
.
relativeAltitude
?
true
:
(
object
.
homePosition
||
graphAbsolute
)
}
/*
Taking these off for now since there really isn't room for the numbers
QGCLabel {
anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
font.pointSize: ScreenTools.smallFontPointSize
text: (object.relativeAltitude ? "" : "=") + object.coordinate.altitude.toFixed(0)
onIsCurrentItemChanged
:
{
if
(
object
.
isCurrentItem
)
{
statusListView
.
currentIndex
=
index
}
*/
}
}
}
...
...
src/MissionEditor/SimpleItemEditor.qml
View file @
05852c3b
...
...
@@ -13,7 +13,7 @@ import QGroundControl.Palette 1.0
Rectangle
{
id
:
valuesRect
width
:
availableWidth
height
:
v
aluesItem
.
height
height
:
v
isible
?
valuesItem
.
height
:
0
color
:
qgcPal
.
windowShadeDark
visible
:
missionItem
.
isCurrentItem
radius
:
_radius
...
...
src/MissionEditor/SurveyItemEditor.qml
View file @
05852c3b
...
...
@@ -10,7 +10,7 @@ import QGroundControl.Palette 1.0
// Editor for Survery mission items
Rectangle
{
id
:
_root
height
:
editorColumn
.
height
+
(
_margin
*
2
)
height
:
visible
?
(
editorColumn
.
height
+
(
_margin
*
2
))
:
0
width
:
availableWidth
color
:
qgcPal
.
windowShadeDark
radius
:
_radius
...
...
src/QmlControls/MissionItemEditor.qml
View file @
05852c3b
...
...
@@ -151,9 +151,9 @@ Rectangle {
anchors.topMargin
:
_margin
anchors.left
:
parent
.
left
anchors.top
:
commandPicker
.
bottom
height
:
_currentItem
&&
item
?
item
.
height
:
0
source
:
_currentItem
?
(
missionItem
.
isSimpleItem
?
"
qrc:/qml/SimpleItemEditor.qml
"
:
"
qrc:/qml/SurveyItemEditor.qml
"
)
:
"
"
height
:
item
?
item
.
height
:
0
source
:
missionItem
.
isSimpleItem
?
"
qrc:/qml/SimpleItemEditor.qml
"
:
"
qrc:/qml/SurveyItemEditor.qml
"
onLoaded
:
{
item
.
visible
=
Qt
.
binding
(
function
()
{
return
_currentItem
;
})
}
property
real
availableWidth
:
_root
.
width
-
(
_margin
*
2
)
///< How wide the editor should be
property
var
editorRoot
:
_root
}
...
...
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