Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
MetadataInterface Class Referenceabstract

Enables implementers to react on deserialization of meta data. More...

#include <OpenFlipper/BasePlugin/MetadataInterface.hh>

Inheritance diagram for MetadataInterface:


virtual void metadataDeserialized (const QVector< QPair< QString, QString > > &data)=0

Public Member Functions

virtual ~MetadataInterface ()

Private Slots

virtual void slotGenericMetadataDeserialized (QString key, QString value)

Private Member Functions

virtual void slotObjectMetadataDeserialized (QString object_name, QString value)

Detailed Description

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 89 of file MetadataInterface.hh.

Member Function Documentation

virtual void MetadataInterface::metadataDeserialized ( const QVector< QPair< QString, QString > > &  data)
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.

virtual void MetadataInterface::slotGenericMetadataDeserialized ( QString  key,
QString  value 

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 103 of file MetadataInterface.hh.

virtual void MetadataInterface::slotObjectMetadataDeserialized ( QString  object_name,
QString  value 

Triggered for every piece of object specific meta data encapsulated in "Mesh Comments".

Definition at line 110 of file MetadataInterface.hh.

The documentation for this class was generated from the following file: