Developer Documentation
|
Enables implementers to react on deserialization of meta data. More...
#include <OpenFlipper/BasePlugin/MetadataInterface.hh>
Signals | |
virtual void | metadataDeserialized (const QVector< QPair< QString, QString > > &data)=0 |
Public Member Functions | |
virtual | ~MetadataInterface () |
Destructor. | |
Private Slots | |
virtual void | slotGenericMetadataDeserialized (QString key, QString value) |
Private Member Functions | |
virtual void | slotObjectMetadataDeserialized (QString object_name, QString value) |
virtual void | slotObjectMetadataDeserializedJson (QString object_name, QJsonDocument value) |
Enables implementers to react on deserialization of meta data.
Detailed description
Using functions such as BaseObject::getCommentByKey() plugins can attach meta data to objects. This meta data is currently only serialized when taking viewer snapshots. "Plugin-DeserializeScreenshotMetadata" allows deserializing this metadata from a viewer snapshot. (In the future serialization and deserialization of meta data may occur in other contexts as well.)
Whenever meta gets deserialized the slots in this interface will get triggered. Please refer to the documentation of the individual slots to find out which specific signal suits your needs.
The slots are always triggered in the order slotGenericMetadataDeserialized(), slotObjectMetadataDeserialized(), slotObjectMetadataDeserializedJson().
Definition at line 77 of file MetadataInterface.hh.
|
pure virtualsignal |
Can be called by anyone who deserializes meta data, e.g. from a viewer snapshot PNG file. The appropriate slots within this interface will be triggered.
|
inlineprivatevirtualslot |
This low-level signal is very inconvenient to use and chances are you want to use one of the other signals.
Triggered for every top level meta data entry. Currently the only top level meta data entries created by OpenFlipper are "Mesh Comments", "Mesh Materials" and "View". "Mesh Comments" contains the raw concatenation of all object meta data and is very cumbersome to parse. In most cases it's a better idea to use objectMetadataDeserialized().
Definition at line 91 of file MetadataInterface.hh.
|
inlineprivatevirtual |
Triggered for every piece of object specific meta data encapsulated in "Mesh Comments".
Definition at line 98 of file MetadataInterface.hh.
|
inlineprivatevirtual |
Triggered for every piece of object specific meta data encapsulated in "Mesh Comments" if it is valid JSON.
Definition at line 105 of file MetadataInterface.hh.