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
ac08dd5a
Commit
ac08dd5a
authored
May 06, 2020
by
DoinLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
f48f8c8c
Changes
22
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
751 additions
and
293 deletions
+751
-293
qgroundcontrol.qrc
qgroundcontrol.qrc
+1
-0
ArduSubFirmwarePlugin.cc
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.cc
+15
-4
ArduSubFirmwarePlugin.h
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.h
+4
-2
FirmwarePlugin.cc
src/FirmwarePlugin/FirmwarePlugin.cc
+14
-5
FirmwarePlugin.h
src/FirmwarePlugin/FirmwarePlugin.h
+14
-6
FlyViewCustomLayer.qml
src/FlightDisplay/FlyViewCustomLayer.qml
+2
-2
FlyViewMap.qml
src/FlightDisplay/FlyViewMap.qml
+2
-2
FlyViewWidgetLayer.qml
src/FlightDisplay/FlyViewWidgetLayer.qml
+3
-3
PlanToolBar.qml
src/PlanView/PlanToolBar.qml
+0
-1
PlanToolBarIndicators.qml
src/PlanView/PlanToolBarIndicators.qml
+19
-43
QGCToolBarButton.qml
src/QmlControls/QGCToolBarButton.qml
+2
-2
qmldir
src/QmlControls/QGroundControl/Controls/qmldir
+1
-0
Vehicle.cc
src/Vehicle/Vehicle.cc
+14
-4
Vehicle.h
src/Vehicle/Vehicle.h
+6
-3
QGCCorePlugin.cc
src/api/QGCCorePlugin.cc
+12
-2
QGCCorePlugin.h
src/api/QGCCorePlugin.h
+14
-7
QGCOptions.cc
src/api/QGCOptions.cc
+0
-15
QGCOptions.h
src/api/QGCOptions.h
+0
-9
MainRootWindow.qml
src/ui/MainRootWindow.qml
+14
-14
MainToolBar.qml
src/ui/toolbar/MainToolBar.qml
+167
-158
MainToolBarIndicators.qml
src/ui/toolbar/MainToolBarIndicators.qml
+32
-11
ToolBarBase.qml
src/ui/toolbar/ToolBarBase.qml
+415
-0
No files found.
qgroundcontrol.qrc
View file @
ac08dd5a
...
@@ -177,6 +177,7 @@
...
@@ -177,6 +177,7 @@
<file alias="QGroundControl/Controls/SurveyMapVisual.qml">src/PlanView/SurveyMapVisual.qml</file>
<file alias="QGroundControl/Controls/SurveyMapVisual.qml">src/PlanView/SurveyMapVisual.qml</file>
<file alias="QGroundControl/Controls/TerrainStatus.qml">src/PlanView/TerrainStatus.qml</file>
<file alias="QGroundControl/Controls/TerrainStatus.qml">src/PlanView/TerrainStatus.qml</file>
<file alias="QGroundControl/Controls/TakeoffItemMapVisual.qml">src/PlanView/TakeoffItemMapVisual.qml</file>
<file alias="QGroundControl/Controls/TakeoffItemMapVisual.qml">src/PlanView/TakeoffItemMapVisual.qml</file>
<file alias="QGroundControl/Controls/ToolBarBase.qml">src/ui/toolbar/ToolBarBase.qml</file>
<file alias="QGroundControl/Controls/ToolStrip.qml">src/QmlControls/ToolStrip.qml</file>
<file alias="QGroundControl/Controls/ToolStrip.qml">src/QmlControls/ToolStrip.qml</file>
<file alias="QGroundControl/Controls/TransectStyleComplexItemStats.qml">src/PlanView/TransectStyleComplexItemStats.qml</file>
<file alias="QGroundControl/Controls/TransectStyleComplexItemStats.qml">src/PlanView/TransectStyleComplexItemStats.qml</file>
<file alias="QGroundControl/Controls/VehicleRotationCal.qml">src/QmlControls/VehicleRotationCal.qml</file>
<file alias="QGroundControl/Controls/VehicleRotationCal.qml">src/QmlControls/VehicleRotationCal.qml</file>
...
...
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.cc
View file @
ac08dd5a
...
@@ -217,20 +217,31 @@ bool ArduSubFirmwarePlugin::supportsMotorInterference(void)
...
@@ -217,20 +217,31 @@ bool ArduSubFirmwarePlugin::supportsMotorInterference(void)
return
false
;
return
false
;
}
}
const
QVariantList
&
ArduSubFirmwarePlugin
::
tool
Bar
Indicators
(
const
Vehicle
*
vehicle
)
const
QVariantList
&
ArduSubFirmwarePlugin
::
toolIndicators
(
const
Vehicle
*
vehicle
)
{
{
Q_UNUSED
(
vehicle
);
Q_UNUSED
(
vehicle
);
//-- Sub specific list of indicators (Enter your modified list here)
//-- Sub specific list of indicators (Enter your modified list here)
if
(
_tool
Bar
Indicators
.
size
()
==
0
)
{
if
(
_toolIndicators
.
size
()
==
0
)
{
_tool
Bar
Indicators
=
QVariantList
({
_toolIndicators
=
QVariantList
({
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/MessageIndicator.qml"
)),
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/MessageIndicator.qml"
)),
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/BatteryIndicator.qml"
)),
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/BatteryIndicator.qml"
)),
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/JoystickIndicator.qml"
)),
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/JoystickIndicator.qml"
)),
});
}
return
_toolIndicators
;
}
const
QVariantList
&
ArduSubFirmwarePlugin
::
modeIndicators
(
const
Vehicle
*
vehicle
)
{
Q_UNUSED
(
vehicle
);
//-- Sub specific list of indicators (Enter your modified list here)
if
(
_modeIndicators
.
size
()
==
0
)
{
_modeIndicators
=
QVariantList
({
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/ModeIndicator.qml"
)),
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/ModeIndicator.qml"
)),
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/ArmedIndicator.qml"
)),
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/ArmedIndicator.qml"
)),
});
});
}
}
return
_
toolBar
Indicators
;
return
_
mode
Indicators
;
}
}
void
ArduSubFirmwarePlugin
::
_handleNamedValueFloat
(
mavlink_message_t
*
message
)
void
ArduSubFirmwarePlugin
::
_handleNamedValueFloat
(
mavlink_message_t
*
message
)
...
...
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.h
View file @
ac08dd5a
...
@@ -136,14 +136,16 @@ public:
...
@@ -136,14 +136,16 @@ public:
QString
brandImageOutdoor
(
const
Vehicle
*
vehicle
)
const
final
{
Q_UNUSED
(
vehicle
);
return
QStringLiteral
(
"/qmlimages/APM/BrandImageSub"
);
}
QString
brandImageOutdoor
(
const
Vehicle
*
vehicle
)
const
final
{
Q_UNUSED
(
vehicle
);
return
QStringLiteral
(
"/qmlimages/APM/BrandImageSub"
);
}
const
FirmwarePlugin
::
remapParamNameMajorVersionMap_t
&
paramNameRemapMajorVersionMap
(
void
)
const
final
{
return
_remapParamName
;
}
const
FirmwarePlugin
::
remapParamNameMajorVersionMap_t
&
paramNameRemapMajorVersionMap
(
void
)
const
final
{
return
_remapParamName
;
}
int
remapParamNameHigestMinorVersionNumber
(
int
majorVersionNumber
)
const
final
;
int
remapParamNameHigestMinorVersionNumber
(
int
majorVersionNumber
)
const
final
;
const
QVariantList
&
toolBarIndicators
(
const
Vehicle
*
vehicle
)
final
;
const
QVariantList
&
toolIndicators
(
const
Vehicle
*
vehicle
)
final
;
const
QVariantList
&
modeIndicators
(
const
Vehicle
*
vehicle
)
final
;
bool
adjustIncomingMavlinkMessage
(
Vehicle
*
vehicle
,
mavlink_message_t
*
message
)
final
;
bool
adjustIncomingMavlinkMessage
(
Vehicle
*
vehicle
,
mavlink_message_t
*
message
)
final
;
virtual
QMap
<
QString
,
FactGroup
*>*
factGroups
(
void
)
final
;
virtual
QMap
<
QString
,
FactGroup
*>*
factGroups
(
void
)
final
;
void
adjustMetaData
(
MAV_TYPE
vehicleType
,
FactMetaData
*
metaData
)
override
final
;
void
adjustMetaData
(
MAV_TYPE
vehicleType
,
FactMetaData
*
metaData
)
override
final
;
private:
private:
QVariantList
_toolBarIndicators
;
QVariantList
_toolIndicators
;
QVariantList
_modeIndicators
;
static
bool
_remapParamNameIntialized
;
static
bool
_remapParamNameIntialized
;
QMap
<
QString
,
QString
>
_factRenameMap
;
QMap
<
QString
,
QString
>
_factRenameMap
;
static
FirmwarePlugin
::
remapParamNameMajorVersionMap_t
_remapParamName
;
static
FirmwarePlugin
::
remapParamNameMajorVersionMap_t
_remapParamName
;
...
...
src/FirmwarePlugin/FirmwarePlugin.cc
View file @
ac08dd5a
...
@@ -304,17 +304,26 @@ QString FirmwarePlugin::vehicleImageCompass(const Vehicle*) const
...
@@ -304,17 +304,26 @@ QString FirmwarePlugin::vehicleImageCompass(const Vehicle*) const
return
QStringLiteral
(
"/qmlimages/compassInstrumentArrow.svg"
);
return
QStringLiteral
(
"/qmlimages/compassInstrumentArrow.svg"
);
}
}
const
QVariantList
&
FirmwarePlugin
::
toolBar
Indicators
(
const
Vehicle
*
)
const
QVariantList
&
FirmwarePlugin
::
tool
Indicators
(
const
Vehicle
*
)
{
{
//-- Default list of indicators for all vehicles.
//-- Default list of indicators for all vehicles.
if
(
_tool
Bar
IndicatorList
.
size
()
==
0
)
{
if
(
_toolIndicatorList
.
size
()
==
0
)
{
_tool
Bar
IndicatorList
=
QVariantList
({
_toolIndicatorList
=
QVariantList
({
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/MessageIndicator.qml"
)),
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/MessageIndicator.qml"
)),
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/GPSIndicator.qml"
)),
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/GPSIndicator.qml"
)),
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/TelemetryRSSIIndicator.qml"
)),
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/TelemetryRSSIIndicator.qml"
)),
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/RCRSSIIndicator.qml"
)),
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/RCRSSIIndicator.qml"
)),
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/BatteryIndicator.qml"
)),
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/BatteryIndicator.qml"
)),
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/GPSRTKIndicator.qml"
)),
});
}
return
_toolIndicatorList
;
}
const
QVariantList
&
FirmwarePlugin
::
modeIndicators
(
const
Vehicle
*
)
{
//-- Default list of indicators for all vehicles.
if
(
_modeIndicatorList
.
size
()
==
0
)
{
_modeIndicatorList
=
QVariantList
({
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/ROIIndicator.qml"
)),
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/ROIIndicator.qml"
)),
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/ArmedIndicator.qml"
)),
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/ArmedIndicator.qml"
)),
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/ModeIndicator.qml"
)),
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/ModeIndicator.qml"
)),
...
@@ -323,7 +332,7 @@ const QVariantList &FirmwarePlugin::toolBarIndicators(const Vehicle*)
...
@@ -323,7 +332,7 @@ const QVariantList &FirmwarePlugin::toolBarIndicators(const Vehicle*)
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/LinkIndicator.qml"
)),
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/LinkIndicator.qml"
)),
});
});
}
}
return
_
toolBar
IndicatorList
;
return
_
mode
IndicatorList
;
}
}
const
QVariantList
&
FirmwarePlugin
::
cameraList
(
const
Vehicle
*
)
const
QVariantList
&
FirmwarePlugin
::
cameraList
(
const
Vehicle
*
)
...
...
src/FirmwarePlugin/FirmwarePlugin.h
View file @
ac08dd5a
...
@@ -267,10 +267,15 @@ public:
...
@@ -267,10 +267,15 @@ public:
/// Return the resource file which contains the vehicle icon used in the compass
/// Return the resource file which contains the vehicle icon used in the compass
virtual
QString
vehicleImageCompass
(
const
Vehicle
*
vehicle
)
const
;
virtual
QString
vehicleImageCompass
(
const
Vehicle
*
vehicle
)
const
;
/// Allows the core plugin to override the toolbar indicators
/// Returns the list of toolbar tool indicators associated with a vehicle
/// signals toolbarIndicatorsChanged
/// signals toolIndicatorsChanged
/// @return A list of QUrl with the indicators (see MainToolBarIndicators.qml)
/// @return A list of QUrl with the indicators
virtual
const
QVariantList
&
toolBarIndicators
(
const
Vehicle
*
vehicle
);
virtual
const
QVariantList
&
toolIndicators
(
const
Vehicle
*
vehicle
);
/// Returns the list of toolbar mode indicators associated with a vehicle
/// signals modeIndicatorsChanged
/// @return A list of QUrl with the indicators
virtual
const
QVariantList
&
modeIndicators
(
const
Vehicle
*
vehicle
);
/// Returns a list of CameraMetaData objects for available cameras on the vehicle.
/// Returns a list of CameraMetaData objects for available cameras on the vehicle.
/// TODO: This should go into QGCCameraManager
/// TODO: This should go into QGCCameraManager
...
@@ -330,7 +335,8 @@ public:
...
@@ -330,7 +335,8 @@ public:
static
const
QString
px4FollowMeFlightMode
;
static
const
QString
px4FollowMeFlightMode
;
signals:
signals:
void
toolbarIndicatorsChanged
(
void
);
void
toolIndicatorsChanged
(
void
);
void
modeIndicatorsChanged
(
void
);
protected:
protected:
// Arms the vehicle with validation and retries
// Arms the vehicle with validation and retries
...
@@ -351,7 +357,9 @@ protected:
...
@@ -351,7 +357,9 @@ protected:
virtual
QString
_versionRegex
()
{
return
QString
();
}
virtual
QString
_versionRegex
()
{
return
QString
();
}
private:
private:
QVariantList
_toolBarIndicatorList
;
QVariantList
_toolIndicatorList
;
QVariantList
_modeIndicatorList
;
static
QVariantList
_cameraList
;
///< Standard QGC camera list
static
QVariantList
_cameraList
;
///< Standard QGC camera list
};
};
...
...
src/FlightDisplay/FlyViewCustomLayer.qml
View file @
ac08dd5a
...
@@ -35,7 +35,7 @@ Item {
...
@@ -35,7 +35,7 @@ Item {
id
:
_root
id
:
_root
property
var
parentToolInsets
// These insets tell you what screen real estate is available for positioning the controls in your overlay
property
var
parentToolInsets
// These insets tell you what screen real estate is available for positioning the controls in your overlay
property
var
to
olInsets
:
_toolInsets
// These are the insets for your custom overlay additions
property
var
to
talToolInsets
:
_toolInsets
// These are the insets for your custom overlay additions
property
var
mapControl
property
var
mapControl
QGCToolInsets
{
QGCToolInsets
{
...
...
src/FlightDisplay/FlyViewMap.qml
View file @
ac08dd5a
src/FlightDisplay/FlyViewWidgetLayer.qml
View file @
ac08dd5a
src/PlanView/PlanToolBar.qml
View file @
ac08dd5a
...
@@ -32,7 +32,6 @@ Rectangle {
...
@@ -32,7 +32,6 @@ Rectangle {
id
:
settingsButton
id
:
settingsButton
Layout.fillHeight
:
true
Layout.fillHeight
:
true
icon.source
:
"
/qmlimages/PaperPlane.svg
"
icon.source
:
"
/qmlimages/PaperPlane.svg
"
logo
:
true
checked
:
false
checked
:
false
onClicked
:
{
onClicked
:
{
checked
=
false
checked
=
false
...
...
src/PlanView/PlanToolBarIndicators.qml
View file @
ac08dd5a
...
@@ -11,7 +11,7 @@ import QGroundControl.Palette 1.0
...
@@ -11,7 +11,7 @@ import QGroundControl.Palette 1.0
// Toolbar for Plan View
// Toolbar for Plan View
Item
{
Item
{
anchors.fill
:
parent
width
:
missionStats
.
width
+
_margins
property
var
_planMasterController
:
mainWindow
.
planMasterControllerPlanView
property
var
_planMasterController
:
mainWindow
.
planMasterControllerPlanView
property
var
_currentMissionItem
:
mainWindow
.
currentPlanMissionItem
///< Mission item to display status for
property
var
_currentMissionItem
:
mainWindow
.
currentPlanMissionItem
///< Mission item to display status for
...
@@ -109,11 +109,9 @@ Item {
...
@@ -109,11 +109,9 @@ Item {
anchors.top
:
parent
.
top
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
anchors.bottom
:
parent
.
bottom
anchors.leftMargin
:
_margins
anchors.leftMargin
:
_margins
anchors.rightMargin
:
_margins
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.right
:
uploadButton
.
visible
?
uploadButton
.
left
:
parent
.
right
columnSpacing
:
0
columnSpacing
:
0
columns
:
3
columns
:
4
GridLayout
{
GridLayout
{
columns
:
8
columns
:
8
...
@@ -226,23 +224,10 @@ Item {
...
@@ -226,23 +224,10 @@ Item {
}
}
Item
{
width
:
1
;
height
:
1
}
Item
{
width
:
1
;
height
:
1
}
/*
FIXME: Swap point display is currently hidden since the code which calcs it doesn't work correctly
QGCLabel { text: qsTr("Swap waypoint:"); font.pointSize: _dataFontSize; }
QGCLabel {
text: _batteryChangePointText
font.pointSize: _dataFontSize
Layout.minimumWidth: _mediumValueWidth
}
*/
}
}
}
QGCButton
{
QGCButton
{
id
:
uploadButton
id
:
uploadButton
anchors.rightMargin
:
_margins
anchors.right
:
parent
.
right
anchors.verticalCenter
:
parent
.
verticalCenter
text
:
_controllerDirty
?
qsTr
(
"
Upload Required
"
)
:
qsTr
(
"
Upload
"
)
text
:
_controllerDirty
?
qsTr
(
"
Upload Required
"
)
:
qsTr
(
"
Upload
"
)
enabled
:
!
_controllerSyncInProgress
enabled
:
!
_controllerSyncInProgress
visible
:
!
_controllerOffline
&&
!
_controllerSyncInProgress
&&
!
uploadCompleteText
.
visible
visible
:
!
_controllerOffline
&&
!
_controllerSyncInProgress
&&
!
uploadCompleteText
.
visible
...
@@ -259,6 +244,7 @@ Item {
...
@@ -259,6 +244,7 @@ Item {
duration
:
2000
duration
:
2000
}
}
}
}
}
// Small mission download progress bar
// Small mission download progress bar
Rectangle
{
Rectangle
{
...
@@ -277,16 +263,6 @@ Item {
...
@@ -277,16 +263,6 @@ Item {
}
}
}
}
/*
Rectangle {
anchors.bottom: parent.bottom
height: toolBar.height * 0.05
width: activeVehicle ? activeVehicle.parameterManager.loadProgress * parent.width : 0
color: qgcPal.colorGreen
visible: !largeProgressBar.visible
}
*/
// Large mission download progress bar
// Large mission download progress bar
Rectangle
{
Rectangle
{
id
:
largeProgressBar
id
:
largeProgressBar
...
...
src/QmlControls/QGCToolBarButton.qml
View file @
ac08dd5a
...
@@ -32,7 +32,7 @@ Button {
...
@@ -32,7 +32,7 @@ Button {
background
:
Rectangle
{
background
:
Rectangle
{
anchors.fill
:
parent
anchors.fill
:
parent
color
:
logo
?
qgcPal
.
brandingPurple
:
(
button
.
checked
?
qgcPal
.
buttonHighlight
:
Qt
.
rgba
(
0
,
0
,
0
,
0
)
)
color
:
button
.
checked
?
qgcPal
.
buttonHighlight
:
Qt
.
rgba
(
0
,
0
,
0
,
0
)
}
}
contentItem
:
Row
{
contentItem
:
Row
{
...
@@ -44,7 +44,7 @@ Button {
...
@@ -44,7 +44,7 @@ Button {
width
:
height
width
:
height
sourceSize.height
:
parent
.
height
sourceSize.height
:
parent
.
height
fillMode
:
Image
.
PreserveAspectFit
fillMode
:
Image
.
PreserveAspectFit
color
:
logo
?
"
white
"
:
(
button
.
checked
?
qgcPal
.
buttonHighlightText
:
qgcPal
.
buttonText
)
color
:
logo
?
"
transparent
"
:
(
button
.
checked
?
qgcPal
.
buttonHighlightText
:
qgcPal
.
buttonText
)
source
:
button
.
icon
.
source
source
:
button
.
icon
.
source
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
...
...
src/QmlControls/QGroundControl/Controls/qmldir
View file @
ac08dd5a
...
@@ -99,6 +99,7 @@ SurveyMapVisuals 1.0 SurveyMapVisuals.qml
...
@@ -99,6 +99,7 @@ SurveyMapVisuals 1.0 SurveyMapVisuals.qml
TerrainStatus 1.0 TerrainStatus.qml
TerrainStatus 1.0 TerrainStatus.qml
TransectStyleComplexItemStats 1.0 TransectStyleComplexItemStats.qml
TransectStyleComplexItemStats 1.0 TransectStyleComplexItemStats.qml
TransectStyleMapVisuals 1.0 TransectStyleMapVisuals.qml
TransectStyleMapVisuals 1.0 TransectStyleMapVisuals.qml
ToolBarBase 1.0 ToolBarBase.qml
ToolStrip 1.0 ToolStrip.qml
ToolStrip 1.0 ToolStrip.qml
VehicleRotationCal 1.0 VehicleRotationCal.qml
VehicleRotationCal 1.0 VehicleRotationCal.qml
VehicleSummaryRow 1.0 VehicleSummaryRow.qml
VehicleSummaryRow 1.0 VehicleSummaryRow.qml
...
...
src/Vehicle/Vehicle.cc
View file @
ac08dd5a
...
@@ -414,8 +414,8 @@ Vehicle::Vehicle(MAV_AUTOPILOT firmwareType,
...
@@ -414,8 +414,8 @@ Vehicle::Vehicle(MAV_AUTOPILOT firmwareType,
,
_flightDistanceFact
(
0
,
_flightDistanceFactName
,
FactMetaData
::
valueTypeDouble
)
,
_flightDistanceFact
(
0
,
_flightDistanceFactName
,
FactMetaData
::
valueTypeDouble
)
,
_flightTimeFact
(
0
,
_flightTimeFactName
,
FactMetaData
::
valueTypeElapsedTimeInSeconds
)
,
_flightTimeFact
(
0
,
_flightTimeFactName
,
FactMetaData
::
valueTypeElapsedTimeInSeconds
)
,
_distanceToHomeFact
(
0
,
_distanceToHomeFactName
,
FactMetaData
::
valueTypeDouble
)
,
_distanceToHomeFact
(
0
,
_distanceToHomeFactName
,
FactMetaData
::
valueTypeDouble
)
,
_headingToNextWPFact
(
0
,
_headingToNextWPFactName
,
FactMetaData
::
valueTypeDouble
)
,
_missionItemIndexFact
(
0
,
_missionItemIndexFactName
,
FactMetaData
::
valueTypeUint16
)
,
_missionItemIndexFact
(
0
,
_missionItemIndexFactName
,
FactMetaData
::
valueTypeUint16
)
,
_headingToNextWPFact
(
0
,
_headingToNextWPFactName
,
FactMetaData
::
valueTypeDouble
)
,
_headingToHomeFact
(
0
,
_headingToHomeFactName
,
FactMetaData
::
valueTypeDouble
)
,
_headingToHomeFact
(
0
,
_headingToHomeFactName
,
FactMetaData
::
valueTypeDouble
)
,
_distanceToGCSFact
(
0
,
_distanceToGCSFactName
,
FactMetaData
::
valueTypeDouble
)
,
_distanceToGCSFact
(
0
,
_distanceToGCSFactName
,
FactMetaData
::
valueTypeDouble
)
,
_hobbsFact
(
0
,
_hobbsFactName
,
FactMetaData
::
valueTypeString
)
,
_hobbsFact
(
0
,
_hobbsFactName
,
FactMetaData
::
valueTypeString
)
...
@@ -446,7 +446,8 @@ void Vehicle::_commonInit()
...
@@ -446,7 +446,8 @@ void Vehicle::_commonInit()
{
{
_firmwarePlugin
=
_firmwarePluginManager
->
firmwarePluginForAutopilot
(
_firmwareType
,
_vehicleType
);
_firmwarePlugin
=
_firmwarePluginManager
->
firmwarePluginForAutopilot
(
_firmwareType
,
_vehicleType
);
connect
(
_firmwarePlugin
,
&
FirmwarePlugin
::
toolbarIndicatorsChanged
,
this
,
&
Vehicle
::
toolBarIndicatorsChanged
);
connect
(
_firmwarePlugin
,
&
FirmwarePlugin
::
toolIndicatorsChanged
,
this
,
&
Vehicle
::
toolIndicatorsChanged
);
connect
(
_firmwarePlugin
,
&
FirmwarePlugin
::
modeIndicatorsChanged
,
this
,
&
Vehicle
::
modeIndicatorsChanged
);
connect
(
this
,
&
Vehicle
::
coordinateChanged
,
this
,
&
Vehicle
::
_updateDistanceHeadingToHome
);
connect
(
this
,
&
Vehicle
::
coordinateChanged
,
this
,
&
Vehicle
::
_updateDistanceHeadingToHome
);
connect
(
this
,
&
Vehicle
::
coordinateChanged
,
this
,
&
Vehicle
::
_updateDistanceToGCS
);
connect
(
this
,
&
Vehicle
::
coordinateChanged
,
this
,
&
Vehicle
::
_updateDistanceToGCS
);
...
@@ -3902,10 +3903,19 @@ QString Vehicle::vehicleImageCompass() const
...
@@ -3902,10 +3903,19 @@ QString Vehicle::vehicleImageCompass() const
return
QString
();
return
QString
();
}
}
const
QVariantList
&
Vehicle
::
toolBarIndicators
()
const
QVariantList
&
Vehicle
::
toolIndicators
()
{
if
(
_firmwarePlugin
)
{
return
_firmwarePlugin
->
toolIndicators
(
this
);
}
static
QVariantList
emptyList
;
return
emptyList
;
}
const
QVariantList
&
Vehicle
::
modeIndicators
()
{
{
if
(
_firmwarePlugin
)
{
if
(
_firmwarePlugin
)
{
return
_firmwarePlugin
->
toolBar
Indicators
(
this
);
return
_firmwarePlugin
->
mode
Indicators
(
this
);
}
}
static
QVariantList
emptyList
;
static
QVariantList
emptyList
;
return
emptyList
;
return
emptyList
;
...
...
src/Vehicle/Vehicle.h
View file @
ac08dd5a
...
@@ -615,7 +615,8 @@ public:
...
@@ -615,7 +615,8 @@ public:
Q_PROPERTY
(
unsigned
int
telemetryTXBuffer
READ
telemetryTXBuffer
NOTIFY
telemetryTXBufferChanged
)
Q_PROPERTY
(
unsigned
int
telemetryTXBuffer
READ
telemetryTXBuffer
NOTIFY
telemetryTXBufferChanged
)
Q_PROPERTY
(
int
telemetryLNoise
READ
telemetryLNoise
NOTIFY
telemetryLNoiseChanged
)
Q_PROPERTY
(
int
telemetryLNoise
READ
telemetryLNoise
NOTIFY
telemetryLNoiseChanged
)
Q_PROPERTY
(
int
telemetryRNoise
READ
telemetryRNoise
NOTIFY
telemetryRNoiseChanged
)
Q_PROPERTY
(
int
telemetryRNoise
READ
telemetryRNoise
NOTIFY
telemetryRNoiseChanged
)
Q_PROPERTY
(
QVariantList
toolBarIndicators
READ
toolBarIndicators
NOTIFY
toolBarIndicatorsChanged
)
Q_PROPERTY
(
QVariantList
toolIndicators
READ
toolIndicators
NOTIFY
toolIndicatorsChanged
)
Q_PROPERTY
(
QVariantList
modeIndicators
READ
modeIndicators
NOTIFY
modeIndicatorsChanged
)
Q_PROPERTY
(
bool
initialPlanRequestComplete
READ
initialPlanRequestComplete
NOTIFY
initialPlanRequestCompleteChanged
)
Q_PROPERTY
(
bool
initialPlanRequestComplete
READ
initialPlanRequestComplete
NOTIFY
initialPlanRequestCompleteChanged
)
Q_PROPERTY
(
QVariantList
staticCameraList
READ
staticCameraList
CONSTANT
)
Q_PROPERTY
(
QVariantList
staticCameraList
READ
staticCameraList
CONSTANT
)
Q_PROPERTY
(
QGCCameraManager
*
dynamicCameras
READ
dynamicCameras
NOTIFY
dynamicCamerasChanged
)
Q_PROPERTY
(
QGCCameraManager
*
dynamicCameras
READ
dynamicCameras
NOTIFY
dynamicCamerasChanged
)
...
@@ -1086,7 +1087,8 @@ public:
...
@@ -1086,7 +1087,8 @@ public:
QString
vehicleImageOutline
()
const
;
QString
vehicleImageOutline
()
const
;
QString
vehicleImageCompass
()
const
;
QString
vehicleImageCompass
()
const
;
const
QVariantList
&
toolBarIndicators
();
const
QVariantList
&
toolIndicators
();
const
QVariantList
&
modeIndicators
();
const
QVariantList
&
staticCameraList
()
const
;
const
QVariantList
&
staticCameraList
()
const
;
bool
capabilitiesKnown
()
const
{
return
_capabilityBitsKnown
;
}
bool
capabilitiesKnown
()
const
{
return
_capabilityBitsKnown
;
}
...
@@ -1160,7 +1162,8 @@ signals:
...
@@ -1160,7 +1162,8 @@ signals:
void
capabilitiesKnownChanged
(
bool
capabilitiesKnown
);
void
capabilitiesKnownChanged
(
bool
capabilitiesKnown
);
void
initialPlanRequestCompleteChanged
(
bool
initialPlanRequestComplete
);
void
initialPlanRequestCompleteChanged
(
bool
initialPlanRequestComplete
);
void
capabilityBitsChanged
(
uint64_t
capabilityBits
);
void
capabilityBitsChanged
(
uint64_t
capabilityBits
);
void
toolBarIndicatorsChanged
();
void
toolIndicatorsChanged
();
void
modeIndicatorsChanged
();
void
highLatencyLinkChanged
(
bool
highLatencyLink
);
void
highLatencyLinkChanged
(
bool
highLatencyLink
);
void
priorityLinkNameChanged
(
const
QString
&
priorityLinkName
);
void
priorityLinkNameChanged
(
const
QString
&
priorityLinkName
);
void
linksChanged
();
void
linksChanged
();
...
...
src/api/QGCCorePlugin.cc
View file @
ac08dd5a
...
@@ -516,8 +516,18 @@ QString QGCCorePlugin::stableVersionCheckFileUrl() const
...
@@ -516,8 +516,18 @@ QString QGCCorePlugin::stableVersionCheckFileUrl() const
#endif
#endif
}
}
QStringList
QStringList
QGCCorePlugin
::
startupPages
()
QGCCorePlugin
::
startupPages
()
{
{
return
{
"/qml/QGroundControl/Specific/UnitsWizardPage.qml"
};
return
{
"/qml/QGroundControl/Specific/UnitsWizardPage.qml"
};
}
}
const
QVariantList
&
QGCCorePlugin
::
toolBarIndicators
(
void
)
{
//-- Default list of indicators for all vehicles.
if
(
_toolBarIndicatorList
.
size
()
==
0
)
{
_toolBarIndicatorList
=
QVariantList
({
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/GPSRTKIndicator.qml"
)),
});
}
return
_toolBarIndicatorList
;
}
src/api/QGCCorePlugin.h
View file @
ac08dd5a
...
@@ -58,7 +58,7 @@ public:
...
@@ -58,7 +58,7 @@ public:
Q_PROPERTY
(
QString
brandImageOutdoor
READ
brandImageOutdoor
CONSTANT
)
Q_PROPERTY
(
QString
brandImageOutdoor
READ
brandImageOutdoor
CONSTANT
)
Q_PROPERTY
(
QmlObjectListModel
*
customMapItems
READ
customMapItems
CONSTANT
)
Q_PROPERTY
(
QmlObjectListModel
*
customMapItems
READ
customMapItems
CONSTANT
)
Q_PROPERTY
(
QStringList
startupPages
READ
startupPages
NOTIFY
startupPagesChanged
)
Q_PROPERTY
(
QStringList
startupPages
READ
startupPages
NOTIFY
startupPagesChanged
)
Q_PROPERTY
(
QVariantList
toolBarIndicators
READ
toolBarIndicators
NOTIFY
toolBarIndicatorsChanged
)
Q_INVOKABLE
bool
guidedActionsControllerLogging
()
const
;
Q_INVOKABLE
bool
guidedActionsControllerLogging
()
const
;
...
@@ -172,6 +172,11 @@ public:
...
@@ -172,6 +172,11 @@ public:
/// @return QML files paths that will be loaded using the StartupWizard control
/// @return QML files paths that will be loaded using the StartupWizard control
virtual
QStringList
startupPages
();
virtual
QStringList
startupPages
();
/// Returns the list of toolbar indicators which are not related to a vehicle
/// signals toolbarIndicatorsChanged
/// @return A list of QUrl with the indicators
virtual
const
QVariantList
&
toolBarIndicators
(
void
);
bool
showTouchAreas
()
const
{
return
_showTouchAreas
;
}
bool
showTouchAreas
()
const
{
return
_showTouchAreas
;
}
bool
showAdvancedUI
()
const
{
return
_showAdvancedUI
;
}
bool
showAdvancedUI
()
const
{
return
_showAdvancedUI
;
}
void
setShowTouchAreas
(
bool
show
);
void
setShowTouchAreas
(
bool
show
);
...
@@ -187,6 +192,7 @@ signals:
...
@@ -187,6 +192,7 @@ signals:
void
showTouchAreasChanged
(
bool
showTouchAreas
);
void
showTouchAreasChanged
(
bool
showTouchAreas
);
void
showAdvancedUIChanged
(
bool
showAdvancedUI
);
void
showAdvancedUIChanged
(
bool
showAdvancedUI
);
void
startupPagesChanged
();
void
startupPagesChanged
();
void
toolBarIndicatorsChanged
();
protected
slots
:
protected
slots
:
void
_activeVehicleChanged
(
Vehicle
*
activeVehicle
);
void
_activeVehicleChanged
(
Vehicle
*
activeVehicle
);
...
@@ -203,6 +209,7 @@ protected:
...
@@ -203,6 +209,7 @@ protected:
Vehicle
*
_activeVehicle
=
nullptr
;
Vehicle
*
_activeVehicle
=
nullptr
;
QGCCameraManager
*
_dynamicCameras
=
nullptr
;
QGCCameraManager
*
_dynamicCameras
=
nullptr
;
QGCCameraControl
*
_currentCamera
=
nullptr
;
QGCCameraControl
*
_currentCamera
=
nullptr
;
QVariantList
_toolBarIndicatorList
;
private:
private:
QGCCorePlugin_p
*
_p
;
QGCCorePlugin_p
*
_p
;
...
...
src/api/QGCOptions.cc
View file @
ac08dd5a
...
@@ -21,16 +21,6 @@ QGCOptions::QGCOptions(QObject* parent)
...
@@ -21,16 +21,6 @@ QGCOptions::QGCOptions(QObject* parent)
QQmlEngine
::
setObjectOwnership
(
this
,
QQmlEngine
::
CppOwnership
);
QQmlEngine
::
setObjectOwnership
(
this
,
QQmlEngine
::
CppOwnership
);
}
}
QUrl
QGCOptions
::
mainToolbarUrl
()
const
{
return
QUrl
(
QStringLiteral
(
"qrc:/toolbar/MainToolBar.qml"
));
}
QUrl
QGCOptions
::
planToolbarUrl
()
const
{
return
QUrl
(
QStringLiteral
(
"qrc:/qml/PlanToolBar.qml"
));
}
QColor
QGCOptions
::
toolbarBackgroundLight
()
const
QColor
QGCOptions
::
toolbarBackgroundLight
()
const
{
{
return
QColor
(
255
,
255
,
255
,
204
);
return
QColor
(
255
,
255
,
255
,
204
);
...
@@ -41,11 +31,6 @@ QColor QGCOptions::toolbarBackgroundDark() const
...
@@ -41,11 +31,6 @@ QColor QGCOptions::toolbarBackgroundDark() const
return
QColor
(
0
,
0
,
0
,
192
);
return
QColor
(
0
,
0
,
0
,
192
);
}
}
QUrl
QGCOptions
::
planToolbarIndicatorsUrl
()
const
{
return
QUrl
(
QStringLiteral
(
"PlanToolBar.qml"
));
}
QGCFlyViewOptions
*
QGCOptions
::
flyViewOptions
(
void
)
QGCFlyViewOptions
*
QGCOptions
::
flyViewOptions
(
void
)
{
{
if
(
!
_defaultFlyViewOptions
)
{
if
(
!
_defaultFlyViewOptions
)
{
...
...
src/api/QGCOptions.h
View file @
ac08dd5a
...
@@ -55,11 +55,8 @@ public:
...
@@ -55,11 +55,8 @@ public:
Q_PROPERTY
(
double
toolbarHeightMultiplier
READ
toolbarHeightMultiplier
CONSTANT
)
Q_PROPERTY
(
double
toolbarHeightMultiplier
READ
toolbarHeightMultiplier
CONSTANT
)
Q_PROPERTY
(
bool
enablePlanViewSelector
READ
enablePlanViewSelector
CONSTANT
)
Q_PROPERTY
(
bool
enablePlanViewSelector
READ
enablePlanViewSelector
CONSTANT
)
Q_PROPERTY
(
QUrl
preFlightChecklistUrl
READ
preFlightChecklistUrl
CONSTANT
)
Q_PROPERTY
(
QUrl
preFlightChecklistUrl
READ
preFlightChecklistUrl
CONSTANT
)
Q_PROPERTY
(
QUrl
mainToolbarUrl
READ
mainToolbarUrl
CONSTANT
)
Q_PROPERTY
(
QUrl
planToolbarUrl
READ
planToolbarUrl
CONSTANT
)
Q_PROPERTY
(
QColor
toolbarBackgroundLight
READ
toolbarBackgroundLight
CONSTANT
)
Q_PROPERTY
(
QColor
toolbarBackgroundLight
READ
toolbarBackgroundLight
CONSTANT
)
Q_PROPERTY
(
QColor
toolbarBackgroundDark
READ
toolbarBackgroundDark
CONSTANT
)
Q_PROPERTY
(
QColor
toolbarBackgroundDark
READ
toolbarBackgroundDark
CONSTANT
)
Q_PROPERTY
(
QUrl
planToolbarIndicatorsUrl
READ
planToolbarIndicatorsUrl
CONSTANT
)
Q_PROPERTY
(
bool
showSensorCalibrationCompass
READ
showSensorCalibrationCompass
NOTIFY
showSensorCalibrationCompassChanged
)
Q_PROPERTY
(
bool
showSensorCalibrationCompass
READ
showSensorCalibrationCompass
NOTIFY
showSensorCalibrationCompassChanged
)
Q_PROPERTY
(
bool
showSensorCalibrationGyro
READ
showSensorCalibrationGyro
NOTIFY
showSensorCalibrationGyroChanged
)
Q_PROPERTY
(
bool
showSensorCalibrationGyro
READ
showSensorCalibrationGyro
NOTIFY
showSensorCalibrationGyroChanged
)
Q_PROPERTY
(
bool
showSensorCalibrationAccel
READ
showSensorCalibrationAccel
NOTIFY
showSensorCalibrationAccelChanged
)
Q_PROPERTY
(
bool
showSensorCalibrationAccel
READ
showSensorCalibrationAccel
NOTIFY
showSensorCalibrationAccelChanged
)
...
@@ -107,16 +104,10 @@ public:
...
@@ -107,16 +104,10 @@ public:
/// Provides an optional, custom preflight checklist
/// Provides an optional, custom preflight checklist
virtual
QUrl
preFlightChecklistUrl
()
const
{
return
QUrl
::
fromUserInput
(
"qrc:/qml/PreFlightCheckList.qml"
);
}
virtual
QUrl
preFlightChecklistUrl
()
const
{
return
QUrl
::
fromUserInput
(
"qrc:/qml/PreFlightCheckList.qml"
);
}
/// Allows replacing the Main toolbar
virtual
QUrl
mainToolbarUrl
()
const
;
/// Allows replacing the Plan View toolbar
virtual
QUrl
planToolbarUrl
()
const
;
/// Allows replacing the toolbar Light Theme color
/// Allows replacing the toolbar Light Theme color
virtual
QColor
toolbarBackgroundLight
()
const
;
virtual
QColor
toolbarBackgroundLight
()
const
;
/// Allows replacing the toolbar Dark Theme color
/// Allows replacing the toolbar Dark Theme color
virtual
QColor
toolbarBackgroundDark
()
const
;
virtual
QColor
toolbarBackgroundDark
()
const
;
/// Allows replacing the Plan View toolbar container
virtual
QUrl
planToolbarIndicatorsUrl
()
const
;
/// By returning false you can hide the following sensor calibration pages
/// By returning false you can hide the following sensor calibration pages
virtual
bool
showSensorCalibrationCompass
()
const
{
return
true
;
}
virtual
bool
showSensorCalibrationCompass
()
const
{
return
true
;
}
virtual
bool
showSensorCalibrationGyro
()
const
{
return
true
;
}
virtual
bool
showSensorCalibrationGyro
()
const
{
return
true
;
}
...
...
src/ui/MainRootWindow.qml
View file @
ac08dd5a
...
@@ -49,10 +49,7 @@ ApplicationWindow {
...
@@ -49,10 +49,7 @@ ApplicationWindow {
property
var
_rgPreventViewSwitch
:
[
false
]
property
var
_rgPreventViewSwitch
:
[
false
]
readonly
property
real
_topBottomMargins
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
readonly
property
real
_topBottomMargins
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
readonly
property
string
_mainToolbar
:
QGroundControl
.
corePlugin
.
options
.
mainToolbarUrl
readonly
property
string
_planToolbar
:
QGroundControl
.
corePlugin
.
options
.
planToolbarUrl
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
//-- Global Scope Variables
//-- Global Scope Variables
...
@@ -107,44 +104,47 @@ ApplicationWindow {
...
@@ -107,44 +104,47 @@ ApplicationWindow {
return
_rgPreventViewSwitch
[
_rgPreventViewSwitch
.
length
-
1
]
return
_rgPreventViewSwitch
[
_rgPreventViewSwitch
.
length
-
1
]
}
}
function
viewSwitch
(
isPlanView
)
{
function
viewSwitch
(
isPlanView
,
showModeIndicators
)
{
settingsWindow
.
visible
=
false
settingsWindow
.
visible
=
false
setupWindow
.
visible
=
false
setupWindow
.
visible
=
false
analyzeWindow
.
visible
=
false
analyzeWindow
.
visible
=
false
flightView
.
visible
=
false
flightView
.
visible
=
false
planViewLoader
.
visible
=
false
planViewLoader
.
visible
=
false
if
(
isPlanView
)
{
var
indicatorSource
toolbar
.
source
=
_planToolbar
if
(
isPlanView
)
{
indicatorSource
=
"
qrc:/qml/PlanToolBarIndicators.qml
"
}
else
{
}
else
{
toolbar
.
source
=
_mainToolbar
indicatorSource
=
"
qrc:/toolbar/MainToolBarIndicators.qml
"
}
}
toolbar
.
item
.
indicatorSource
=
indicatorSource
toolbar
.
item
.
showModeIndicators
=
showModeIndicators
}
}
function
showFlyView
()
{
function
showFlyView
()
{
if
(
!
flightView
.
visible
)
{
if
(
!
flightView
.
visible
)
{
mainWindow
.
showPreFlightChecklistIfNeeded
()
mainWindow
.
showPreFlightChecklistIfNeeded
()
}
}
viewSwitch
(
false
)
viewSwitch
(
false
,
true
)
flightView
.
visible
=
true
flightView
.
visible
=
true
}
}
function
showPlanView
()
{
function
showPlanView
()
{
viewSwitch
(
true
)
viewSwitch
(
true
,
false
)
planViewLoader
.
visible
=
true
planViewLoader
.
visible
=
true
}
}
function
showAnalyzeView
()
{
function
showAnalyzeView
()
{
viewSwitch
(
false
)
viewSwitch
(
false
,
false
)
analyzeWindow
.
visible
=
true
analyzeWindow
.
visible
=
true
}
}
function
showSetupView
()
{
function
showSetupView
()
{
viewSwitch
(
false
)
viewSwitch
(
false
,
false
)
setupWindow
.
visible
=
true
setupWindow
.
visible
=
true
}
}
function
showSettingsView
()
{
function
showSettingsView
()
{
viewSwitch
(
false
)
viewSwitch
(
false
,
false
)
settingsWindow
.
visible
=
true
settingsWindow
.
visible
=
true
}
}
...
@@ -330,7 +330,7 @@ ApplicationWindow {
...
@@ -330,7 +330,7 @@ ApplicationWindow {
Loader
{
Loader
{
id
:
toolbar
id
:
toolbar
anchors.fill
:
parent
anchors.fill
:
parent
source
:
_mainToolbar
source
:
"
qrc:/toolbar/MainToolBar.qml
"
//-- Toggle Full Screen / Windowed
//-- Toggle Full Screen / Windowed
MouseArea
{
MouseArea
{
anchors.fill
:
parent
anchors.fill
:
parent
...
...
src/ui/toolbar/MainToolBar.qml
View file @
ac08dd5a
This diff is collapsed.
Click to expand it.
src/ui/toolbar/MainToolBarIndicators.qml
View file @
ac08dd5a
...
@@ -7,15 +7,10 @@
...
@@ -7,15 +7,10 @@
*
*
****************************************************************************/
****************************************************************************/
import
QtQuick
2.11
import
QtQuick
2.12
import
QtQuick
.
Controls
2.4
import
QtQuick
.
Layouts
1.11
import
QGroundControl
1.0
import
QGroundControl
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
MultiVehicleManager
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Palette
1.0
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
//-- Toolbar Indicators
//-- Toolbar Indicators
...
@@ -23,15 +18,41 @@ Row {
...
@@ -23,15 +18,41 @@ Row {
id
:
indicatorRow
id
:
indicatorRow
anchors.top
:
parent
.
top
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
anchors.bottom
:
parent
.
bottom
anchors.margins
:
_toolIndicatorMargins
spacing
:
ScreenTools
.
defaultFontPixelWidth
*
1.5
spacing
:
ScreenTools
.
defaultFontPixelWidth
*
1.5
// This property should come in from the Loader
//property bool showModeIndicators: true
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
real
_toolIndicatorMargins
:
ScreenTools
.
defaultFontPixelHeight
*
0.66
Repeater
{
id
:
appRepeater
model
:
QGroundControl
.
corePlugin
.
toolBarIndicators
Loader
{
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
source
:
modelData
visible
:
item
.
showIndicator
}
}
Repeater
{
model
:
_activeVehicle
?
_activeVehicle
.
toolIndicators
:
[]
Loader
{
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
source
:
modelData
visible
:
item
.
showIndicator
}
}
Repeater
{
Repeater
{
model
:
activeVehicle
?
activeVehicle
.
toolBar
Indicators
:
[]
model
:
_activeVehicle
&&
showModeIndicators
?
_activeVehicle
.
mode
Indicators
:
[]
Loader
{
Loader
{
id
:
indicatorLoader
anchors.top
:
parent
.
top
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
anchors.bottom
:
parent
.
bottom
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
*
0.66
source
:
modelData
source
:
modelData
visible
:
item
.
showIndicator
visible
:
item
.
showIndicator
}
}
...
...
src/ui/toolbar/ToolBarBase.qml
0 → 100644
View file @
ac08dd5a
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