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
99d9796c
Commit
99d9796c
authored
Dec 10, 2019
by
Valentin Platzgummer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wimaMenu edited
parent
a1d6f37c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
205 additions
and
201 deletions
+205
-201
FlightDisplayView.qml
src/FlightDisplay/FlightDisplayView.qml
+2
-2
FlightDisplayWimaMenu.qml
src/FlightDisplay/FlightDisplayWimaMenu.qml
+203
-199
No files found.
src/FlightDisplay/FlightDisplayView.qml
View file @
99d9796c
...
...
@@ -551,8 +551,8 @@ QGCView {
z
:
_panel
.
z
+
4
anchors.left
:
parent
.
left
anchors.bottom
:
parent
.
bottom
anchors.leftMargin
:
ScreenTools
.
defaultFontPixel
Height
*
0.25
anchors.bottomMargin
:
ScreenTools
.
defaultFontPixel
Height
*
0.25
anchors.leftMargin
:
ScreenTools
.
defaultFontPixel
Width
anchors.bottomMargin
:
ScreenTools
.
defaultFontPixel
Width
wimaController
:
wimaController
...
...
src/FlightDisplay/FlightDisplayWimaMenu.qml
View file @
99d9796c
import
QtQuick
2.3
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
.
Styles
1.4
import
QtQuick
.
Dialogs
1.2
import
QtLocation
5.3
import
QtPositioning
5.3
import
QtQuick
.
Controls
2.4
import
QtQuick
.
Layouts
1.2
import
QGroundControl
1.0
...
...
@@ -19,7 +19,7 @@ import QGroundControl.FactControls 1.0
Item
{
id
:
_root
height
:
7
00
height
:
6
00
width
:
300
property
var
wimaController
// must be provided by the user
...
...
@@ -50,8 +50,12 @@ Item {
return
Qt
.
formatTime
(
t
,
'
hh:mm:ss
'
)
}
QGCPalette
{
id
:
qgcPal
}
// box containing all items
Rectangle
{
Rectangle
{
// maybe replace with column and remove anchors => dynamic height:
id
:
mainFrame
anchors.left
:
parent
.
left
anchors.bottom
:
parent
.
bottom
height
:
enableWima
.
enableWimaBoolean
?
parent
.
height
:
enableWima
.
height
...
...
@@ -83,201 +87,201 @@ Item {
}
}
Column
{
id
:
mainColumn
anchors.top
:
enableWima
.
bottom
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.bottom
:
parent
.
bottom
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
*
0.4
spacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.25
SectionHeader
{
id
:
settingsHeader
text
:
qsTr
(
"
Settings
"
)
}
GridLayout
{
columns
:
2
rowSpacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
columnSpacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
anchors.topMargin
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
visible
:
settingsHeader
.
checked
// Settings
QGCLabel
{
text
:
qsTr
(
"
Next Waypoint
"
)
}
FactTextField
{
fact
:
wimaController
.
startWaypointIndex
Layout.fillWidth
:
true
}
QGCLabel
{
text
:
qsTr
(
"
Max Waypoints
"
)
}
FactTextField
{
fact
:
wimaController
.
maxWaypointsPerPhase
Layout.fillWidth
:
true
}
QGCLabel
{
text
:
qsTr
(
"
Overlap
"
)
}
FactTextField
{
fact
:
wimaController
.
overlapWaypoints
Layout.fillWidth
:
true
}
FactCheckBox
{
text
:
qsTr
(
"
Show All
"
)
fact
:
wimaController
.
showAllMissionItems
}
FactCheckBox
{
text
:
qsTr
(
"
Show Current
"
)
fact
:
wimaController
.
showCurrentMissionItems
}
}
SectionHeader
{
id
:
missionHeader
text
:
qsTr
(
"
Mission
"
)
}
GridLayout
{
columns
:
2
rowSpacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
columnSpacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
anchors.topMargin
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
visible
:
missionHeader
.
checked
QGCLabel
{
text
:
qsTr
(
"
Speed
"
)
}
FactTextField
{
fact
:
wimaController
.
flightSpeed
Layout.fillWidth
:
true
}
QGCLabel
{
text
:
qsTr
(
"
Altitude
"
)
}
FactTextField
{
fact
:
wimaController
.
altitude
Layout.fillWidth
:
tru
e
}
// Buttons
QGCButton
{
id
:
buttonPreviousMissionPhase
text
:
qsTr
(
"
Reverse
"
)
onClicked
:
wimaController
.
previousPhase
();
Layout.fillWidth
:
true
}
QGCButton
{
id
:
buttonNextMissionPhase
text
:
qsTr
(
"
Forward
"
)
onClicked
:
wimaController
.
nextPhase
();
Layout.fillWidth
:
true
}
QGCButton
{
id
:
buttonResetPhase
text
:
qsTr
(
"
Reset Phase
"
)
onClicked
:
wimaController
.
resetPhase
();
Layout.fillWidth
:
true
Layout.rowSpan
:
2
}
}
SectionHeader
{
id
:
vehicleHeader
text
:
qsTr
(
"
Vehicle
"
)
}
GridLayout
{
columns
:
2
rowSpacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
columnSpacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
anchors.topMargin
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
visible
:
vehicleHeader
.
checked
QGCButton
{
id
:
buttonUpload
text
:
qsTr
(
"
Upload
"
)
onClicked
:
wimaController
.
uploadToVehicle
();
Layout.fillWidth
:
true
}
QGCButton
{
id
:
buttonRemoveFromVehicle
text
:
qsTr
(
"
Remove
"
)
onClicked
:
wimaController
.
removeFromVehicle
();
Layout.fillWidth
:
true
}
QGCButton
{
id
:
buttonSmartRTL
text
:
qsTr
(
"
Smart RTL
"
)
onClicked
:
initSmartRTL
()
Layout.fillWidth
:
true
}
// placeholder, remove if you add stuff
QGCLabel
{
text
:
""
}
// progess b
ar
Rectangle
{
id
:
progressBar
height
:
4
width
:
_controllerProgressPct
*
parent
.
width
color
:
qgcPal
.
colorGreen
visible
:
false
}
QGCLabel
{
id
:
uploadCompleteText
font.pointSize
:
ScreenTools
.
largeFontPointSize
Layout.columnSpan
:
2
horizontalAlignment
:
Text
.
AlignHCenter
verticalAlignment
:
Text
.
AlignVCenter
text
:
"
Done
"
visible
:
false
}
}
SectionHeader
{
id
:
statsHeader
text
:
qsTr
(
"
Statistics
"
)
}
GridLayout
{
columns
:
2
rowSpacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
anchors.topMargin
:
ScreenTools
.
defaultFontPixelHeight
*
0.25
visible
:
statsHeader
.
checked
QGCLabel
{
text
:
qsTr
(
"
Phase Length:
"
)
wrapMode
:
Text
.
WordWrap
font.pointSize
:
ScreenTools
.
smallFontPointSize
}
QGCLabel
{
text
:
wimaController
.
phaseDistance
>=
0
?
wimaController
.
phaseDistance
.
toFixed
(
2
)
+
"
m
"
:
""
wrapMode
:
Text
.
WordWrap
font.pointSize
:
ScreenTools
.
smallFontPointSize
}
QGCLabel
{
text
:
qsTr
(
"
Phase Duration:
"
)
wrapMode
:
Text
.
WordWrap
font.pointSize
:
ScreenTools
.
smallFontPointSize
}
QGCLabel
{
text
:
wimaController
.
phaseDuration
>=
0
?
getTime
(
wimaController
.
phaseDuration
)
:
""
wrapMode
:
Text
.
WordWrap
font.pointSize
:
ScreenTools
.
smallFontPointSize
}
}
}
Rectangle
{
id
:
controllerFrame
anchors.top
:
enableWima
.
bottom
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.bottom
:
parent
.
bottom
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
*
0.25
color
:
qgcPal
.
window
clip
:
true
ScrollView
{
id
:
scrollView
anchors.fill
:
parent
Column
{
/*SectionHeader {
id: settingsHeader
text: qsTr("Settings")
}*/
GridLayout
{
columns
:
2
rowSpacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
columnSpacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
visible
:
settingsHeader
.
checked
// Settings
QGCLabel
{
text
:
qsTr
(
"
Next Waypoint
"
)
}
FactTextField
{
fact
:
wimaController
.
startWaypointIndex
Layout.fillWidth
:
true
}
QGCLabel
{
text
:
qsTr
(
"
Max Waypoints
"
)
}
FactTextField
{
fact
:
wimaController
.
maxWaypointsPerPhase
Layout.fillWidth
:
true
}
QGCLabel
{
text
:
qsTr
(
"
Overlap
"
)
}
FactTextField
{
fact
:
wimaController
.
overlapWaypoints
Layout.fillWidth
:
true
}
FactCheckBox
{
text
:
qsTr
(
"
Show All
"
)
fact
:
wimaController
.
showAllMissionItems
}
FactCheckBox
{
text
:
qsTr
(
"
Show Current
"
)
fact
:
wimaController
.
showCurrentMissionItems
}
}
/*SectionHeader
{
id: missionHeader
text: qsTr("Mission")
}*/
GridLayout
{
columns
:
2
rowSpacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
columnSpacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
visible
:
missionHeader
.
checked
QGCLabel
{
text
:
qsTr
(
"
Speed
"
)
}
FactTextField
{
fact
:
wimaController
.
flightSpeed
Layout.fillWidth
:
true
}
QGCLabel
{
text
:
qsTr
(
"
Altitude
"
)
}
FactTextField
{
fact
:
wimaController
.
altitud
e
Layout.fillWidth
:
true
}
// Buttons
QGCButton
{
id
:
buttonPreviousMissionPhase
text
:
qsTr
(
"
Reverse
"
)
onClicked
:
wimaController
.
previousPhase
();
Layout.fillWidth
:
true
}
QGCButton
{
id
:
buttonNextMissionPhase
text
:
qsTr
(
"
Forward
"
)
onClicked
:
wimaController
.
nextPhase
();
Layout.fillWidth
:
true
}
QGCButton
{
id
:
buttonResetPhase
text
:
qsTr
(
"
Reset Phase
"
)
onClicked
:
wimaController
.
resetPhase
();
Layout.fillWidth
:
true
Layout.rowSpan
:
2
}
/*}
SectionHeader{
id: vehicleHeader
text: qsTr("Vehicle")
}
GridLayout {
columns: 2
rowSpacing:
ScreenTools.defaultFontPixelHeight * 0.5
columnSpacing:
ScreenTools.defaultFontPixelHeight * 0.5
visible: vehicleHeader.checked*/
QGCButton
{
id
:
buttonUpload
text
:
qsTr
(
"
Upload
"
)
onClicked
:
wimaController
.
uploadToVehicle
();
Layout.fillWidth
:
true
}
QGCButton
{
id
:
buttonRemoveFromVehicle
text
:
qsTr
(
"
Remove
"
)
onClicked
:
wimaController
.
removeFromVehicle
();
Layout.fillWidth
:
true
}
QGCButton
{
id
:
buttonSmartRTL
text
:
qsTr
(
"
Smart RTL
"
)
onClicked
:
initSmartRTL
()
Layout.fillWidth
:
true
}
// placeholder, remove if you add stuff
QGCLabel
{
text
:
""
}
// progess bar
Rectangle
{
id
:
progressB
ar
height
:
4
width
:
_controllerProgressPct
*
parent
.
width
color
:
qgcPal
.
colorGreen
visible
:
false
}
QGCLabel
{
id
:
uploadCompleteText
font.pointSize
:
ScreenTools
.
largeFontPointSize
Layout.columnSpan
:
2
horizontalAlignment
:
Text
.
AlignHCenter
verticalAlignment
:
Text
.
AlignVCenter
text
:
"
Done
"
visible
:
false
}
}
/*SectionHeader {
id: statsHeader
text: qsTr("Statistics")
}*/
GridLayout
{
columns
:
2
rowSpacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
anchors.topMargin
:
ScreenTools
.
defaultFontPixelHeight
*
0.25
visible
:
statsHeader
.
checked
QGCLabel
{
text
:
qsTr
(
"
Phase Length:
"
)
wrapMode
:
Text
.
WordWrap
font.pointSize
:
ScreenTools
.
smallFontPointSize
}
QGCLabel
{
text
:
wimaController
.
phaseDistance
>=
0
?
wimaController
.
phaseDistance
.
toFixed
(
2
)
+
"
m
"
:
""
wrapMode
:
Text
.
WordWrap
font.pointSize
:
ScreenTools
.
smallFontPointSize
}
QGCLabel
{
text
:
qsTr
(
"
Phase Duration:
"
)
wrapMode
:
Text
.
WordWrap
font.pointSize
:
ScreenTools
.
smallFontPointSize
}
QGCLabel
{
text
:
wimaController
.
phaseDuration
>=
0
?
getTime
(
wimaController
.
phaseDuration
)
:
""
wrapMode
:
Text
.
WordWrap
font.pointSize
:
ScreenTools
.
smallFontPointSize
}
}
}
// mainColumn
}
// item
}
// Rectangle
}
}
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