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
905af395
Commit
905af395
authored
Aug 20, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide access to rawValue from Qml
parent
5bc6896c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
Fact.cc
src/FactSystem/Fact.cc
+3
-0
Fact.h
src/FactSystem/Fact.h
+2
-0
No files found.
src/FactSystem/Fact.cc
View file @
905af395
...
...
@@ -77,6 +77,7 @@ void Fact::forceSetRawValue(const QVariant& value)
_rawValue
.
setValue
(
typedValue
);
_sendValueChangedSignal
(
cookedValue
());
emit
_containerRawValueChanged
(
rawValue
());
emit
rawValueChanged
(
_rawValue
);
}
}
else
{
qWarning
()
<<
"Meta data pointer missing"
;
...
...
@@ -94,6 +95,7 @@ void Fact::setRawValue(const QVariant& value)
_rawValue
.
setValue
(
typedValue
);
_sendValueChangedSignal
(
cookedValue
());
emit
_containerRawValueChanged
(
rawValue
());
emit
rawValueChanged
(
_rawValue
);
}
}
}
else
{
...
...
@@ -136,6 +138,7 @@ void Fact::_containerSetRawValue(const QVariant& value)
_rawValue
=
value
;
_sendValueChangedSignal
(
cookedValue
());
emit
vehicleUpdated
(
_rawValue
);
emit
rawValueChanged
(
_rawValue
);
}
QString
Fact
::
name
(
void
)
const
...
...
src/FactSystem/Fact.h
View file @
905af395
...
...
@@ -58,6 +58,7 @@ public:
Q_PROPERTY
(
FactMetaData
::
ValueType_t
type
READ
type
CONSTANT
)
Q_PROPERTY
(
QString
units
READ
cookedUnits
CONSTANT
)
Q_PROPERTY
(
QVariant
value
READ
cookedValue
WRITE
setCookedValue
NOTIFY
valueChanged
)
Q_PROPERTY
(
QVariant
rawValue
READ
rawValue
WRITE
setRawValue
NOTIFY
rawValueChanged
)
Q_PROPERTY
(
bool
valueEqualsDefault
READ
valueEqualsDefault
NOTIFY
valueChanged
)
Q_PROPERTY
(
QString
valueString
READ
cookedValueString
NOTIFY
valueChanged
)
Q_PROPERTY
(
QString
enumOrValueString
READ
enumOrValueString
NOTIFY
valueChanged
)
...
...
@@ -145,6 +146,7 @@ signals:
///
/// This signal is only meant for use by the QT property system. It should not be connected to by client code.
void
valueChanged
(
QVariant
value
);
void
rawValueChanged
(
QVariant
value
);
/// Signalled when the param write ack comes back from the vehicle
void
vehicleUpdated
(
QVariant
value
);
...
...
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