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
cfa2fc36
Commit
cfa2fc36
authored
Dec 15, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow additions to enum lists
parent
7a791d77
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
FactMetaData.cc
src/FactSystem/FactMetaData.cc
+6
-0
FactMetaData.h
src/FactSystem/FactMetaData.h
+3
-0
No files found.
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
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