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
34f86638
Unverified
Commit
34f86638
authored
Sep 29, 2019
by
Don Gagne
Committed by
GitHub
Sep 29, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7839 from DonLakeFlyer/Presets
Plan: Presets - tweak settings from tab
parents
8ef0d267
01204850
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
75 additions
and
7 deletions
+75
-7
SurveyItemEditor.qml
src/PlanView/SurveyItemEditor.qml
+63
-2
TransectStyleComplexItemStats.qml
src/PlanView/TransectStyleComplexItemStats.qml
+0
-3
PlanView.SettingsGroup.json
src/Settings/PlanView.SettingsGroup.json
+6
-0
PlanViewSettings.cc
src/Settings/PlanViewSettings.cc
+2
-0
PlanViewSettings.h
src/Settings/PlanViewSettings.h
+4
-2
No files found.
src/PlanView/SurveyItemEditor.qml
View file @
34f86638
...
...
@@ -61,7 +61,7 @@ Rectangle {
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
Component.onCompleted
:
currentIndex
=
0
Component.onCompleted
:
currentIndex
=
QGroundControl
.
settingsManager
.
planViewSettings
.
displayPresetsTabFirst
.
rawValue
?
2
:
0
QGCTabButton
{
text
:
qsTr
(
"
Grid
"
)
}
QGCTabButton
{
text
:
qsTr
(
"
Camera
"
)
}
...
...
@@ -255,7 +255,11 @@ Rectangle {
text
:
qsTr
(
"
Statistics
"
)
}
TransectStyleComplexItemStats
{
}
TransectStyleComplexItemStats
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
visible
:
statsHeader
.
checked
}
}
// Grid Column
Column
{
...
...
@@ -321,6 +325,63 @@ Rectangle {
text
:
qsTr
(
"
Save Settings As New Preset
"
)
onClicked
:
mainWindow
.
showComponentDialog
(
savePresetDialog
,
qsTr
(
"
Save Preset
"
),
mainWindow
.
showDialogDefaultWidth
,
StandardButton
.
Save
|
StandardButton
.
Cancel
)
}
SectionHeader
{
id
:
presectsTransectsHeader
anchors.left
:
undefined
anchors.right
:
undefined
Layout.fillWidth
:
true
text
:
qsTr
(
"
Transects
"
)
}
GridLayout
{
Layout.fillWidth
:
true
columnSpacing
:
_margin
rowSpacing
:
_margin
columns
:
2
visible
:
presectsTransectsHeader
.
checked
QGCLabel
{
text
:
qsTr
(
"
Angle
"
)
}
FactTextField
{
fact
:
missionItem
.
gridAngle
Layout.fillWidth
:
true
onUpdated
:
presetsAngleSlider
.
value
=
missionItem
.
gridAngle
.
value
}
QGCSlider
{
id
:
presetsAngleSlider
minimumValue
:
0
maximumValue
:
359
stepSize
:
1
tickmarksEnabled
:
false
Layout.fillWidth
:
true
Layout.columnSpan
:
2
Layout.preferredHeight
:
ScreenTools
.
defaultFontPixelHeight
*
1.5
onValueChanged
:
missionItem
.
gridAngle
.
value
=
value
Component.onCompleted
:
value
=
missionItem
.
gridAngle
.
value
updateValueWhileDragging
:
true
}
QGCButton
{
Layout.columnSpan
:
2
Layout.fillWidth
:
true
text
:
qsTr
(
"
Rotate Entry Point
"
)
onClicked
:
missionItem
.
rotateEntryPoint
();
}
}
SectionHeader
{
id
:
presetsStatsHeader
anchors.left
:
undefined
anchors.right
:
undefined
Layout.fillWidth
:
true
text
:
qsTr
(
"
Statistics
"
)
}
TransectStyleComplexItemStats
{
Layout.fillWidth
:
true
visible
:
presetsStatsHeader
.
checked
}
}
// Camera Column
Component
{
...
...
src/PlanView/TransectStyleComplexItemStats.qml
View file @
34f86638
...
...
@@ -10,11 +10,8 @@ Grid {
// The following properties must be available up the hierarchy chain
//property var missionItem ///< Mission Item for editor
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
columns
:
2
columnSpacing
:
ScreenTools
.
defaultFontPixelWidth
visible
:
statsHeader
.
checked
QGCLabel
{
text
:
qsTr
(
"
Survey Area
"
)
}
QGCLabel
{
text
:
QGroundControl
.
squareMetersToAppSettingsAreaUnits
(
missionItem
.
coveredArea
).
toFixed
(
2
)
+
"
"
+
QGroundControl
.
appSettingsAreaUnitsString
}
...
...
src/Settings/PlanView.SettingsGroup.json
View file @
34f86638
[
{
"name"
:
"displayPresetsTabFirst"
,
"shortDescription"
:
"Display the presets tab at start"
,
"type"
:
"bool"
,
"defaultValue"
:
false
}
]
src/Settings/PlanViewSettings.cc
View file @
34f86638
...
...
@@ -16,3 +16,5 @@ DECLARE_SETTINGGROUP(PlanView, "PlanView")
{
qmlRegisterUncreatableType
<
PlanViewSettings
>
(
"QGroundControl.SettingsManager"
,
1
,
0
,
"PlanViewSettings"
,
"Reference only"
);
\
}
DECLARE_SETTINGSFACT
(
PlanViewSettings
,
displayPresetsTabFirst
)
src/Settings/PlanViewSettings.h
View file @
34f86638
...
...
@@ -17,6 +17,8 @@ class PlanViewSettings : public SettingsGroup
public:
PlanViewSettings
(
QObject
*
parent
=
nullptr
);
DEFINE_SETTING_NAME_GROUP
()
// This is currently only used to set custom build visibility of the Plan view settings ui.
// The settings themselves related to PlanView are in still in AppSettings due to historical reasons.
// Most individual settings related to PlanView are still in AppSettings due to historical reasons.
DEFINE_SETTINGFACT
(
displayPresetsTabFirst
)
};
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