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
ef1911dd
Commit
ef1911dd
authored
Apr 15, 2020
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
ff49ad04
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
789 additions
and
738 deletions
+789
-738
qgroundcontrol.qrc
qgroundcontrol.qrc
+2
-0
InstrumentValue.cc
src/FlightMap/Widgets/InstrumentValue.cc
+29
-29
InstrumentValue.h
src/FlightMap/Widgets/InstrumentValue.h
+38
-38
InstrumentValue.qml
src/FlightMap/Widgets/InstrumentValue.qml
+145
-0
InstrumentValueEditDialog.qml
src/FlightMap/Widgets/InstrumentValueEditDialog.qml
+548
-0
ValuePageWidget.qml
src/FlightMap/Widgets/ValuePageWidget.qml
+6
-652
ValuesWidgetController.cc
src/FlightMap/Widgets/ValuesWidgetController.cc
+4
-4
qmldir
src/QmlControls/QGroundControl/FlightMap/qmldir
+14
-12
QGCCorePlugin.cc
src/api/QGCCorePlugin.cc
+3
-3
No files found.
qgroundcontrol.qrc
View file @
ef1911dd
...
...
@@ -209,6 +209,8 @@
<file alias="QGroundControl/FlightMap/CustomMapItems.qml">src/FlightMap/MapItems/CustomMapItems.qml</file>
<file alias="QGroundControl/FlightMap/FlightMap.qml">src/FlightMap/FlightMap.qml</file>
<file alias="QGroundControl/FlightMap/InstrumentSwipeView.qml">src/FlightMap/Widgets/InstrumentSwipeView.qml</file>
<file alias="QGroundControl/FlightMap/InstrumentValue.qml">src/FlightMap/Widgets/InstrumentValue.qml</file>
<file alias="QGroundControl/FlightMap/InstrumentValueEditDialog.qml">src/FlightMap/Widgets/InstrumentValueEditDialog.qml</file>
<file alias="QGroundControl/FlightMap/MapFitFunctions.qml">src/FlightMap/Widgets/MapFitFunctions.qml</file>
<file alias="QGroundControl/FlightMap/MapScale.qml">src/FlightMap/MapScale.qml</file>
<file alias="QGroundControl/FlightMap/MissionItemIndicator.qml">src/FlightMap/MapItems/MissionItemIndicator.qml</file>
...
...
src/FlightMap/Widgets/InstrumentValue.cc
View file @
ef1911dd
...
...
@@ -17,11 +17,11 @@
const
char
*
InstrumentValue
::
_versionKey
=
"version"
;
const
char
*
InstrumentValue
::
_factGroupNameKey
=
"groupName"
;
const
char
*
InstrumentValue
::
_factNameKey
=
"factName"
;
const
char
*
InstrumentValue
::
_
labelKey
=
"label
"
;
const
char
*
InstrumentValue
::
_
textKey
=
"text
"
;
const
char
*
InstrumentValue
::
_fontSizeKey
=
"fontSize"
;
const
char
*
InstrumentValue
::
_showUnitsKey
=
"showUnits"
;
const
char
*
InstrumentValue
::
_iconKey
=
"icon"
;
const
char
*
InstrumentValue
::
_
iconPositionKey
=
"icon
Position"
;
const
char
*
InstrumentValue
::
_
labelPositionKey
=
"label
Position"
;
const
char
*
InstrumentValue
::
_rangeTypeKey
=
"rangeType"
;
const
char
*
InstrumentValue
::
_rangeValuesKey
=
"rangeValues"
;
const
char
*
InstrumentValue
::
_rangeColorsKey
=
"rangeColors"
;
...
...
@@ -31,8 +31,8 @@ const char* InstrumentValue::_vehicleFactGroupName = "Vehicle";
QStringList
InstrumentValue
::
_iconNames
;
// Important: The indices of these strings must match the InstrumentValue::
IconPosition enumconst QStringList InstrumentValue::_icon
PositionNames
const
QStringList
InstrumentValue
::
_
icon
PositionNames
=
{
// Important: The indices of these strings must match the InstrumentValue::
LabelPosition enumconst QStringList InstrumentValue::_label
PositionNames
const
QStringList
InstrumentValue
::
_
label
PositionNames
=
{
QT_TRANSLATE_NOOP
(
"InstrumentValue"
,
"Above"
),
QT_TRANSLATE_NOOP
(
"InstrumentValue"
,
"Left"
),
};
...
...
@@ -183,11 +183,11 @@ void InstrumentValue::setFontSize(FontSize fontSize)
void
InstrumentValue
::
saveToSettings
(
QSettings
&
settings
)
const
{
settings
.
setValue
(
_versionKey
,
1
);
settings
.
setValue
(
_
labelKey
,
_label
);
settings
.
setValue
(
_
textKey
,
_text
);
settings
.
setValue
(
_fontSizeKey
,
_fontSize
);
settings
.
setValue
(
_showUnitsKey
,
_showUnits
);
settings
.
setValue
(
_iconKey
,
_icon
);
settings
.
setValue
(
_
iconPositionKey
,
_icon
Position
);
settings
.
setValue
(
_
labelPositionKey
,
_label
Position
);
settings
.
setValue
(
_rangeTypeKey
,
_rangeType
);
if
(
_rangeType
!=
NoRangeInfo
)
{
...
...
@@ -220,11 +220,11 @@ void InstrumentValue::saveToSettings(QSettings& settings) const
void
InstrumentValue
::
readFromSettings
(
const
QSettings
&
settings
)
{
_factGroupName
=
settings
.
value
(
_factGroupNameKey
,
QString
()).
toString
();
_
label
=
settings
.
value
(
_labelKey
,
QString
()).
toString
();
_
text
=
settings
.
value
(
_textKey
,
QString
()).
toString
();
_fontSize
=
settings
.
value
(
_fontSizeKey
,
DefaultFontSize
).
value
<
FontSize
>
();
_showUnits
=
settings
.
value
(
_showUnitsKey
,
true
).
toBool
();
_icon
=
settings
.
value
(
_iconKey
,
QString
()).
toString
();
_
iconPosition
=
settings
.
value
(
_iconPositionKey
,
IconLeft
).
value
<
Icon
Position
>
();
_
labelPosition
=
settings
.
value
(
_labelPositionKey
,
LabelLeft
).
value
<
Label
Position
>
();
_rangeType
=
settings
.
value
(
_rangeTypeKey
,
NoRangeInfo
).
value
<
RangeType
>
();
// Do this now, since the signal will cause _resetRangeInfo to be called trashing values
...
...
@@ -258,22 +258,22 @@ void InstrumentValue::readFromSettings(const QSettings& settings)
emit
factChanged
(
_fact
);
emit
factGroupNameChanged
(
_factGroupName
);
emit
labelChanged
(
_label
);
emit
textChanged
(
_text
);
emit
fontSizeChanged
(
_fontSize
);
emit
showUnitsChanged
(
_showUnits
);
emit
iconChanged
(
_icon
);
emit
iconPositionChanged
(
_icon
Position
);
emit
labelPositionChanged
(
_label
Position
);
emit
rangeValuesChanged
(
_rangeValues
);
emit
rangeColorsChanged
(
_rangeColors
);
emit
rangeOpacitiesChanged
(
_rangeOpacities
);
emit
rangeIconsChanged
(
_rangeIcons
);
}
void
InstrumentValue
::
set
Label
(
const
QString
&
label
)
void
InstrumentValue
::
set
Text
(
const
QString
&
text
)
{
if
(
label
!=
_label
)
{
_
label
=
label
;
emit
labelChanged
(
label
);
if
(
text
!=
_text
)
{
_
text
=
text
;
emit
textChanged
(
text
);
}
}
...
...
@@ -289,13 +289,13 @@ void InstrumentValue::clearFact(void)
{
_fact
=
nullptr
;
_factGroupName
.
clear
();
_
label
.
clear
();
_
text
.
clear
();
_icon
.
clear
();
_showUnits
=
true
;
emit
factChanged
(
_fact
);
emit
factGroupNameChanged
(
_factGroupName
);
emit
labelChanged
(
_label
);
emit
textChanged
(
_text
);
emit
iconChanged
(
_icon
);
emit
showUnitsChanged
(
_showUnits
);
}
...
...
@@ -308,11 +308,11 @@ void InstrumentValue::setIcon(const QString& icon)
}
}
void
InstrumentValue
::
set
IconPosition
(
IconPosition
icon
Position
)
void
InstrumentValue
::
set
LabelPosition
(
LabelPosition
label
Position
)
{
if
(
iconPosition
!=
_icon
Position
)
{
_
iconPosition
=
icon
Position
;
emit
iconPositionChanged
(
icon
Position
);
if
(
labelPosition
!=
_label
Position
)
{
_
labelPosition
=
label
Position
;
emit
labelPositionChanged
(
label
Position
);
}
}
...
...
src/FlightMap/Widgets/InstrumentValue.h
View file @
ef1911dd
...
...
@@ -28,11 +28,11 @@ public:
};
Q_ENUMS
(
FontSize
)
enum
Icon
Position
{
Icon
Above
=
0
,
Icon
Left
,
enum
Label
Position
{
Label
Above
=
0
,
Label
Left
,
};
Q_ENUMS
(
Icon
Position
)
Q_ENUMS
(
Label
Position
)
enum
RangeType
{
NoRangeInfo
=
0
,
...
...
@@ -49,10 +49,10 @@ public:
Q_PROPERTY
(
QString
factGroupName
MEMBER
_factGroupName
NOTIFY
factGroupNameChanged
)
Q_PROPERTY
(
QString
factName
MEMBER
_factName
NOTIFY
factNameChanged
)
Q_PROPERTY
(
Fact
*
fact
READ
fact
NOTIFY
factChanged
)
Q_PROPERTY
(
QString
label
READ
label
WRITE
setLabel
NOTIFY
label
Changed
)
Q_PROPERTY
(
QString
text
READ
text
WRITE
setText
NOTIFY
text
Changed
)
Q_PROPERTY
(
QString
icon
READ
icon
WRITE
setIcon
NOTIFY
iconChanged
)
///< If !isEmpty icon will be show instead of label
Q_PROPERTY
(
IconPosition
iconPosition
READ
iconPosition
WRITE
setIconPosition
NOTIFY
icon
PositionChanged
)
Q_PROPERTY
(
QStringList
iconPositionNames
MEMBER
_iconPositionNames
CONSTANT
)
Q_PROPERTY
(
LabelPosition
labelPosition
READ
labelPosition
WRITE
setLabelPosition
NOTIFY
label
PositionChanged
)
Q_PROPERTY
(
QStringList
labelPositionNames
MEMBER
_labelPositionNames
CONSTANT
)
Q_PROPERTY
(
QStringList
iconNames
MEMBER
_iconNames
CONSTANT
)
Q_PROPERTY
(
FontSize
fontSize
READ
fontSize
WRITE
setFontSize
NOTIFY
fontSizeChanged
)
Q_PROPERTY
(
QStringList
fontSizeNames
MEMBER
_fontSizeNames
CONSTANT
)
...
...
@@ -76,20 +76,20 @@ public:
Fact
*
fact
(
void
)
{
return
_fact
;
}
FontSize
fontSize
(
void
)
const
{
return
_fontSize
;
}
QString
label
(
void
)
const
{
return
_label
;
}
QString
text
(
void
)
const
{
return
_text
;
}
bool
showUnits
(
void
)
const
{
return
_showUnits
;
}
QString
icon
(
void
)
const
{
return
_icon
;
}
IconPosition
iconPosition
(
void
)
const
{
return
_icon
Position
;
}
LabelPosition
labelPosition
(
void
)
const
{
return
_label
Position
;
}
RangeType
rangeType
(
void
)
const
{
return
_rangeType
;
}
QVariantList
rangeValues
(
void
)
const
{
return
_rangeValues
;
}
QVariantList
rangeColors
(
void
)
const
{
return
_rangeColors
;
}
QVariantList
rangeIcons
(
void
)
const
{
return
_rangeIcons
;
}
QVariantList
rangeOpacities
(
void
)
const
{
return
_rangeOpacities
;
}
void
setFontSize
(
FontSize
fontSize
);
void
set
Label
(
const
QString
&
label
);
void
set
Text
(
const
QString
&
text
);
void
setShowUnits
(
bool
showUnits
);
void
setIcon
(
const
QString
&
icon
);
void
set
IconPosition
(
IconPosition
icon
Position
);
void
set
LabelPosition
(
LabelPosition
label
Position
);
void
setRangeType
(
RangeType
rangeType
);
void
setRangeValues
(
const
QVariantList
&
rangeValues
);
void
setRangeColors
(
const
QVariantList
&
rangeColors
);
...
...
@@ -103,11 +103,11 @@ signals:
void
factChanged
(
Fact
*
fact
);
void
factNameChanged
(
const
QString
&
factName
);
void
factGroupNameChanged
(
const
QString
&
factGroup
);
void
labelChanged
(
QString
label
);
void
textChanged
(
QString
text
);
void
fontSizeChanged
(
FontSize
fontSize
);
void
showUnitsChanged
(
bool
showUnits
);
void
iconChanged
(
const
QString
&
icon
);
void
iconPositionChanged
(
IconPosition
icon
Position
);
void
labelPositionChanged
(
LabelPosition
label
Position
);
void
factGroupNamesChanged
(
const
QStringList
&
factGroupNames
);
void
factValueNamesChanged
(
const
QStringList
&
factValueNames
);
void
rangeTypeChanged
(
RangeType
rangeType
);
...
...
@@ -135,11 +135,11 @@ private:
Fact
*
_fact
=
nullptr
;
QString
_factName
;
QString
_factGroupName
;
QString
_
label
;
QString
_
text
;
bool
_showUnits
=
true
;
FontSize
_fontSize
=
DefaultFontSize
;
QString
_icon
;
IconPosition
_iconPosition
=
Icon
Left
;
LabelPosition
_labelPosition
=
Label
Left
;
QStringList
_factGroupNames
;
QStringList
_factValueNames
;
QColor
_currentColor
;
...
...
@@ -162,18 +162,18 @@ private:
// These are user facing string for the various enums.
static
const
QStringList
_rangeTypeNames
;
static
const
QStringList
_
icon
PositionNames
;
static
const
QStringList
_
label
PositionNames
;
static
QStringList
_iconNames
;
static
const
QStringList
_fontSizeNames
;
static
const
char
*
_versionKey
;
static
const
char
*
_factGroupNameKey
;
static
const
char
*
_factNameKey
;
static
const
char
*
_
label
Key
;
static
const
char
*
_
text
Key
;
static
const
char
*
_fontSizeKey
;
static
const
char
*
_showUnitsKey
;
static
const
char
*
_iconKey
;
static
const
char
*
_
icon
PositionKey
;
static
const
char
*
_
label
PositionKey
;
static
const
char
*
_rangeTypeKey
;
static
const
char
*
_rangeValuesKey
;
static
const
char
*
_rangeColorsKey
;
...
...
@@ -183,5 +183,5 @@ private:
};
Q_DECLARE_METATYPE
(
InstrumentValue
::
FontSize
)
Q_DECLARE_METATYPE
(
InstrumentValue
::
Icon
Position
)
Q_DECLARE_METATYPE
(
InstrumentValue
::
Label
Position
)
Q_DECLARE_METATYPE
(
InstrumentValue
::
RangeType
)
src/FlightMap/Widgets/InstrumentValue.qml
0 → 100644
View file @
ef1911dd
/****************************************************************************
*
* (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
import
QtQuick
2.12
import
QtQuick
.
Layouts
1.2
import
QtQuick
.
Controls
2.5
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Palette
1.0
Item
{
id
:
root
height
:
value
.
y
+
value
.
height
property
var
instrumentValue
:
null
property
bool
recalcOk
:
false
property
var
_rgFontSizes
:
[
ScreenTools
.
defaultFontPointSize
,
ScreenTools
.
smallFontPointSize
,
ScreenTools
.
mediumFontPointSize
,
ScreenTools
.
largeFontPointSize
]
property
var
_rgFontSizeRatios
:
[
1
,
ScreenTools
.
smallFontPointRatio
,
ScreenTools
.
mediumFontPointRatio
,
ScreenTools
.
largeFontPointRatio
]
property
real
_doubleDescent
:
ScreenTools
.
defaultFontDescent
*
2
property
real
_tightDefaultFontHeight
:
ScreenTools
.
defaultFontPixelHeight
-
_doubleDescent
property
var
_rgFontSizeTightHeights
:
[
_tightDefaultFontHeight
*
_rgFontSizeRatios
[
0
]
+
2
,
_tightDefaultFontHeight
*
_rgFontSizeRatios
[
1
]
+
2
,
_tightDefaultFontHeight
*
_rgFontSizeRatios
[
2
]
+
2
,
_tightDefaultFontHeight
*
_rgFontSizeRatios
[
3
]
+
2
]
property
real
_blankEntryHeight
:
ScreenTools
.
defaultFontPixelHeight
*
2
// After fighting with using layout and/or anchors I gave up and just do a manual recalc to position items which ends up being much simpler
function
recalcPositions
()
{
if
(
!
recalcOk
)
{
return
}
var
smallSpacing
=
2
if
(
instrumentValue
.
icon
)
{
if
(
instrumentValue
.
labelPosition
===
InstrumentValue
.
LabelAbove
)
{
valueIcon
.
x
=
(
width
-
valueIcon
.
width
)
/
2
valueIcon
.
y
=
0
value
.
x
=
(
width
-
value
.
width
)
/
2
value
.
y
=
valueIcon
.
height
+
smallSpacing
}
else
{
var
iconPlusValueWidth
=
valueIcon
.
width
+
value
.
width
+
ScreenTools
.
defaultFontPixelWidth
valueIcon
.
x
=
(
width
-
iconPlusValueWidth
)
/
2
valueIcon
.
y
=
(
value
.
height
-
valueIcon
.
height
)
/
2
value
.
x
=
valueIcon
.
x
+
valueIcon
.
width
+
(
ScreenTools
.
defaultFontPixelWidth
/
2
)
value
.
y
=
0
}
label
.
x
=
label
.
y
=
0
}
else
{
// label above value
if
(
instrumentValue
.
text
)
{
label
.
x
=
(
width
-
label
.
width
)
/
2
label
.
y
=
0
value
.
y
=
label
.
height
+
smallSpacing
}
else
{
value
.
y
=
0
}
value
.
x
=
(
width
-
value
.
width
)
/
2
valueIcon
.
x
=
valueIcon
.
y
=
0
}
}
onRecalcOkChanged
:
recalcPositions
()
onWidthChanged
:
recalcPositions
()
Connections
{
target
:
instrumentValue
onIconChanged
:
recalcPositions
()
onLabelPositionChanged
:
recalcPositions
()
}
QGCColoredImage
{
id
:
valueIcon
height
:
_rgFontSizeTightHeights
[
instrumentValue
.
fontSize
]
width
:
height
source
:
icon
sourceSize.height
:
height
fillMode
:
Image
.
PreserveAspectFit
mipmap
:
true
smooth
:
true
color
:
instrumentValue
.
isValidColor
(
instrumentValue
.
currentColor
)
?
instrumentValue
.
currentColor
:
qgcPal
.
text
opacity
:
instrumentValue
.
currentOpacity
visible
:
instrumentValue
.
icon
onWidthChanged
:
root
.
recalcPositions
()
onHeightChanged
:
root
.
recalcPositions
()
property
string
icon
readonly
property
string
iconPrefix
:
"
/InstrumentValueIcons/
"
function
updateIcon
()
{
if
(
instrumentValue
.
rangeType
==
InstrumentValue
.
IconSelectRange
)
{
icon
=
iconPrefix
+
instrumentValue
.
currentIcon
}
else
if
(
instrumentValue
.
icon
)
{
icon
=
iconPrefix
+
instrumentValue
.
icon
}
else
{
icon
=
""
}
}
Connections
{
target
:
instrumentValue
onRangeTypeChanged
:
valueIcon
.
updateIcon
()
onCurrentIconChanged
:
valueIcon
.
updateIcon
()
onIconChanged
:
valueIcon
.
updateIcon
()
}
Component.onCompleted
:
updateIcon
();
}
QGCLabel
{
id
:
blank
anchors.horizontalCenter
:
parent
.
horizontalCenter
height
:
_columnButtonsTotalHeight
font.pointSize
:
ScreenTools
.
smallFontPointSize
text
:
_settingsUnlocked
?
qsTr
(
"
BLANK
"
)
:
""
horizontalAlignment
:
Text
.
AlignHCenter
verticalAlignment
:
Text
.
AlignVCenter
visible
:
!
instrumentValue
.
fact
onWidthChanged
:
root
.
recalcPositions
()
onHeightChanged
:
root
.
recalcPositions
()
}
QGCLabel
{
id
:
label
height
:
_rgFontSizeTightHeights
[
InstrumentValue
.
SmallFontSize
]
font.pointSize
:
ScreenTools
.
smallFontPointSize
text
:
instrumentValue
.
text
.
toUpperCase
()
verticalAlignment
:
Text
.
AlignVCenter
visible
:
instrumentValue
.
fact
&&
instrumentValue
.
text
&&
!
instrumentValue
.
icon
onWidthChanged
:
root
.
recalcPositions
()
onHeightChanged
:
root
.
recalcPositions
()
}
QGCLabel
{
id
:
value
font.pointSize
:
_rgFontSizes
[
instrumentValue
.
fontSize
]
text
:
visible
?
(
instrumentValue
.
fact
.
enumOrValueString
+
(
instrumentValue
.
showUnits
?
instrumentValue
.
fact
.
units
:
""
))
:
""
verticalAlignment
:
Text
.
AlignVCenter
visible
:
instrumentValue
.
fact
onWidthChanged
:
root
.
recalcPositions
()
onHeightChanged
:
root
.
recalcPositions
()
}
}
src/FlightMap/Widgets/InstrumentValueEditDialog.qml
0 → 100644
View file @
ef1911dd
This diff is collapsed.
Click to expand it.
src/FlightMap/Widgets/ValuePageWidget.qml
View file @
ef1911dd
This diff is collapsed.
Click to expand it.
src/FlightMap/Widgets/ValuesWidgetController.cc
View file @
ef1911dd
...
...
@@ -40,11 +40,11 @@ void ValuesWidgetController::_connectSignalsToController(InstrumentValue* value,
{
connect
(
value
,
&
InstrumentValue
::
factNameChanged
,
controller
,
&
ValuesWidgetController
::
_saveSettings
);
connect
(
value
,
&
InstrumentValue
::
factGroupNameChanged
,
controller
,
&
ValuesWidgetController
::
_saveSettings
);
connect
(
value
,
&
InstrumentValue
::
labelChanged
,
controller
,
&
ValuesWidgetController
::
_saveSettings
);
connect
(
value
,
&
InstrumentValue
::
textChanged
,
controller
,
&
ValuesWidgetController
::
_saveSettings
);
connect
(
value
,
&
InstrumentValue
::
fontSizeChanged
,
controller
,
&
ValuesWidgetController
::
_saveSettings
);
connect
(
value
,
&
InstrumentValue
::
showUnitsChanged
,
controller
,
&
ValuesWidgetController
::
_saveSettings
);
connect
(
value
,
&
InstrumentValue
::
iconChanged
,
controller
,
&
ValuesWidgetController
::
_saveSettings
);
connect
(
value
,
&
InstrumentValue
::
icon
PositionChanged
,
controller
,
&
ValuesWidgetController
::
_saveSettings
);
connect
(
value
,
&
InstrumentValue
::
label
PositionChanged
,
controller
,
&
ValuesWidgetController
::
_saveSettings
);
connect
(
value
,
&
InstrumentValue
::
rangeTypeChanged
,
controller
,
&
ValuesWidgetController
::
_saveSettings
);
connect
(
value
,
&
InstrumentValue
::
rangeValuesChanged
,
controller
,
&
ValuesWidgetController
::
_saveSettings
);
connect
(
value
,
&
InstrumentValue
::
rangeColorsChanged
,
controller
,
&
ValuesWidgetController
::
_saveSettings
);
...
...
@@ -229,7 +229,7 @@ void ValuesWidgetController::_loadSettings(void)
InstrumentValue
*
colValue
=
appendColumn
(
rowIndex
);
colValue
->
setFact
(
factGroupName
,
factName
);
colValue
->
set
Label
(
colValue
->
fact
()
->
shortDescription
());
colValue
->
set
Text
(
colValue
->
fact
()
->
shortDescription
());
colValue
->
setShowUnits
(
true
);
colValue
->
setFontSize
(
altitudeProperties
.
contains
(
factName
)
?
InstrumentValue
::
LargeFontSize
:
InstrumentValue
::
DefaultFontSize
);
}
...
...
@@ -248,7 +248,7 @@ void ValuesWidgetController::_loadSettings(void)
InstrumentValue
*
colValue
=
appendColumn
(
rowIndex
);
colValue
->
setFact
(
factGroupName
,
factName
);
colValue
->
set
Label
(
colValue
->
fact
()
->
shortDescription
());
colValue
->
set
Text
(
colValue
->
fact
()
->
shortDescription
());
colValue
->
setShowUnits
(
true
);
colValue
->
setFontSize
(
InstrumentValue
::
SmallFontSize
);
}
...
...
src/QmlControls/QGroundControl/FlightMap/qmldir
View file @
ef1911dd
...
...
@@ -9,6 +9,8 @@ CenterMapDropButton 1.0 CenterMapDropButton.qml
CenterMapDropPanel 1.0 CenterMapDropPanel.qml
CompassRing 1.0 CompassRing.qml
InstrumentSwipeView 1.0 InstrumentSwipeView.qml
InstrumentValue 1.0 InstrumentValue.qml
InstrumentValueEditDialog 1.0 InstrumentValueEditDialog.qml
MapFitFunctions 1.0 MapFitFunctions.qml
MapLineArrow 1.0 MapLineArrow.qml
MapScale 1.0 MapScale.qml
...
...
src/api/QGCCorePlugin.cc
View file @
ef1911dd
...
...
@@ -418,21 +418,21 @@ QmlObjectListModel* QGCCorePlugin::valuesWidgetDefaultSettings(ValuesWidgetContr
QmlObjectListModel
*
columnModel
=
controller
.
appendRow
();
InstrumentValue
*
colValue
=
columnModel
->
value
<
InstrumentValue
*>
(
0
);
colValue
->
setFact
(
"Vehicle"
,
"AltitudeRelative"
);
colValue
->
set
Label
(
colValue
->
fact
()
->
shortDescription
());
colValue
->
set
Text
(
colValue
->
fact
()
->
shortDescription
());
colValue
->
setShowUnits
(
true
);
colValue
->
setFontSize
(
InstrumentValue
::
LargeFontSize
);
columnModel
=
controller
.
appendRow
();
colValue
=
columnModel
->
value
<
InstrumentValue
*>
(
0
);
colValue
->
setFact
(
"Vehicle"
,
"GroundSpeed"
);
colValue
->
set
Label
(
colValue
->
fact
()
->
shortDescription
());
colValue
->
set
Text
(
colValue
->
fact
()
->
shortDescription
());
colValue
->
setShowUnits
(
true
);
colValue
->
setFontSize
(
InstrumentValue
::
DefaultFontSize
);
columnModel
=
controller
.
appendRow
();
colValue
=
columnModel
->
value
<
InstrumentValue
*>
(
0
);
colValue
->
setFact
(
"Vehicle"
,
"FlightTime"
);
colValue
->
set
Label
(
colValue
->
fact
()
->
shortDescription
());
colValue
->
set
Text
(
colValue
->
fact
()
->
shortDescription
());
colValue
->
setShowUnits
(
false
);
colValue
->
setFontSize
(
InstrumentValue
::
DefaultFontSize
);
...
...
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