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
c0421290
Commit
c0421290
authored
Mar 12, 2017
by
Donald Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UI Tweaks to plan view editors
parent
3da11f8b
Changes
17
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
268 additions
and
284 deletions
+268
-284
qgroundcontrol.qrc
qgroundcontrol.qrc
+1
-0
FactTextFieldGrid.qml
src/FactSystem/FactControls/FactTextFieldGrid.qml
+3
-2
MavCmdInfoCommon.json
src/FirmwarePlugin/APM/MavCmdInfoCommon.json
+5
-5
CameraMetaData.cc
src/FirmwarePlugin/CameraMetaData.cc
+4
-0
CameraMetaData.h
src/FirmwarePlugin/CameraMetaData.h
+12
-6
FirmwarePlugin.cc
src/FirmwarePlugin/FirmwarePlugin.cc
+21
-9
MavCmdInfoFixedWing.json
src/FirmwarePlugin/PX4/MavCmdInfoFixedWing.json
+1
-1
FWLandingPatternEditor.qml
src/MissionEditor/FWLandingPatternEditor.qml
+3
-17
MissionItemEditor.qml
src/MissionEditor/MissionItemEditor.qml
+1
-0
MissionSettingsEditor.qml
src/MissionEditor/MissionSettingsEditor.qml
+12
-21
SectionHeader.qml
src/MissionEditor/SectionHeader.qml
+24
-0
SurveyItemEditor.qml
src/MissionEditor/SurveyItemEditor.qml
+59
-106
MavCmdInfoCommon.json
src/MissionManager/MavCmdInfoCommon.json
+101
-101
SimpleMissionItem.cc
src/MissionManager/SimpleMissionItem.cc
+8
-8
SurveyMissionItem.cc
src/MissionManager/SurveyMissionItem.cc
+1
-0
SurveyMissionItem.h
src/MissionManager/SurveyMissionItem.h
+11
-8
QGroundControl.Controls.qmldir
src/QmlControls/QGroundControl.Controls.qmldir
+1
-0
No files found.
qgroundcontrol.qrc
View file @
c0421290
...
...
@@ -101,6 +101,7 @@
<file alias="QGroundControl/Controls/RallyPointItemEditor.qml">src/MissionEditor/RallyPointItemEditor.qml</file>
<file alias="QGroundControl/Controls/RCChannelMonitor.qml">src/QmlControls/RCChannelMonitor.qml</file>
<file alias="QGroundControl/Controls/RoundButton.qml">src/QmlControls/RoundButton.qml</file>
<file alias="QGroundControl/Controls/SectionHeader.qml">src/MissionEditor/SectionHeader.qml</file>
<file alias="QGroundControl/Controls/SetupPage.qml">src/AutoPilotPlugins/Common/SetupPage.qml</file>
<file alias="QGroundControl/Controls/SignalStrength.qml">src/ui/toolbar/SignalStrength.qml</file>
<file alias="QGroundControl/Controls/SimpleItemMapVisual.qml">src/MissionEditor/SimpleItemMapVisual.qml</file>
...
...
src/FactSystem/FactControls/FactTextFieldGrid.qml
View file @
c0421290
...
...
@@ -6,6 +6,7 @@ import QGroundControl.Controls 1.0
GridLayout
{
property
var
factList
///< List of Facts to show
property
var
factLabels
///< Labels for facts, if not set, use Fact.name
rows
:
factList
.
length
flow
:
GridLayout
.
TopToBottom
...
...
@@ -13,7 +14,7 @@ GridLayout {
Repeater
{
model
:
parent
.
factList
QGCLabel
{
text
:
modelData
.
name
+
"
:
"
}
QGCLabel
{
text
:
factLabels
?
factLabels
[
index
]
:
modelData
.
name
}
}
Repeater
{
...
...
src/FirmwarePlugin/APM/MavCmdInfoCommon.json
View file @
c0421290
...
...
@@ -38,7 +38,7 @@
"id"
:
181
,
"comment"
:
"MAV_CMD_DO_SET_RELAY"
,
"param2"
:
{
"label"
:
"Setting
:
"
,
"label"
:
"Setting"
,
"enumStrings"
:
"On,Off"
,
"enumValues"
:
"1,0"
,
"default"
:
1
...
...
@@ -54,19 +54,19 @@
"comment"
:
"MAV_CMD_DO_MOUNT_CONTROL"
,
"paramRemove"
:
"7"
,
"param1"
:
{
"label"
:
"Pitch
:
"
,
"label"
:
"Pitch"
,
"default"
:
0
,
"units"
:
"deg"
,
"decimalPlaces"
:
2
},
"param2"
:
{
"label"
:
"Roll
:
"
,
"label"
:
"Roll"
,
"default"
:
0
,
"units"
:
"deg"
,
"decimalPlaces"
:
2
},
"param3"
:
{
"label"
:
"Yaw
:
"
,
"label"
:
"Yaw"
,
"default"
:
0
,
"units"
:
"deg"
,
"decimalPlaces"
:
2
...
...
@@ -76,7 +76,7 @@
"id"
:
207
,
"comment"
:
"MAV_CMD_DO_FENCE_ENABLE"
,
"param1"
:
{
"label"
:
"Enable
:
"
,
"label"
:
"Enable"
,
"enumStrings"
:
"Enable,Disable"
,
"enumValues"
:
"1,0"
,
"default"
:
1
...
...
src/FirmwarePlugin/CameraMetaData.cc
View file @
c0421290
...
...
@@ -15,6 +15,8 @@ CameraMetaData::CameraMetaData(const QString& name,
double
imageWidth
,
double
imageHeight
,
double
focalLength
,
bool
landscape
,
bool
fixedOrientation
,
QObject
*
parent
)
:
QObject
(
parent
)
,
_name
(
name
)
...
...
@@ -23,6 +25,8 @@ CameraMetaData::CameraMetaData(const QString& name,
,
_imageWidth
(
imageWidth
)
,
_imageHeight
(
imageHeight
)
,
_focalLength
(
focalLength
)
,
_landscape
(
landscape
)
,
_fixedOrientation
(
fixedOrientation
)
{
}
src/FirmwarePlugin/CameraMetaData.h
View file @
c0421290
...
...
@@ -24,6 +24,8 @@ public:
double
imageWidth
,
double
imageHeight
,
double
focalLength
,
bool
landscape
,
bool
fixedOrientation
,
QObject
*
parent
=
NULL
);
Q_PROPERTY
(
QString
name
MEMBER
_name
CONSTANT
)
///< Camera name
...
...
@@ -32,6 +34,8 @@ public:
Q_PROPERTY
(
double
imageWidth
MEMBER
_imageWidth
CONSTANT
)
///< Image size in pixels
Q_PROPERTY
(
double
imageHeight
MEMBER
_imageHeight
CONSTANT
)
///< Image size in pixels
Q_PROPERTY
(
double
focalLength
MEMBER
_focalLength
CONSTANT
)
///< Focal length in millimeters
Q_PROPERTY
(
bool
landscape
MEMBER
_landscape
CONSTANT
)
///< true: camera is in landscape orientation
Q_PROPERTY
(
bool
fixedOrientation
MEMBER
_fixedOrientation
CONSTANT
)
///< true: camera is in fixed orientation
private:
QString
_name
;
...
...
@@ -40,6 +44,8 @@ private:
double
_imageWidth
;
double
_imageHeight
;
double
_focalLength
;
bool
_landscape
;
bool
_fixedOrientation
;
};
#endif
src/FirmwarePlugin/FirmwarePlugin.cc
View file @
c0421290
...
...
@@ -369,6 +369,8 @@ const QVariantList& FirmwarePlugin::cameraList(const Vehicle* vehicle)
4000
,
// imageWidth
3000
,
// imageHeight
14
,
// focalLength
true
,
// landscape orientation
true
,
// camera orientation is fixed
this
);
// parent
_cameraList
.
append
(
QVariant
::
fromValue
(
metaData
));
...
...
@@ -378,6 +380,8 @@ const QVariantList& FirmwarePlugin::cameraList(const Vehicle* vehicle)
5456
,
3632
,
16
,
true
,
false
,
this
);
_cameraList
.
append
(
QVariant
::
fromValue
(
metaData
));
...
...
@@ -387,6 +391,8 @@ const QVariantList& FirmwarePlugin::cameraList(const Vehicle* vehicle)
4000
,
3000
,
5.2
,
true
,
false
,
this
);
_cameraList
.
append
(
QVariant
::
fromValue
(
metaData
));
...
...
@@ -396,6 +402,8 @@ const QVariantList& FirmwarePlugin::cameraList(const Vehicle* vehicle)
4000
,
3000
,
4.5
,
true
,
false
,
this
);
metaData
=
new
CameraMetaData
(
tr
(
"Canon EOS-M 22mm"
),
...
...
@@ -404,6 +412,8 @@ const QVariantList& FirmwarePlugin::cameraList(const Vehicle* vehicle)
5184
,
3456
,
22
,
true
,
false
,
this
);
_cameraList
.
append
(
QVariant
::
fromValue
(
metaData
));
...
...
@@ -413,6 +423,8 @@ const QVariantList& FirmwarePlugin::cameraList(const Vehicle* vehicle)
6000
,
4000
,
16
,
true
,
false
,
this
);
_cameraList
.
append
(
QVariant
::
fromValue
(
metaData
));
}
...
...
src/FirmwarePlugin/PX4/MavCmdInfoFixedWing.json
View file @
c0421290
...
...
@@ -9,7 +9,7 @@
"comment"
:
"MAV_CMD_NAV_LAND"
,
"paramRemove"
:
"1,4"
,
"param7"
:
{
"label"
:
"Altitude
:
"
,
"label"
:
"Altitude"
,
"units"
:
"m"
,
"default"
:
0
,
"decimalPlaces"
:
1
...
...
src/MissionEditor/FWLandingPatternEditor.qml
View file @
c0421290
...
...
@@ -31,7 +31,7 @@ Rectangle {
//property real availableWidth ///< Width for control
//property var missionItem ///< Mission Item for editor
property
real
_margin
:
ScreenTools
.
defaultFontPixelWidth
/
4
property
real
_margin
:
ScreenTools
.
defaultFontPixelWidth
/
2
property
real
_spacer
:
ScreenTools
.
defaultFontPixelWidth
/
2
Column
{
...
...
@@ -51,14 +51,7 @@ Rectangle {
Item
{
width
:
1
;
height
:
_margin
}
QGCLabel
{
text
:
qsTr
(
"
Loiter point
"
)
}
Rectangle
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
height
:
1
color
:
qgcPal
.
text
}
SectionHeader
{
text
:
qsTr
(
"
Loiter point
"
)
}
Item
{
width
:
1
;
height
:
_spacer
}
...
...
@@ -89,14 +82,7 @@ Rectangle {
Item
{
width
:
1
;
height
:
ScreenTools
.
defaultFontPixelHeight
/
2
}
QGCLabel
{
text
:
qsTr
(
"
Landing point
"
)
}
Rectangle
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
height
:
1
color
:
qgcPal
.
text
}
SectionHeader
{
text
:
qsTr
(
"
Landing point
"
)
}
Item
{
width
:
1
;
height
:
_spacer
}
...
...
src/MissionEditor/MissionItemEditor.qml
View file @
c0421290
...
...
@@ -29,6 +29,7 @@ Rectangle {
property
bool
_currentItem
:
missionItem
.
isCurrentItem
property
color
_outerTextColor
:
_currentItem
?
"
black
"
:
qgcPal
.
text
property
bool
_noMissionItemsAdded
:
ListView
.
view
.
model
.
count
==
1
property
real
_sectionSpacer
:
ScreenTools
.
defaultFontPixelWidth
/
2
// spacing between section headings
readonly
property
real
_editFieldWidth
:
Math
.
min
(
width
-
_margin
*
2
,
ScreenTools
.
defaultFontPixelWidth
*
12
)
readonly
property
real
_margin
:
ScreenTools
.
defaultFontPixelWidth
/
2
...
...
src/MissionEditor/MissionSettingsEditor.qml
View file @
c0421290
...
...
@@ -42,8 +42,8 @@ Rectangle {
property
real
_fieldWidth
:
ScreenTools
.
defaultFontPixelWidth
*
16
property
bool
_mobile
:
ScreenTools
.
isMobile
readonly
property
string
_firmwareLabel
:
qsTr
(
"
Firmware
:
"
)
readonly
property
string
_vehicleLabel
:
qsTr
(
"
Vehicle
:
"
)
readonly
property
string
_firmwareLabel
:
qsTr
(
"
Firmware
"
)
readonly
property
string
_vehicleLabel
:
qsTr
(
"
Vehicle
"
)
QGCPalette
{
id
:
qgcPal
}
...
...
@@ -54,14 +54,7 @@ Rectangle {
anchors.top
:
parent
.
top
spacing
:
_margin
QGCLabel
{
text
:
qsTr
(
"
Planned Home Position
"
)
}
Rectangle
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
height
:
1
color
:
qgcPal
.
text
}
SectionHeader
{
text
:
qsTr
(
"
Planned Home Position
"
)
}
Repeater
{
model
:
missionItem
.
textFieldFacts
...
...
@@ -100,16 +93,14 @@ Rectangle {
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
QGCLabel
{
text
:
qsTr
(
"
Vehicle Info
"
)
visible
:
_multipleFirmware
Item
{
height
:
_sectionSpacer
width
:
1
visible
:
!
ScreenTools
.
isTinyScreen
}
Rectangle
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
height
:
1
color
:
qgcPal
.
text
SectionHeader
{
text
:
qsTr
(
"
Vehicle Info
"
)
visible
:
_multipleFirmware
}
...
...
@@ -147,7 +138,7 @@ Rectangle {
}
QGCLabel
{
text
:
qsTr
(
"
Cruise speed
:
"
)
text
:
qsTr
(
"
Cruise speed
"
)
visible
:
_showCruiseSpeed
Layout.fillWidth
:
true
}
...
...
@@ -158,7 +149,7 @@ Rectangle {
}
QGCLabel
{
text
:
qsTr
(
"
Hover speed
:
"
)
text
:
qsTr
(
"
Hover speed
"
)
visible
:
_showHoverSpeed
Layout.fillWidth
:
true
}
...
...
@@ -174,7 +165,7 @@ Rectangle {
anchors.right
:
parent
.
right
spacing
:
_margin
visible
:
!
_multipleFirmware
QGCLabel
{
text
:
qsTr
(
"
Hover speed
:
"
);
Layout.fillWidth
:
true
}
QGCLabel
{
text
:
qsTr
(
"
Hover speed
"
);
Layout.fillWidth
:
true
}
FactTextField
{
Layout.preferredWidth
:
_fieldWidth
fact
:
QGroundControl
.
settingsManager
.
appSettings
.
offlineEditingHoverSpeed
...
...
src/MissionEditor/SectionHeader.qml
0 → 100644
View file @
c0421290
import
QtQuick
2.3
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Layouts
1.2
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Palette
1.0
Column
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
property
alias
text
:
label
.
text
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
true
}
QGCLabel
{
id
:
label
}
Rectangle
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
height
:
1
color
:
qgcPal
.
text
}
}
src/MissionEditor/SurveyItemEditor.qml
View file @
c0421290
This diff is collapsed.
Click to expand it.
src/MissionManager/MavCmdInfoCommon.json
View file @
c0421290
This diff is collapsed.
Click to expand it.
src/MissionManager/SimpleMissionItem.cc
View file @
c0421290
...
...
@@ -343,25 +343,25 @@ QmlObjectListModel* SimpleMissionItem::textFieldFacts(void)
QmlObjectListModel
*
model
=
new
QmlObjectListModel
(
this
);
if
(
rawEdit
())
{
_missionItem
.
_param1Fact
.
_setName
(
"Param1
:
"
);
_missionItem
.
_param1Fact
.
_setName
(
"Param1"
);
_missionItem
.
_param1Fact
.
setMetaData
(
_defaultParamMetaData
);
model
->
append
(
&
_missionItem
.
_param1Fact
);
_missionItem
.
_param2Fact
.
_setName
(
"Param2
:
"
);
_missionItem
.
_param2Fact
.
_setName
(
"Param2"
);
_missionItem
.
_param2Fact
.
setMetaData
(
_defaultParamMetaData
);
model
->
append
(
&
_missionItem
.
_param2Fact
);
_missionItem
.
_param3Fact
.
_setName
(
"Param3
:
"
);
_missionItem
.
_param3Fact
.
_setName
(
"Param3"
);
_missionItem
.
_param3Fact
.
setMetaData
(
_defaultParamMetaData
);
model
->
append
(
&
_missionItem
.
_param3Fact
);
_missionItem
.
_param4Fact
.
_setName
(
"Param4
:
"
);
_missionItem
.
_param4Fact
.
_setName
(
"Param4"
);
_missionItem
.
_param4Fact
.
setMetaData
(
_defaultParamMetaData
);
model
->
append
(
&
_missionItem
.
_param4Fact
);
_missionItem
.
_param5Fact
.
_setName
(
"Lat/X
:
"
);
_missionItem
.
_param5Fact
.
_setName
(
"Lat/X"
);
_missionItem
.
_param5Fact
.
setMetaData
(
_defaultParamMetaData
);
model
->
append
(
&
_missionItem
.
_param5Fact
);
_missionItem
.
_param6Fact
.
_setName
(
"Lon/Y
:
"
);
_missionItem
.
_param6Fact
.
_setName
(
"Lon/Y"
);
_missionItem
.
_param6Fact
.
setMetaData
(
_defaultParamMetaData
);
model
->
append
(
&
_missionItem
.
_param6Fact
);
_missionItem
.
_param7Fact
.
_setName
(
"Alt/Z
:
"
);
_missionItem
.
_param7Fact
.
_setName
(
"Alt/Z"
);
_missionItem
.
_param7Fact
.
setMetaData
(
_defaultParamMetaData
);
model
->
append
(
&
_missionItem
.
_param7Fact
);
}
else
{
...
...
@@ -399,7 +399,7 @@ QmlObjectListModel* SimpleMissionItem::textFieldFacts(void)
}
if
(
specifiesCoordinate
()
&&
!
altitudeAdded
)
{
_missionItem
.
_param7Fact
.
_setName
(
"Altitude
:
"
);
_missionItem
.
_param7Fact
.
_setName
(
"Altitude"
);
_missionItem
.
_param7Fact
.
setMetaData
(
_altitudeMetaData
);
model
->
append
(
&
_missionItem
.
_param7Fact
);
}
...
...
src/MissionManager/SurveyMissionItem.cc
View file @
c0421290
...
...
@@ -68,6 +68,7 @@ SurveyMissionItem::SurveyMissionItem(Vehicle* vehicle, QObject* parent)
:
ComplexMissionItem
(
vehicle
,
parent
)
,
_sequenceNumber
(
0
)
,
_dirty
(
false
)
,
_cameraOrientationFixed
(
false
)
,
_surveyDistance
(
0.0
)
,
_cameraShots
(
0
)
,
_coveredArea
(
0.0
)
...
...
src/MissionManager/SurveyMissionItem.h
View file @
c0421290
...
...
@@ -45,6 +45,8 @@ public:
Q_PROPERTY
(
Fact
*
manualGrid
READ
manualGrid
CONSTANT
)
Q_PROPERTY
(
Fact
*
camera
READ
camera
CONSTANT
)
Q_PROPERTY
(
bool
cameraOrientationFixed
MEMBER
_cameraOrientationFixed
NOTIFY
cameraOrientationFixedChanged
)
Q_PROPERTY
(
double
timeBetweenShots
READ
timeBetweenShots
NOTIFY
timeBetweenShotsChanged
)
Q_PROPERTY
(
QVariantList
polygonPath
READ
polygonPath
NOTIFY
polygonPathChanged
)
Q_PROPERTY
(
QVariantList
gridPoints
READ
gridPoints
NOTIFY
gridPointsChanged
)
...
...
@@ -148,6 +150,7 @@ signals:
void
cameraValueChanged
(
void
);
void
gridTypeChanged
(
QString
gridType
);
void
timeBetweenShotsChanged
(
void
);
void
cameraOrientationFixedChanged
(
bool
cameraOrientationFixed
);
private
slots
:
void
_cameraTriggerChanged
(
void
);
...
...
@@ -174,7 +177,7 @@ private:
QVariantList
_gridPoints
;
QGeoCoordinate
_coordinate
;
QGeoCoordinate
_exitCoordinate
;
double
_altitude
;
bool
_cameraOrientationFixed
;
double
_surveyDistance
;
int
_cameraShots
;
...
...
src/QmlControls/QGroundControl.Controls.qmldir
View file @
c0421290
...
...
@@ -49,6 +49,7 @@ QGCViewDialog 1.0 QGCViewDialog.qml
QGCViewMessage 1.0 QGCViewMessage.qml
QGCViewPanel 1.0 QGCViewPanel.qml
RoundButton 1.0 RoundButton.qml
SectionHeader 1.0 SectionHeader.qml
SetupPage 1.0 SetupPage.qml
SignalStrength 1.0 SignalStrength.qml
SimpleItemMapVisuals 1.0 SimpleItemMapVisuals.qml
...
...
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