13 #ifndef __PLUGIN_API_EXCERPT_H__ 14 #define __PLUGIN_API_EXCERPT_H__ 16 #include "libmscore/excerpt.h" 56 QString
title() {
return e->title(); }
69 template <
class Wrapper,
class T>
70 Wrapper* excerptWrap(T* t)
72 Wrapper* w = t ?
new Wrapper(t) :
nullptr;
74 QQmlEngine::setObjectOwnership(w, QQmlEngine::JavaScriptOwnership);
78 extern Excerpt* excerptWrap(Ms::Excerpt* e);
90 template <
typename T,
class Container>
94 : QQmlListProperty<T>(obj, &container, &count, &at) {};
96 static int count(QQmlListProperty<T>* l) {
return int(static_cast<Container*>(l->data)->size()); }
97 static T* at(QQmlListProperty<T>* l,
int i) {
return excerptWrap<T>(
static_cast<Container*
>(l->data)->at(i)); }
101 template<
typename T,
class Container>
Q_INVOKABLE bool is(Ms::PluginAPI::Excerpt *other)
Checks whether two variables represent the same object.
Definition: excerpt.h:60
QString title
The title of this part.
Definition: excerpt.h:40
Ms::PluginAPI::Score partScore
The score object for this part.
Definition: excerpt.h:38
Definition: cursor.cpp:30