Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
cfa2fc36
Commit
cfa2fc36
authored
Dec 15, 2015
by
Don Gagne
Browse files
Allow additions to enum lists
parent
7a791d77
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/FactSystem/FactMetaData.cc
View file @
cfa2fc36
...
...
@@ -260,3 +260,9 @@ void FactMetaData::setTranslators(Translator rawTranslator, Translator cookedTra
_rawTranslator
=
rawTranslator
;
_cookedTranslator
=
cookedTranslator
;
}
void
FactMetaData
::
addEnumInfo
(
const
QString
&
name
,
const
QVariant
&
value
)
{
_enumStrings
<<
name
;
_enumValues
<<
value
;
}
src/FactSystem/FactMetaData.h
View file @
cfa2fc36
...
...
@@ -79,6 +79,9 @@ public:
Translator
rawTranslator
(
void
)
const
{
return
_rawTranslator
;
}
Translator
cookedTranslator
(
void
)
const
{
return
_cookedTranslator
;
}
/// Used to add new values to the enum lists after the meta data has been loaded
void
addEnumInfo
(
const
QString
&
name
,
const
QVariant
&
value
);
void
setDecimalPlaces
(
int
decimalPlaces
)
{
_decimalPlaces
=
decimalPlaces
;
}
void
setDefaultValue
(
const
QVariant
&
defaultValue
);
void
setEnumInfo
(
const
QStringList
&
strings
,
const
QVariantList
&
values
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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