2#include <score/plugins/UuidKey.hpp>
35template <
typename Metadata_T,
typename Object>
97#define AUTO_METADATA(Export, Model, Key, Text) \
99 struct Export Metadata<Key, Model> \
107#define TYPED_METADATA(Export, Model, Key, Type, Value) \
109 struct Export Metadata<Key, Model> \
117#define TR_TEXT_METADATA(Export, Model, Key, Text) \
118 AUTO_METADATA(Export, Model, Key, QObject::tr(Text))
119#define LIT_TEXT_METADATA(Export, Model, Key, Text) \
120 AUTO_METADATA(Export, Model, Key, QStringLiteral(Text))
122#define OBJECTKEY_METADATA(Export, Model, ObjectKey) \
123 LIT_TEXT_METADATA(Export, Model, ObjectKey_k, ObjectKey)
125#define DESCRIPTION_METADATA(Export, Model, Text) \
126 TR_TEXT_METADATA(Export, Model, Description_k, Text)
127#define CATEGORY_METADATA(Export, Model, Text) \
128 TR_TEXT_METADATA(Export, Model, Category_k, Text)
129#define TAGS_METADATA(Export, Model, Text) \
130 TYPED_METADATA(Export, Model, Tags_k, QStringList, Text)
132#define UNDO_NAME_METADATA(Export, Model, Text) \
133 TR_TEXT_METADATA(Export, Model, UndoName_k, Text)
135#define DEFAULT_MODEL_METADATA(Model, Description) \
136 OBJECTKEY_METADATA(EMPTY_MACRO, Model, #Model) \
137 DESCRIPTION_METADATA(EMPTY_MACRO, Model, Description)
139#define JSON_METADATA(Type, Text) LIT_TEXT_METADATA(, Type, Json_k, Text)
141#define STATIC_METADATA(Export, Model, Key, Type, Value) \
143 struct Export Metadata<Key, Model> \
145 static constexpr Type get() \
147 const constexpr Type k{Value}; \
153#define UUID_METADATA(Export, Factory, Model, Uuid) \
154 STATIC_METADATA(Export, Model, ConcreteKey_k, UuidKey<Factory>, Uuid)
156#define MODEL_METADATA(Export, Factory, Model, Uuid, ObjectKey, PrettyName) \
157 OBJECTKEY_METADATA(Export, Model, ObjectKey) \
158 UUID_METADATA(Export, Factory, Model, Uuid) \
159 TR_TEXT_METADATA(Export, Model, PrettyName_k, PrettyName)
Metadata to categorize objects: curves, audio, etc.
Metadata to get the description that will be shown in the undo-redo panel.
Metadata to give the JSON key that matches a given type.
Metadata to get the key part of ObjectIdentifier.
Metadata to get the name that will be shown in the user interface.
Metadata to get the name that will be shown in the undo-redo panel.