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
5b5278c3
Commit
5b5278c3
authored
Jan 30, 2017
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UI Tweaks
parent
d2c10b98
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
51 additions
and
19 deletions
+51
-19
MissionEditor.qml
src/MissionEditor/MissionEditor.qml
+1
-1
MissionItemEditor.qml
src/MissionEditor/MissionItemEditor.qml
+2
-1
MissionSettingsEditor.qml
src/MissionEditor/MissionSettingsEditor.qml
+28
-11
QGCPalette.cc
src/QGCPalette.cc
+2
-2
QGCButton.qml
src/QmlControls/QGCButton.qml
+3
-2
QGCComboBox.qml
src/QmlControls/QGCComboBox.qml
+1
-0
QGroundControlQmlGlobal.cc
src/QmlControls/QGroundControlQmlGlobal.cc
+8
-0
QGroundControlQmlGlobal.h
src/QmlControls/QGroundControlQmlGlobal.h
+4
-0
VideoStreaming.cc
src/VideoStreaming/VideoStreaming.cc
+1
-1
glutils.h
src/VideoStreaming/gstqtvideosink/utils/glutils.h
+1
-1
No files found.
src/MissionEditor/MissionEditor.qml
View file @
5b5278c3
...
@@ -37,7 +37,7 @@ QGCView {
...
@@ -37,7 +37,7 @@ QGCView {
readonly
property
real
_margin
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
readonly
property
real
_margin
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
readonly
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
readonly
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
readonly
property
real
_rightPanelWidth
:
Math
.
min
(
parent
.
width
/
3
,
ScreenTools
.
defaultFontPixelWidth
*
30
)
readonly
property
real
_rightPanelWidth
:
Math
.
min
(
parent
.
width
/
3
,
ScreenTools
.
defaultFontPixelWidth
*
30
)
readonly
property
real
_rightPanelOpacity
:
0.8
readonly
property
real
_rightPanelOpacity
:
1
readonly
property
int
_toolButtonCount
:
6
readonly
property
int
_toolButtonCount
:
6
readonly
property
real
_toolButtonTopMargin
:
parent
.
height
-
ScreenTools
.
availableHeight
+
(
ScreenTools
.
defaultFontPixelHeight
/
2
)
readonly
property
real
_toolButtonTopMargin
:
parent
.
height
-
ScreenTools
.
availableHeight
+
(
ScreenTools
.
defaultFontPixelHeight
/
2
)
readonly
property
var
_defaultVehicleCoordinate
:
QtPositioning
.
coordinate
(
37.803784
,
-
122.462276
)
readonly
property
var
_defaultVehicleCoordinate
:
QtPositioning
.
coordinate
(
37.803784
,
-
122.462276
)
...
...
src/MissionEditor/MissionItemEditor.qml
View file @
5b5278c3
...
@@ -55,7 +55,7 @@ Rectangle {
...
@@ -55,7 +55,7 @@ Rectangle {
color
:
_outerTextColor
color
:
_outerTextColor
}
}
Image
{
QGCColored
Image
{
id
:
hamburger
id
:
hamburger
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
...
@@ -65,6 +65,7 @@ Rectangle {
...
@@ -65,6 +65,7 @@ Rectangle {
sourceSize.height
:
_hamburgerSize
sourceSize.height
:
_hamburgerSize
source
:
"
qrc:/qmlimages/Hamburger.svg
"
source
:
"
qrc:/qmlimages/Hamburger.svg
"
visible
:
missionItem
.
isCurrentItem
&&
missionItem
.
sequenceNumber
!=
0
visible
:
missionItem
.
isCurrentItem
&&
missionItem
.
sequenceNumber
!=
0
color
:
qgcPal
.
windowShade
MouseArea
{
MouseArea
{
anchors.fill
:
parent
anchors.fill
:
parent
...
...
src/MissionEditor/MissionSettingsEditor.qml
View file @
5b5278c3
...
@@ -37,6 +37,7 @@ Rectangle {
...
@@ -37,6 +37,7 @@ Rectangle {
property
bool
_showOfflineEditingCombos
:
_offlineEditing
&&
_noMissionItemsAdded
property
bool
_showOfflineEditingCombos
:
_offlineEditing
&&
_noMissionItemsAdded
property
bool
_showCruiseSpeed
:
!
_missionVehicle
.
multiRotor
property
bool
_showCruiseSpeed
:
!
_missionVehicle
.
multiRotor
property
bool
_showHoverSpeed
:
_missionVehicle
.
multiRotor
||
missionController
.
vehicle
.
vtol
property
bool
_showHoverSpeed
:
_missionVehicle
.
multiRotor
||
missionController
.
vehicle
.
vtol
property
bool
_multipleFirmware
:
QGroundControl
.
supportedFirmwareCount
>
2
readonly
property
string
_firmwareLabel
:
qsTr
(
"
Firmware:
"
)
readonly
property
string
_firmwareLabel
:
qsTr
(
"
Firmware:
"
)
readonly
property
string
_vehicleLabel
:
qsTr
(
"
Vehicle:
"
)
readonly
property
string
_vehicleLabel
:
qsTr
(
"
Vehicle:
"
)
...
@@ -50,7 +51,9 @@ Rectangle {
...
@@ -50,7 +51,9 @@ Rectangle {
anchors.top
:
parent
.
top
anchors.top
:
parent
.
top
spacing
:
_margin
spacing
:
_margin
QGCLabel
{
text
:
qsTr
(
"
Planned Home Position:
"
)
}
QGCLabel
{
text
:
qsTr
(
"
Planned Home Position
"
)
}
Rectangle
{
Rectangle
{
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
...
@@ -90,27 +93,25 @@ Rectangle {
...
@@ -90,27 +93,25 @@ Rectangle {
}
}
}
}
QGCButton
{
text
:
qsTr
(
"
Move Home to map center
"
)
visible
:
missionItem
.
homePosition
onClicked
:
editorRoot
.
moveHomeToMapCenter
()
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
QGCLabel
{
QGCLabel
{
width
:
parent
.
width
width
:
parent
.
width
wrapMode
:
Text
.
WordWrap
wrapMode
:
Text
.
WordWrap
font.pointSize
:
ScreenTools
.
smallFontPointSize
font.pointSize
:
ScreenTools
.
smallFontPointSize
text
:
qsTr
(
"
Note: Planned home position for mission display only. Actual home position set by vehicle at flight time.
"
)
text
:
qsTr
(
"
Actual position set by vehicle at flight time.
"
)
horizontalAlignment
:
Text
.
AlignHCenter
}
}
QGCLabel
{
text
:
qsTr
(
"
Vehicle Info:
"
)
}
QGCLabel
{
text
:
qsTr
(
"
Vehicle Info:
"
)
visible
:
_multipleFirmware
}
Rectangle
{
Rectangle
{
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
height
:
1
height
:
1
color
:
qgcPal
.
text
color
:
qgcPal
.
text
visible
:
_multipleFirmware
}
}
GridLayout
{
GridLayout
{
...
@@ -119,6 +120,7 @@ Rectangle {
...
@@ -119,6 +120,7 @@ Rectangle {
columnSpacing
:
ScreenTools
.
defaultFontPixelWidth
columnSpacing
:
ScreenTools
.
defaultFontPixelWidth
rowSpacing
:
columnSpacing
rowSpacing
:
columnSpacing
columns
:
2
columns
:
2
visible
:
_multipleFirmware
QGCLabel
{
QGCLabel
{
text
:
_firmwareLabel
text
:
_firmwareLabel
...
@@ -187,8 +189,23 @@ Rectangle {
...
@@ -187,8 +189,23 @@ Rectangle {
width
:
parent
.
width
width
:
parent
.
width
wrapMode
:
Text
.
WordWrap
wrapMode
:
Text
.
WordWrap
font.pointSize
:
ScreenTools
.
smallFontPointSize
font.pointSize
:
ScreenTools
.
smallFontPointSize
text
:
qsTr
(
"
Note: Speeds are planned speeds only for time calculations. Actual vehicle will not be affected.
"
)
visible
:
_multipleFirmware
text
:
qsTr
(
"
Speeds are only for time calculations. Actual vehicle will not be affected.
"
)
}
Rectangle
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
height
:
1
color
:
qgcPal
.
text
}
}
QGCButton
{
text
:
qsTr
(
"
Set Home To Map Center
"
)
onClicked
:
editorRoot
.
moveHomeToMapCenter
()
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
}
// Column
}
// Column
}
// Item
}
// Item
}
// Component
}
// Component
...
...
src/QGCPalette.cc
View file @
5b5278c3
...
@@ -42,7 +42,7 @@ QColor QGCPalette::_text[QGCPalette::_cThemes][QGCPalette::_cColorGroups] = {
...
@@ -42,7 +42,7 @@ QColor QGCPalette::_text[QGCPalette::_cThemes][QGCPalette::_cColorGroups] = {
QColor
QGCPalette
::
_warningText
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
QColor
QGCPalette
::
_warningText
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
{
QColor
(
"#cc0808"
),
QColor
(
"#cc0808"
)
},
{
QColor
(
"#cc0808"
),
QColor
(
"#cc0808"
)
},
{
QColor
(
"
#e4e428"
),
QColor
(
"#e4e428
"
)
}
{
QColor
(
"
0xed, 0xd4, 0x69"
),
QColor
(
"0xed, 0xd4, 0x69
"
)
}
};
};
QColor
QGCPalette
::
_button
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
QColor
QGCPalette
::
_button
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
...
@@ -57,7 +57,7 @@ QColor QGCPalette::_buttonText[QGCPalette::_cThemes][QGCPalette::_cColorGroups]
...
@@ -57,7 +57,7 @@ QColor QGCPalette::_buttonText[QGCPalette::_cThemes][QGCPalette::_cColorGroups]
QColor
QGCPalette
::
_buttonHighlight
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
QColor
QGCPalette
::
_buttonHighlight
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
{
QColor
(
"#e4e4e4"
),
QColor
(
"#33b5e5"
)
},
{
QColor
(
"#e4e4e4"
),
QColor
(
"#33b5e5"
)
},
{
QColor
(
0x58
,
0x58
,
0x58
),
QColor
(
237
,
235
,
51
)
},
{
QColor
(
0x58
,
0x58
,
0x58
),
QColor
(
0xed
,
0xd4
,
0x69
)
},
};
};
QColor
QGCPalette
::
_buttonHighlightText
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
QColor
QGCPalette
::
_buttonHighlightText
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
...
...
src/QmlControls/QGCButton.qml
View file @
5b5278c3
...
@@ -50,10 +50,10 @@ Button {
...
@@ -50,10 +50,10 @@ Button {
style
:
ButtonStyle
{
style
:
ButtonStyle
{
/*! The padding between the background and the label components. */
/*! The padding between the background and the label components. */
padding
{
padding
{
top
:
__padding
top
:
__padding
*
0.5
left
:
__padding
left
:
__padding
right
:
control
.
menu
!==
null
?
Math
.
round
(
ScreenTools
.
defaultFontPixelHeight
)
:
__padding
right
:
control
.
menu
!==
null
?
Math
.
round
(
ScreenTools
.
defaultFontPixelHeight
)
:
__padding
bottom
:
__padding
bottom
:
__padding
*
0.5
}
}
/*! This defines the background of the button. */
/*! This defines the background of the button. */
...
@@ -66,6 +66,7 @@ Button {
...
@@ -66,6 +66,7 @@ Button {
anchors.fill
:
parent
anchors.fill
:
parent
border.width
:
_showBorder
?
1
:
0
border.width
:
_showBorder
?
1
:
0
border.color
:
_qgcPal
.
buttonText
border.color
:
_qgcPal
.
buttonText
radius
:
3
color
:
_showHighlight
?
color
:
_showHighlight
?
control
.
_qgcPal
.
buttonHighlight
:
control
.
_qgcPal
.
buttonHighlight
:
(
primary
?
control
.
_qgcPal
.
primaryButton
:
control
.
_qgcPal
.
button
)
(
primary
?
control
.
_qgcPal
.
primaryButton
:
control
.
_qgcPal
.
button
)
...
...
src/QmlControls/QGCComboBox.qml
View file @
5b5278c3
...
@@ -24,6 +24,7 @@ ComboBox {
...
@@ -24,6 +24,7 @@ ComboBox {
Rectangle
{
Rectangle
{
anchors.fill
:
parent
anchors.fill
:
parent
color
:
_showHighlight
?
control
.
_qgcPal
.
buttonHighlight
:
control
.
_qgcPal
.
button
color
:
_showHighlight
?
control
.
_qgcPal
.
buttonHighlight
:
control
.
_qgcPal
.
button
radius
:
3
border.width
:
_showBorder
?
1
:
0
border.width
:
_showBorder
?
1
:
0
border.color
:
control
.
_qgcPal
.
buttonText
border.color
:
control
.
_qgcPal
.
buttonText
}
}
...
...
src/QmlControls/QGroundControlQmlGlobal.cc
View file @
5b5278c3
...
@@ -46,6 +46,7 @@ QGroundControlQmlGlobal::QGroundControlQmlGlobal(QGCApplication* app)
...
@@ -46,6 +46,7 @@ QGroundControlQmlGlobal::QGroundControlQmlGlobal(QGCApplication* app)
,
_videoManager
(
NULL
)
,
_videoManager
(
NULL
)
,
_mavlinkLogManager
(
NULL
)
,
_mavlinkLogManager
(
NULL
)
,
_corePlugin
(
NULL
)
,
_corePlugin
(
NULL
)
,
_firmwarePluginManager
(
NULL
)
,
_virtualTabletJoystick
(
false
)
,
_virtualTabletJoystick
(
false
)
,
_baseFontPointSize
(
0.0
)
,
_baseFontPointSize
(
0.0
)
{
{
...
@@ -74,6 +75,7 @@ void QGroundControlQmlGlobal::setToolbox(QGCToolbox* toolbox)
...
@@ -74,6 +75,7 @@ void QGroundControlQmlGlobal::setToolbox(QGCToolbox* toolbox)
_videoManager
=
toolbox
->
videoManager
();
_videoManager
=
toolbox
->
videoManager
();
_mavlinkLogManager
=
toolbox
->
mavlinkLogManager
();
_mavlinkLogManager
=
toolbox
->
mavlinkLogManager
();
_corePlugin
=
toolbox
->
corePlugin
();
_corePlugin
=
toolbox
->
corePlugin
();
_firmwarePluginManager
=
toolbox
->
firmwarePluginManager
();
}
}
void
QGroundControlQmlGlobal
::
saveGlobalSetting
(
const
QString
&
key
,
const
QString
&
value
)
void
QGroundControlQmlGlobal
::
saveGlobalSetting
(
const
QString
&
key
,
const
QString
&
value
)
...
@@ -337,6 +339,12 @@ Fact* QGroundControlQmlGlobal::batteryPercentRemainingAnnounce(void)
...
@@ -337,6 +339,12 @@ Fact* QGroundControlQmlGlobal::batteryPercentRemainingAnnounce(void)
return
_batteryPercentRemainingAnnounceFact
;
return
_batteryPercentRemainingAnnounceFact
;
}
}
int
QGroundControlQmlGlobal
::
supportedFirmwareCount
()
{
return
_firmwarePluginManager
->
knownFirmwareTypes
().
count
();
}
bool
QGroundControlQmlGlobal
::
linesIntersect
(
QPointF
line1A
,
QPointF
line1B
,
QPointF
line2A
,
QPointF
line2B
)
bool
QGroundControlQmlGlobal
::
linesIntersect
(
QPointF
line1A
,
QPointF
line1B
,
QPointF
line2A
,
QPointF
line2B
)
{
{
QPointF
intersectPoint
;
QPointF
intersectPoint
;
...
...
src/QmlControls/QGroundControlQmlGlobal.h
View file @
5b5278c3
...
@@ -99,6 +99,7 @@ public:
...
@@ -99,6 +99,7 @@ public:
Q_PROPERTY
(
Fact
*
areaUnits
READ
areaUnits
CONSTANT
)
Q_PROPERTY
(
Fact
*
areaUnits
READ
areaUnits
CONSTANT
)
Q_PROPERTY
(
Fact
*
speedUnits
READ
speedUnits
CONSTANT
)
Q_PROPERTY
(
Fact
*
speedUnits
READ
speedUnits
CONSTANT
)
Q_PROPERTY
(
Fact
*
batteryPercentRemainingAnnounce
READ
batteryPercentRemainingAnnounce
CONSTANT
)
Q_PROPERTY
(
Fact
*
batteryPercentRemainingAnnounce
READ
batteryPercentRemainingAnnounce
CONSTANT
)
Q_PROPERTY
(
int
supportedFirmwareCount
READ
supportedFirmwareCount
CONSTANT
)
Q_PROPERTY
(
QGeoCoordinate
lastKnownHomePosition
READ
lastKnownHomePosition
CONSTANT
)
Q_PROPERTY
(
QGeoCoordinate
lastKnownHomePosition
READ
lastKnownHomePosition
CONSTANT
)
Q_PROPERTY
(
QGeoCoordinate
flightMapPosition
MEMBER
_flightMapPosition
NOTIFY
flightMapPositionChanged
)
Q_PROPERTY
(
QGeoCoordinate
flightMapPosition
MEMBER
_flightMapPosition
NOTIFY
flightMapPositionChanged
)
...
@@ -196,6 +197,8 @@ public:
...
@@ -196,6 +197,8 @@ public:
static
Fact
*
speedUnits
(
void
);
static
Fact
*
speedUnits
(
void
);
static
Fact
*
batteryPercentRemainingAnnounce
(
void
);
static
Fact
*
batteryPercentRemainingAnnounce
(
void
);
int
supportedFirmwareCount
();
void
setIsDarkStyle
(
bool
dark
);
void
setIsDarkStyle
(
bool
dark
);
void
setIsAudioMuted
(
bool
muted
);
void
setIsAudioMuted
(
bool
muted
);
void
setIsSaveLogPrompt
(
bool
prompt
);
void
setIsSaveLogPrompt
(
bool
prompt
);
...
@@ -245,6 +248,7 @@ private:
...
@@ -245,6 +248,7 @@ private:
VideoManager
*
_videoManager
;
VideoManager
*
_videoManager
;
MAVLinkLogManager
*
_mavlinkLogManager
;
MAVLinkLogManager
*
_mavlinkLogManager
;
QGCCorePlugin
*
_corePlugin
;
QGCCorePlugin
*
_corePlugin
;
FirmwarePluginManager
*
_firmwarePluginManager
;
bool
_virtualTabletJoystick
;
bool
_virtualTabletJoystick
;
qreal
_baseFontPointSize
;
qreal
_baseFontPointSize
;
...
...
src/VideoStreaming/VideoStreaming.cc
View file @
5b5278c3
...
@@ -131,7 +131,7 @@ void initializeVideoStreaming(int &argc, char* argv[])
...
@@ -131,7 +131,7 @@ void initializeVideoStreaming(int &argc, char* argv[])
// Our own plugin
// Our own plugin
GST_PLUGIN_STATIC_REGISTER
(
QGC_VIDEOSINK_PLUGIN
);
GST_PLUGIN_STATIC_REGISTER
(
QGC_VIDEOSINK_PLUGIN
);
// The static plugins we use
// The static plugins we use
#if defined(__mobile__)
#if defined(__mobile__)
&& !defined(__macos__)
GST_PLUGIN_STATIC_REGISTER
(
coreelements
);
GST_PLUGIN_STATIC_REGISTER
(
coreelements
);
GST_PLUGIN_STATIC_REGISTER
(
libav
);
GST_PLUGIN_STATIC_REGISTER
(
libav
);
GST_PLUGIN_STATIC_REGISTER
(
rtp
);
GST_PLUGIN_STATIC_REGISTER
(
rtp
);
...
...
src/VideoStreaming/gstqtvideosink/utils/glutils.h
View file @
5b5278c3
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
#ifndef GLUTILS_H
#ifndef GLUTILS_H
#define GLUTILS_H
#define GLUTILS_H
#if
def __mobile__
#if
defined(__mobile__) && !defined(__macos__)
#include <QOpenGLFunctions>
#include <QOpenGLFunctions>
#define getQOpenGLFunctions() QOpenGLContext::currentContext()->functions()
#define getQOpenGLFunctions() QOpenGLContext::currentContext()->functions()
#define QOpenGLFunctionsDef QOpenGLFunctions
#define QOpenGLFunctionsDef QOpenGLFunctions
...
...
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