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
9ee95420
Commit
9ee95420
authored
Jul 27, 2019
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Custom multi vehicle indicators/selectors
parent
33fbd552
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
+10
-7
CustomVehicleButton.qml
custom-example/res/Custom/Widgets/CustomVehicleButton.qml
+3
-3
CustomFlyView.qml
custom-example/res/CustomFlyView.qml
+4
-1
CustomPlugin.cc
custom-example/src/CustomPlugin.cc
+3
-3
No files found.
custom-example/res/Custom/Widgets/CustomVehicleButton.qml
View file @
9ee95420
...
...
@@ -61,7 +61,7 @@ Button {
width
:
height
sourceSize.height
:
parent
.
height
fillMode
:
Image
.
PreserveAspectFit
color
:
qgcPal
.
buttonText
color
:
button
.
checked
?
qgcPal
.
buttonHighlightText
:
qgcPal
.
buttonText
source
:
"
/qmlimages/PaperPlane.svg
"
anchors.verticalCenter
:
parent
.
verticalCenter
}
...
...
@@ -71,13 +71,13 @@ Button {
QGCLabel
{
text
:
qsTr
(
"
Vehicle
"
)
+
(
vehicle
?
vehicle
.
id
:
qsTr
(
"
None
"
))
font.family
:
ScreenTools
.
demiboldFontFamily
color
:
qgcPal
.
buttonText
color
:
button
.
checked
?
qgcPal
.
buttonHighlightText
:
qgcPal
.
buttonText
}
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
QGCLabel
{
text
:
vehicle
?
vehicle
.
flightMode
:
qsTr
(
"
None
"
)
color
:
qgcPal
.
buttonText
color
:
button
.
checked
?
qgcPal
.
buttonHighlightText
:
qgcPal
.
buttonText
}
Rectangle
{
height
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
...
...
custom-example/res/CustomFlyView.qml
View file @
9ee95420
...
...
@@ -491,7 +491,7 @@ Item {
id
:
multiVehicleSelector
spacing
:
ScreenTools
.
defaultFontPixelWidth
anchors.bottom
:
parent
.
bottom
anchors.bottomMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.bottomMargin
:
ScreenTools
.
defaultFontPixelWidth
*
1.5
anchors.right
:
parent
.
right
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
visible
:
QGroundControl
.
multiVehicleManager
.
vehicles
.
count
>
1
...
...
@@ -501,6 +501,9 @@ Item {
property
var
_vehicle
:
QGroundControl
.
multiVehicleManager
.
vehicles
.
get
(
modelData
)
vehicle
:
_vehicle
checked
:
(
_vehicle
&&
activeVehicle
)
?
_vehicle
.
id
===
activeVehicle
.
id
:
false
onClicked
:
{
QGroundControl
.
multiVehicleManager
.
activeVehicle
=
_vehicle
}
}
}
}
...
...
custom-example/src/CustomPlugin.cc
View file @
9ee95420
...
...
@@ -281,7 +281,7 @@ CustomPlugin::paletteOverride(QString colorName, QGCPalette::PaletteColorInfo_t&
colorInfo
[
QGCPalette
::
Light
][
QGCPalette
::
ColorGroupDisabled
]
=
QColor
(
"#9d9d9d"
);
}
else
if
(
colorName
==
QStringLiteral
(
"buttonHighlight"
))
{
colorInfo
[
QGCPalette
::
Dark
][
QGCPalette
::
ColorGroupEnabled
]
=
QColor
(
"#
6EF880
"
);
colorInfo
[
QGCPalette
::
Dark
][
QGCPalette
::
ColorGroupEnabled
]
=
QColor
(
"#
F3BC5E
"
);
colorInfo
[
QGCPalette
::
Dark
][
QGCPalette
::
ColorGroupDisabled
]
=
QColor
(
"#222a35"
);
colorInfo
[
QGCPalette
::
Light
][
QGCPalette
::
ColorGroupEnabled
]
=
QColor
(
"#edcfb4"
);
colorInfo
[
QGCPalette
::
Light
][
QGCPalette
::
ColorGroupDisabled
]
=
QColor
(
"#e4e4e4"
);
...
...
@@ -299,9 +299,9 @@ CustomPlugin::paletteOverride(QString colorName, QGCPalette::PaletteColorInfo_t&
colorInfo
[
QGCPalette
::
Light
][
QGCPalette
::
ColorGroupDisabled
]
=
QColor
(
"#585858"
);
}
else
if
(
colorName
==
QStringLiteral
(
"primaryButtonText"
))
{
colorInfo
[
QGCPalette
::
Dark
][
QGCPalette
::
ColorGroupEnabled
]
=
QColor
(
"#
ffffff
"
);
colorInfo
[
QGCPalette
::
Dark
][
QGCPalette
::
ColorGroupEnabled
]
=
QColor
(
"#
29313A
"
);
colorInfo
[
QGCPalette
::
Dark
][
QGCPalette
::
ColorGroupDisabled
]
=
QColor
(
"#777c89"
);
colorInfo
[
QGCPalette
::
Light
][
QGCPalette
::
ColorGroupEnabled
]
=
QColor
(
"#
ffffff
"
);
colorInfo
[
QGCPalette
::
Light
][
QGCPalette
::
ColorGroupEnabled
]
=
QColor
(
"#
29313A
"
);
colorInfo
[
QGCPalette
::
Light
][
QGCPalette
::
ColorGroupDisabled
]
=
QColor
(
"#cad0d0"
);
}
else
if
(
colorName
==
QStringLiteral
(
"textField"
))
{
...
...
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