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
0b049457
Unverified
Commit
0b049457
authored
Aug 02, 2018
by
Don Gagne
Committed by
GitHub
Aug 02, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6754 from DonLakeFlyer/OfflineMapsWrap
Wrap text in Offline Map Options
parents
30516a61
9dd5ffa7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
67 deletions
+46
-67
CameraCalc.cc
src/MissionManager/CameraCalc.cc
+2
-2
CameraCalc.h
src/MissionManager/CameraCalc.h
+1
-1
CameraSpec.cc
src/MissionManager/CameraSpec.cc
+10
-42
CameraSpec.h
src/MissionManager/CameraSpec.h
+18
-21
OfflineMap.qml
src/QtLocationPlugin/QMLControl/OfflineMap.qml
+15
-1
No files found.
src/MissionManager/CameraCalc.cc
View file @
0b049457
...
...
@@ -26,8 +26,8 @@ const char* CameraCalc::adjustedFootprintSideName = "AdjustedFootprintSi
const
char
*
CameraCalc
::
_jsonCameraSpecTypeKey
=
"CameraSpecType"
;
CameraCalc
::
CameraCalc
(
Vehicle
*
vehicle
,
QString
settingsGroup
,
QObject
*
parent
)
:
CameraSpec
(
parent
)
CameraCalc
::
CameraCalc
(
Vehicle
*
vehicle
,
const
QString
&
settingsGroup
,
QObject
*
parent
)
:
CameraSpec
(
settingsGroup
,
parent
)
,
_vehicle
(
vehicle
)
,
_dirty
(
false
)
,
_disableRecalc
(
false
)
...
...
src/MissionManager/CameraCalc.h
View file @
0b049457
...
...
@@ -19,7 +19,7 @@ class CameraCalc : public CameraSpec
Q_OBJECT
public:
CameraCalc
(
Vehicle
*
vehicle
,
QString
settingsGroup
,
QObject
*
parent
=
NULL
);
CameraCalc
(
Vehicle
*
vehicle
,
const
QString
&
settingsGroup
,
QObject
*
parent
=
NULL
);
Q_PROPERTY
(
QString
customCameraName
READ
customCameraName
CONSTANT
)
///< Camera name for custom camera setting
Q_PROPERTY
(
QString
manualCameraName
READ
manualCameraName
CONSTANT
)
///< Camera name for manual camera setting
...
...
src/MissionManager/CameraSpec.cc
View file @
0b049457
...
...
@@ -21,38 +21,20 @@ const char* CameraSpec::_landscapeName = "Landscape";
const
char
*
CameraSpec
::
_fixedOrientationName
=
"FixedOrientation"
;
const
char
*
CameraSpec
::
_minTriggerIntervalName
=
"MinTriggerInterval"
;
CameraSpec
::
CameraSpec
(
QObject
*
parent
)
CameraSpec
::
CameraSpec
(
const
QString
&
settingsGroup
,
QObject
*
parent
)
:
QObject
(
parent
)
,
_dirty
(
false
)
,
_metaDataMap
(
FactMetaData
::
createMapFromJsonFile
(
QStringLiteral
(
":/json/CameraSpec.FactMetaData.json"
),
this
))
,
_sensorWidthFact
(
0
,
_sensorWidthName
,
FactMetaData
::
valueTypeDouble
)
,
_sensorHeightFact
(
0
,
_sensorHeightName
,
FactMetaData
::
valueTypeDouble
)
,
_imageWidthFact
(
0
,
_imageWidthName
,
FactMetaData
::
valueTypeUint32
)
,
_imageHeightFact
(
0
,
_imageHeightName
,
FactMetaData
::
valueTypeUint32
)
,
_focalLengthFact
(
0
,
_focalLengthName
,
FactMetaData
::
valueTypeDouble
)
,
_landscapeFact
(
0
,
_landscapeName
,
FactMetaData
::
valueTypeBool
)
,
_fixedOrientationFact
(
0
,
_fixedOrientationName
,
FactMetaData
::
valueTypeBool
)
,
_minTriggerIntervalFact
(
0
,
_minTriggerIntervalName
,
FactMetaData
::
valueTypeDouble
)
,
_sensorWidthFact
(
settingsGroup
,
_metaDataMap
[
_sensorWidthName
]
)
,
_sensorHeightFact
(
settingsGroup
,
_metaDataMap
[
_sensorHeightName
]
)
,
_imageWidthFact
(
settingsGroup
,
_metaDataMap
[
_imageWidthName
]
)
,
_imageHeightFact
(
settingsGroup
,
_metaDataMap
[
_imageHeightName
]
)
,
_focalLengthFact
(
settingsGroup
,
_metaDataMap
[
_focalLengthName
]
)
,
_landscapeFact
(
settingsGroup
,
_metaDataMap
[
_landscapeName
]
)
,
_fixedOrientationFact
(
settingsGroup
,
_metaDataMap
[
_fixedOrientationName
]
)
,
_minTriggerIntervalFact
(
settingsGroup
,
_metaDataMap
[
_minTriggerIntervalName
]
)
{
_init
(
true
);
}
CameraSpec
::
CameraSpec
(
const
CameraSpec
&
other
,
QObject
*
parent
)
:
QObject
(
parent
)
,
_dirty
(
false
)
,
_metaDataMap
(
FactMetaData
::
createMapFromJsonFile
(
QStringLiteral
(
":/json/CameraSpec.FactMetaData.json"
),
this
))
,
_sensorWidthFact
(
0
,
_sensorWidthName
,
FactMetaData
::
valueTypeDouble
)
,
_sensorHeightFact
(
0
,
_sensorHeightName
,
FactMetaData
::
valueTypeDouble
)
,
_imageWidthFact
(
0
,
_imageWidthName
,
FactMetaData
::
valueTypeUint32
)
,
_imageHeightFact
(
0
,
_imageHeightName
,
FactMetaData
::
valueTypeUint32
)
,
_focalLengthFact
(
0
,
_focalLengthName
,
FactMetaData
::
valueTypeDouble
)
,
_landscapeFact
(
0
,
_landscapeName
,
FactMetaData
::
valueTypeBool
)
,
_fixedOrientationFact
(
0
,
_fixedOrientationName
,
FactMetaData
::
valueTypeBool
)
,
_minTriggerIntervalFact
(
0
,
_minTriggerIntervalName
,
FactMetaData
::
valueTypeDouble
)
{
_init
(
false
);
*
this
=
other
;
QQmlEngine
::
setObjectOwnership
(
this
,
QQmlEngine
::
CppOwnership
);
}
const
CameraSpec
&
CameraSpec
::
operator
=
(
const
CameraSpec
&
other
)
...
...
@@ -69,20 +51,6 @@ const CameraSpec& CameraSpec::operator=(const CameraSpec& other)
return
*
this
;
}
void
CameraSpec
::
_init
(
bool
setDefaults
)
{
QQmlEngine
::
setObjectOwnership
(
this
,
QQmlEngine
::
CppOwnership
);
_sensorWidthFact
.
setMetaData
(
_metaDataMap
[
_sensorWidthName
],
setDefaults
);
_sensorHeightFact
.
setMetaData
(
_metaDataMap
[
_sensorHeightName
],
setDefaults
);
_imageWidthFact
.
setMetaData
(
_metaDataMap
[
_imageWidthName
],
setDefaults
);
_imageHeightFact
.
setMetaData
(
_metaDataMap
[
_imageHeightName
],
setDefaults
);
_focalLengthFact
.
setMetaData
(
_metaDataMap
[
_focalLengthName
],
setDefaults
);
_landscapeFact
.
setMetaData
(
_metaDataMap
[
_landscapeName
],
setDefaults
);
_fixedOrientationFact
.
setMetaData
(
_metaDataMap
[
_fixedOrientationName
],
setDefaults
);
_minTriggerIntervalFact
.
setMetaData
(
_metaDataMap
[
_minTriggerIntervalName
],
setDefaults
);
}
void
CameraSpec
::
setDirty
(
bool
dirty
)
{
if
(
_dirty
!=
dirty
)
{
...
...
src/MissionManager/CameraSpec.h
View file @
0b049457
...
...
@@ -9,15 +9,14 @@
#pragma once
#include "Fact.h"
#include "
Settings
Fact.h"
class
CameraSpec
:
public
QObject
{
Q_OBJECT
public:
CameraSpec
(
QObject
*
parent
=
NULL
);
CameraSpec
(
const
CameraSpec
&
other
,
QObject
*
parent
);
CameraSpec
(
const
QString
&
settingsGroup
,
QObject
*
parent
=
NULL
);
const
CameraSpec
&
operator
=
(
const
CameraSpec
&
other
);
...
...
@@ -31,14 +30,14 @@ public:
Q_PROPERTY
(
Fact
*
fixedOrientation
READ
fixedOrientation
CONSTANT
)
///< true: camera is in fixed orientation
Q_PROPERTY
(
Fact
*
minTriggerInterval
READ
minTriggerInterval
CONSTANT
)
///< Minimum time in seconds between each photo taken, 0 for not specified
Fact
*
sensorWidth
(
void
)
{
return
&
_sensorWidthFact
;
}
Fact
*
sensorHeight
(
void
)
{
return
&
_sensorHeightFact
;
}
Fact
*
imageWidth
(
void
)
{
return
&
_imageWidthFact
;
}
Fact
*
imageHeight
(
void
)
{
return
&
_imageHeightFact
;
}
Fact
*
focalLength
(
void
)
{
return
&
_focalLengthFact
;
}
Fact
*
landscape
(
void
)
{
return
&
_landscapeFact
;
}
Fact
*
fixedOrientation
(
void
)
{
return
&
_fixedOrientationFact
;
}
Fact
*
minTriggerInterval
(
void
)
{
return
&
_minTriggerIntervalFact
;
}
Settings
Fact
*
sensorWidth
(
void
)
{
return
&
_sensorWidthFact
;
}
Settings
Fact
*
sensorHeight
(
void
)
{
return
&
_sensorHeightFact
;
}
Settings
Fact
*
imageWidth
(
void
)
{
return
&
_imageWidthFact
;
}
Settings
Fact
*
imageHeight
(
void
)
{
return
&
_imageHeightFact
;
}
Settings
Fact
*
focalLength
(
void
)
{
return
&
_focalLengthFact
;
}
Settings
Fact
*
landscape
(
void
)
{
return
&
_landscapeFact
;
}
Settings
Fact
*
fixedOrientation
(
void
)
{
return
&
_fixedOrientationFact
;
}
Settings
Fact
*
minTriggerInterval
(
void
)
{
return
&
_minTriggerIntervalFact
;
}
bool
dirty
(
void
)
const
{
return
_dirty
;
}
void
setDirty
(
bool
dirty
);
...
...
@@ -50,20 +49,18 @@ signals:
void
dirtyChanged
(
bool
dirty
);
private:
void
_init
(
bool
setDefaults
);
bool
_dirty
;
QMap
<
QString
,
FactMetaData
*>
_metaDataMap
;
Fact
_sensorWidthFact
;
Fact
_sensorHeightFact
;
Fact
_imageWidthFact
;
Fact
_imageHeightFact
;
Fact
_focalLengthFact
;
Fact
_landscapeFact
;
Fact
_fixedOrientationFact
;
Fact
_minTriggerIntervalFact
;
Settings
Fact
_sensorWidthFact
;
Settings
Fact
_sensorHeightFact
;
Settings
Fact
_imageWidthFact
;
Settings
Fact
_imageHeightFact
;
Settings
Fact
_focalLengthFact
;
Settings
Fact
_landscapeFact
;
Settings
Fact
_fixedOrientationFact
;
Settings
Fact
_minTriggerIntervalFact
;
static
const
char
*
_sensorWidthName
;
static
const
char
*
_sensorHeightName
;
...
...
src/QtLocationPlugin/QMLControl/OfflineMap.qml
View file @
0b049457
...
...
@@ -286,7 +286,12 @@ QGCView {
Item
{
width
:
1
;
height
:
1
}
QGCLabel
{
text
:
qsTr
(
"
Max Cache Memory Size (MB):
"
)
}
QGCLabel
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
wrapMode
:
Text
.
WordWrap
text
:
qsTr
(
"
Max Cache Memory Size (MB):
"
)
}
QGCTextField
{
id
:
maxCacheMemSize
...
...
@@ -297,6 +302,9 @@ QGCView {
}
QGCLabel
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
wrapMode
:
Text
.
WordWrap
font.pointSize
:
_adjustableFontPointSize
text
:
qsTr
(
"
Memory cache changes require a restart to take effect.
"
)
}
...
...
@@ -310,6 +318,9 @@ QGCView {
width
:
ScreenTools
.
defaultFontPixelWidth
*
30
}
QGCLabel
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
wrapMode
:
Text
.
WordWrap
text
:
qsTr
(
"
To enable Mapbox maps, enter your access token.
"
)
visible
:
_mapboxFact
?
_mapboxFact
.
visible
:
false
font.pointSize
:
_adjustableFontPointSize
...
...
@@ -324,6 +335,9 @@ QGCView {
width
:
ScreenTools
.
defaultFontPixelWidth
*
30
}
QGCLabel
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
wrapMode
:
Text
.
WordWrap
text
:
qsTr
(
"
To enable Esri maps, enter your access token.
"
)
visible
:
_esriFact
?
_esriFact
.
visible
:
false
font.pointSize
:
_adjustableFontPointSize
...
...
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