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
9967011d
Commit
9967011d
authored
Oct 12, 2015
by
dogmaphobic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding a RoundButton element.
Also moving the Plan View tool bar buttons into a Row element.
parent
70a09b88
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
162 additions
and
147 deletions
+162
-147
qgroundcontrol.qrc
qgroundcontrol.qrc
+1
-0
MissionEditor.qml
src/MissionEditor/MissionEditor.qml
+125
-147
QGroundControl.Controls.qmldir
src/QmlControls/QGroundControl.Controls.qmldir
+1
-0
RoundButton.qml
src/QmlControls/RoundButton.qml
+35
-0
No files found.
qgroundcontrol.qrc
View file @
9967011d
...
...
@@ -114,6 +114,7 @@
<file alias="QGroundControl/Controls/MissionItemSummary.qml">src/QmlControls/MissionItemSummary.qml</file>
<file alias="QGroundControl/Controls/MissionItemEditor.qml">src/QmlControls/MissionItemEditor.qml</file>
<file alias="QGroundControl/Controls/DropButton.qml">src/QmlControls/DropButton.qml</file>
<file alias="QGroundControl/Controls/RoundButton.qml">src/QmlControls/RoundButton.qml</file>
<file alias="QGroundControl/Controls/QGCCanvas.qml">src/QmlControls/QGCCanvas.qml</file>
<!-- Vehicle Setup -->
...
...
src/MissionEditor/MissionEditor.qml
View file @
9967011d
...
...
@@ -130,51 +130,34 @@ QGCView {
}
}
Image
{
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
anchors.top
:
parent
.
top
anchors.right
:
parent
.
right
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
RoundButton
{
id
:
addMissionItemsButton
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelHeight
anchors.right
:
homePositionManagerButton
.
left
anchors.top
:
homePositionManagerButton
.
top
width
:
ScreenTools
.
defaultFontPixelHeight
*
3
fillMode
:
Image
.
PreserveAspectFit
mipmap
:
true
smooth
:
true
source
:
"
/qmlimages/MapAddMission.svg
"
buttonImage
:
"
/qmlimages/MapAddMission.svg
"
opacity
:
_addMissionItems
?
1.0
:
0.75
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
_addMissionItems
=
!
_addMissionItems
_showHomePositionManager
=
false
}
}
}
Image
{
RoundButton
{
id
:
homePositionManagerButton
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelHeight
anchors.right
:
centerMapButton
.
left
anchors.top
:
centerMapButton
.
top
width
:
ScreenTools
.
defaultFontPixelHeight
*
3
fillMode
:
Image
.
PreserveAspectFit
mipmap
:
true
smooth
:
true
source
:
"
/qmlimages/MapHome.svg
"
buttonImage
:
"
/qmlimages/MapHome.svg
"
opacity
:
_showHomePositionManager
?
1.0
:
0.75
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
_showHomePositionManager
=
!
_showHomePositionManager
_addMissionItems
=
false
}
}
}
DropButton
{
id
:
centerMapButton
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelHeight
anchors.right
:
syncButton
.
left
anchors.top
:
syncButton
.
top
dropDirection
:
dropDown
buttonImage
:
"
/qmlimages/MapCenter.svg
"
viewportMargins
:
ScreenTools
.
defaultFontPixelWidth
/
2
...
...
@@ -207,9 +190,9 @@ QGCView {
}
}
/*
/*
This code will need to wait for Qml 5.5 support since Map.visibleRegion is only in Qt 5.5
This code will need to wait for Qml 5.5 support since Map.visibleRegion is only in Qt 5.5
QGCButton {
text: "All Items"
...
...
@@ -241,16 +224,13 @@ This code will need to wait for Qml 5.5 support since Map.visibleRegion is only
editorMap.visibleRegion = region
}
}
*/
*/
}
}
}
DropButton
{
id
:
syncButton
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelHeight
anchors.right
:
mapTypeButton
.
left
anchors.top
:
mapTypeButton
.
top
dropDirection
:
dropDown
buttonImage
:
"
/qmlimages/MapSync.svg
"
viewportMargins
:
ScreenTools
.
defaultFontPixelWidth
/
2
...
...
@@ -303,9 +283,6 @@ This code will need to wait for Qml 5.5 support since Map.visibleRegion is only
DropButton
{
id
:
mapTypeButton
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
anchors.top
:
parent
.
top
anchors.right
:
parent
.
right
dropDirection
:
dropDown
buttonImage
:
"
/qmlimages/MapType.svg
"
viewportMargins
:
ScreenTools
.
defaultFontPixelWidth
/
2
...
...
@@ -334,6 +311,7 @@ This code will need to wait for Qml 5.5 support since Map.visibleRegion is only
}
}
}
}
MissionItemIndicator
{
label
:
"
H
"
...
...
src/QmlControls/QGroundControl.Controls.qmldir
View file @
9967011d
...
...
@@ -14,6 +14,7 @@ QGCCanvas 1.0 QGCCanvas.qml
SubMenuButton 1.0 SubMenuButton.qml
IndicatorButton 1.0 IndicatorButton.qml
DropButton 1.0 DropButton.qml
RoundButton 1.0 RoundButton.qml
VehicleRotationCal 1.0 VehicleRotationCal.qml
VehicleSummaryRow 1.0 VehicleSummaryRow.qml
ViewWidget 1.0 ViewWidget.qml
...
...
src/QmlControls/RoundButton.qml
0 → 100644
View file @
9967011d
import
QtQuick
2.4
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
.
Styles
1.2
import
QGroundControl
.
ScreenTools
1.0
Item
{
id
:
_root
signal
clicked
()
property
alias
buttonImage
:
button
.
source
property
real
radius
:
(
ScreenTools
.
defaultFontPixelHeight
*
3
)
/
2
width
:
radius
*
2
height
:
radius
*
2
Rectangle
{
anchors.fill
:
parent
radius
:
width
/
2
border.width
:
2
border.color
:
"
white
"
color
:
"
transparent
"
Image
{
id
:
button
anchors.fill
:
parent
fillMode
:
Image
.
PreserveAspectFit
mipmap
:
true
smooth
:
true
MouseArea
{
anchors.fill
:
parent
onClicked
:
_root
.
clicked
()
}
}
}
}
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