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
fa793fe4
Commit
fa793fe4
authored
Apr 23, 2019
by
Stefan Dunca
Committed by
Gus Grubba
Apr 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New toolstrip based on QGCHoverButton
parent
a08427a3
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
121 additions
and
244 deletions
+121
-244
FlightDisplayView.qml
src/FlightDisplay/FlightDisplayView.qml
+4
-4
PlanView.qml
src/PlanView/PlanView.qml
+57
-58
DropPanel.qml
src/QmlControls/DropPanel.qml
+1
-1
ToolStrip.qml
src/QmlControls/ToolStrip.qml
+59
-181
No files found.
src/FlightDisplay/FlightDisplayView.qml
View file @
fa793fe4
...
...
@@ -561,16 +561,16 @@ Item {
ToolStrip
{
visible
:
(
activeVehicle
?
activeVehicle
.
guidedModeSupported
:
true
)
&&
!
QGroundControl
.
videoManager
.
fullScreen
id
:
toolStrip
anchors.leftMargin
:
isInstrumentRight
()
?
ScreenTools
.
defaultFontPixelWidth
:
undefined
anchors.leftMargin
:
isInstrumentRight
()
?
ScreenTools
.
defaultFontPixelWidth
*
2
:
undefined
anchors.left
:
isInstrumentRight
()
?
_mapAndVideo
.
left
:
undefined
anchors.rightMargin
:
isInstrumentRight
()
?
undefined
:
ScreenTools
.
defaultFontPixelWidth
anchors.right
:
isInstrumentRight
()
?
undefined
:
_mapAndVideo
.
right
anchors.topMargin
:
ScreenTools
.
toolbarHeight
+
(
_margins
*
2
)
anchors.topMargin
:
ScreenTools
.
toolbarHeight
+
anchors
.
leftMargin
anchors.top
:
_mapAndVideo
.
top
z
:
_mapAndVideo
.
z
+
4
title
:
qsTr
(
"
Fly
"
)
maxHeight
:
(
_flightVideo
.
visible
?
_flightVideo
.
y
:
parent
.
height
)
-
toolStrip
.
y
buttonVisible
:
[
_useChecklist
,
_guidedController
.
showTakeoff
||
!
_guidedController
.
showLand
,
_guidedController
.
showLand
&&
!
_guidedController
.
showTakeoff
,
true
,
true
,
tru
e
]
buttonVisible
:
[
_useChecklist
,
_guidedController
.
showTakeoff
||
!
_guidedController
.
showLand
,
_guidedController
.
showLand
&&
!
_guidedController
.
showTakeoff
,
true
,
_guidedController
.
showPause
,
!
_guidedController
.
showPaus
e
]
buttonEnabled
:
[
_useChecklist
&&
activeVehicle
,
_guidedController
.
showTakeoff
,
_guidedController
.
showLand
,
_guidedController
.
showRTL
,
_guidedController
.
showPause
,
_anyActionAvailable
]
property
bool
_anyActionAvailable
:
_guidedController
.
showStartMission
||
_guidedController
.
showResumeMission
||
_guidedController
.
showChangeAlt
||
_guidedController
.
showLandAbort
...
...
src/PlanView/PlanView.qml
View file @
fa793fe4
...
...
@@ -286,7 +286,7 @@ Item {
var
sequenceNumber
=
_missionController
.
insertROIMissionItem
(
coordinate
,
index
)
_missionController
.
setCurrentPlanViewIndex
(
sequenceNumber
,
true
)
_addROIOnClick
=
false
toolStrip
.
uncheckAll
()
toolStrip
.
lastClickedButton
.
checked
=
false
}
property
int
_moveDialogMissionItemIndex
...
...
@@ -533,64 +533,64 @@ Item {
border.width
:
object
.
lineWidth
}
}
}
ToolStrip
{
id
:
toolStrip
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.left
:
parent
.
left
anchors.topMargin
:
_toolButtonTopMargin
anchors.top
:
parent
.
top
color
:
qgcPal
.
window
title
:
qsTr
(
"
Plan
"
)
z
:
QGroundControl
.
zOrderWidgets
showAlternateIcon
:
[
_planMasterController
.
dirty
,
false
,
false
,
false
,
false
,
false
,
false
]
rotateImage
:
[
_planMasterController
.
syncInProgress
,
false
,
false
,
false
,
false
,
false
,
false
]
animateImage
:
[
_planMasterController
.
dirty
,
false
,
false
,
false
,
false
,
false
,
false
]
buttonEnabled
:
[
!
_planMasterController
.
syncInProgress
,
true
,
true
,
true
,
true
,
true
,
true
]
buttonVisible
:
[
true
,
true
,
_waypointsOnlyMode
,
true
,
true
,
_showZoom
,
_showZoom
]
maxHeight
:
mapScale
.
y
-
toolStrip
.
y
property
bool
_showZoom
:
!
ScreenTools
.
isMobile
model
:
[
{
name
:
qsTr
(
"
File
"
),
iconSource
:
"
/qmlimages/MapSync.svg
"
,
alternateIconSource
:
"
/qmlimages/MapSyncChanged.svg
"
,
dropPanelComponent
:
syncDropPanel
},
{
name
:
qsTr
(
"
Waypoint
"
),
iconSource
:
"
/qmlimages/MapAddMission.svg
"
,
toggle
:
true
},
{
name
:
qsTr
(
"
ROI
"
),
iconSource
:
"
/qmlimages/MapAddMission.svg
"
,
toggle
:
true
},
{
name
:
_singleComplexItem
?
_missionController
.
complexMissionItemNames
[
0
]
:
qsTr
(
"
Pattern
"
),
iconSource
:
"
/qmlimages/MapDrawShape.svg
"
,
dropPanelComponent
:
_singleComplexItem
?
undefined
:
patternDropPanel
},
{
name
:
qsTr
(
"
Center
"
),
iconSource
:
"
/qmlimages/MapCenter.svg
"
,
dropPanelComponent
:
centerMapDropPanel
},
{
name
:
qsTr
(
"
In
"
),
iconSource
:
"
/qmlimages/ZoomPlus.svg
"
},
{
name
:
qsTr
(
"
Out
"
),
iconSource
:
"
/qmlimages/ZoomMinus.svg
"
}
]
//-----------------------------------------------------------
// Left tool strip
ToolStrip
{
id
:
toolStrip
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
*
2
anchors.left
:
parent
.
left
anchors.topMargin
:
_toolButtonTopMargin
+
anchors
.
leftMargin
anchors.top
:
parent
.
top
z
:
QGroundControl
.
zOrderWidgets
showAlternateIcon
:
[
_planMasterController
.
dirty
,
false
,
false
,
false
,
false
,
false
,
false
]
rotateImage
:
[
_planMasterController
.
syncInProgress
,
false
,
false
,
false
,
false
,
false
,
false
]
animateImage
:
[
_planMasterController
.
dirty
,
false
,
false
,
false
,
false
,
false
,
false
]
buttonEnabled
:
[
!
_planMasterController
.
syncInProgress
,
true
,
true
,
true
,
true
,
true
,
true
]
buttonVisible
:
[
true
,
true
,
_waypointsOnlyMode
,
true
,
true
,
_showZoom
,
_showZoom
]
maxHeight
:
mapScale
.
y
-
toolStrip
.
y
property
bool
_showZoom
:
!
ScreenTools
.
isMobile
model
:
[
{
name
:
qsTr
(
"
File
"
),
iconSource
:
"
/qmlimages/MapSync.svg
"
,
alternateIconSource
:
"
/qmlimages/MapSyncChanged.svg
"
,
dropPanelComponent
:
syncDropPanel
},
{
name
:
qsTr
(
"
Waypoint
"
),
iconSource
:
"
/qmlimages/MapAddMission.svg
"
,
toggle
:
true
},
{
name
:
qsTr
(
"
ROI
"
),
iconSource
:
"
/qmlimages/MapAddMission.svg
"
,
toggle
:
true
},
{
name
:
_singleComplexItem
?
_missionController
.
complexMissionItemNames
[
0
]
:
qsTr
(
"
Pattern
"
),
iconSource
:
"
/qmlimages/MapDrawShape.svg
"
,
dropPanelComponent
:
_singleComplexItem
?
undefined
:
patternDropPanel
},
{
name
:
qsTr
(
"
Center
"
),
iconSource
:
"
/qmlimages/MapCenter.svg
"
,
dropPanelComponent
:
centerMapDropPanel
},
{
name
:
qsTr
(
"
In
"
),
iconSource
:
"
/qmlimages/ZoomPlus.svg
"
},
{
name
:
qsTr
(
"
Out
"
),
iconSource
:
"
/qmlimages/ZoomMinus.svg
"
}
]
onClicked
:
{
switch
(
index
)
{
onClicked
:
{
switch
(
index
)
{
case
1
:
_addWaypointOnClick
=
checked
_addROIOnClick
=
false
...
...
@@ -610,7 +610,6 @@ Item {
case
6
:
editorMap
.
zoomLevel
-=
0.5
break
}
}
}
}
...
...
src/QmlControls/DropPanel.qml
View file @
fa793fe4
...
...
@@ -63,7 +63,7 @@ Item {
if
(
visible
)
{
visible
=
false
_dropDownComponent
=
undefined
toolStrip
.
uncheckAll
()
toolStrip
.
lastClickedButton
.
checked
=
false
}
}
...
...
src/QmlControls/ToolStrip.qml
View file @
fa793fe4
This diff is collapsed.
Click to expand it.
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